CN114253663A - Virtual machine resource scheduling method and device - Google Patents

Virtual machine resource scheduling method and device Download PDF

Info

Publication number
CN114253663A
CN114253663A CN202111341142.0A CN202111341142A CN114253663A CN 114253663 A CN114253663 A CN 114253663A CN 202111341142 A CN202111341142 A CN 202111341142A CN 114253663 A CN114253663 A CN 114253663A
Authority
CN
China
Prior art keywords
virtual machine
utilization rate
resource
preset
resource utilization
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
CN202111341142.0A
Other languages
Chinese (zh)
Inventor
刘馗
叶文杰
高晓东
林雄城
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111341142.0A priority Critical patent/CN114253663A/en
Publication of CN114253663A publication Critical patent/CN114253663A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/505Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/503Resource availability

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application discloses a method and a system for scheduling virtual machine resources, which comprises the steps of obtaining the utilization rate of the virtual machine resources; acquiring idle resource information of a designated server; judging whether the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value or not; if the virtual machine reaches a preset resource utilization rate threshold value, allocating the idle resources of the designated server to the virtual machine; and if the virtual machine does not reach the preset resource utilization rate threshold value, reducing and recycling the resources of the virtual machine to the specified server. The method effectively realizes reasonable allocation of the resources of the virtual machine, saves the resources of the server and improves the resource utilization rate of the server.

Description

Virtual machine resource scheduling method and device
Technical Field
The embodiment of the invention relates to the field of communication, in particular to a method and a device for scheduling virtual machine resources.
Background
In recent years, cloud computing technology is popularized on a large scale, the application of a multi-tenant mode occupies a large proportion, and a constructed cloud data center platform is used for providing virtual machine renting service for users. Virtual machines inside a cloud data center can be placed in any physical server to support resource virtualization, thereby reducing the cost of building a large amount of infrastructure on a recurring basis. Due to a 'pay-per-view' method peculiar to the cloud data center and convenience of virtual machine creation and resource regulation on the cloud, more and more users adopt the virtual machines on the cloud as servers to provide network services. In some scenarios, when a user of a virtual machine applies for resources, the resource usage amount of the virtual machine cannot be well predicted and evaluated, and therefore the resources are often configured too much or too little for the virtual machine. After some virtual machines are operated for a period of time, due to the increase of the traffic, the originally applied virtual machine resources cannot support the computing requirements of the traffic well, and the virtual machines are in a high-load state for a long time. Some virtual machines are allocated more resources at the initial stage of creation, but due to less traffic, resource surplus occurs in the virtual machines. Due to the isolation of the virtual machines from server resources, the computing resources that are spare in the virtual machines cannot be utilized by other virtual machines or for the creation request of a new virtual machine.
Therefore, it is necessary to provide a scheduling method capable of dynamically adjusting virtual machine resources, so as to implement scheduling of virtual machine resources according to actual conditions, save resources of a server, and improve resource utilization rate of the server.
Disclosure of Invention
The invention mainly aims to provide a method and a device for scheduling virtual machine resources, and aims to solve the problem that a server in the prior art cannot reasonably allocate the resources of a virtual machine.
In a first aspect, the present invention provides a method for scheduling virtual machine resources, including:
acquiring the resource utilization rate of a virtual machine;
acquiring idle resource information of a designated server;
judging whether the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value or not;
if the virtual machine reaches a preset resource utilization rate threshold value, allocating the idle resources of the designated server to the virtual machine;
and if the virtual machine does not reach the preset resource utilization rate threshold value, reducing and recycling the resources of the virtual machine to the specified server.
Optionally, the step of obtaining the resource utilization rate of the virtual machine includes:
acquiring historical resource use information of the virtual machine in a preset historical time period;
and counting the resource utilization rate of the virtual machine according to the historical resource utilization information.
Optionally, the step of obtaining historical resource usage information of the virtual machine within a preset historical time period includes:
acquiring memory use information of the virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and counting to obtain the memory utilization rate according to the memory utilization information, wherein the memory utilization rate is the virtual machine resource utilization rate.
Optionally, the step of determining whether the resource usage rate of the virtual machine reaches a preset resource usage rate threshold includes:
and if the memory utilization rate exceeds a preset memory threshold value, the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value.
Optionally, the step of obtaining historical resource usage information of the virtual machine within a preset historical time period includes:
acquiring CPU use information of the virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and counting and obtaining the CPU utilization rate according to the CPU utilization information, wherein the CPU utilization rate is the resource utilization rate.
Optionally, the step of determining whether the resource usage rate of the virtual machine reaches a preset resource usage rate threshold includes:
and if the CPU utilization rate exceeds a preset CPU utilization rate threshold value, the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value.
Optionally, the step of obtaining historical resource usage information of the virtual machine within a preset historical time period includes:
acquiring load information of a virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and obtaining an average load value according to the load information statistics, wherein the average load value is the resource utilization rate.
Optionally, the step of determining whether the resource usage rate of the virtual machine reaches a preset resource usage rate threshold includes:
and if the average load value exceeds a preset load threshold value, the utilization rate of the virtual machine resources reaches a preset resource utilization rate threshold value.
Optionally, the designated server is the virtual machine host server or a first server in an idle resource state.
Optionally, when the designated server is the first server in an idle resource state, before allocating idle resources of the first server in the idle resource state to the virtual machine, the method further includes:
migrating the virtual machine to the first server in an idle resource state.
According to a second aspect of the embodiments of the present invention, the present invention provides a scheduling apparatus for virtual machine resources, including,
the resource monitoring module is used for acquiring historical resource use information of the virtual machine in a preset historical time period and counting the resource use rate of the virtual machine according to the historical resource use information;
the resource acquisition module is used for acquiring the idle resource information of the specified server;
the monitoring data analysis module is used for judging whether the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value according to the virtual machine resource utilization rate; (ii) a
And the resource allocation module is used for allocating or recycling the virtual machine resources.
Optionally, the apparatus further includes a scheduling module, configured to schedule the virtual machine to a first server in an idle resource state when the resource of the host server of the virtual machine cannot reach the configuration required by the virtual machine, and allocate the resource for the virtual machine by the first server.
Compared with the prior art, one or more embodiments in the above scheme can have the following advantages or beneficial effects:
according to the method and the system, whether the utilization rate of the historical resources of the virtual machine reaches the preset resource utilization rate threshold value is judged according to the utilization rate condition of the historical resources of the virtual machine, if the utilization rate of the historical resources of the virtual machine reaches the preset resource utilization rate threshold value, the resources of the virtual machine are increased, and if the utilization rate of the historical resources of the virtual machine does not reach the preset resource utilization rate threshold value, the resources of the virtual machine are recycled, so that the resources of the virtual machine are reasonably distributed by the server, and the resource utilization rate of the server is improved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any inventive exercise.
Fig. 1 is a schematic flowchart of a method for scheduling virtual machine resources according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for scheduling virtual machine resources based on memory information according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of a method for scheduling virtual machine resources based on CPU information according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of a method for scheduling virtual machine resources based on load information according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating another method for scheduling virtual machine resources according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a scheduling apparatus for virtual machine resources according to the present invention.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the accompanying drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the corresponding technical effects can be fully understood and implemented. The embodiments of the present invention and the features of the embodiments can be combined with each other without conflict, and the formed technical solutions are within the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for scheduling virtual machine resources, including the following steps S101 to S105:
step S101: and counting the resource utilization rate of the virtual machine according to the resource utilization information of the virtual machine in a preset historical time period.
The server obtains the resource use condition of the virtual machine running on the server through the monitoring program, for example, taking an open source solution provided by Prometheus as an example, wherein the node-exporter component is installed on the virtual machine deploying the Linux system, and can acquire each running state of the Linux system virtual machine in real time; and the Prometeus component can pull virtual machine monitoring data externally provided by the node-exporter from each virtual machine, wherein the monitoring data can be memory utilization rate, CPU utilization rate, average load value, hard disk utilization rate and the like within a period of time, and after the monitoring data of the virtual machine is obtained, the resource utilization rate of the virtual machine is obtained through a preset algorithm, so that the resources of the virtual machine are adjusted.
Step S102: and acquiring the idle resource information of the host server of the virtual machine.
By reading the monitoring data built in the host server of the virtual machine, the free resource information of the server where the virtual machine is located, such as the number of free CPUs, the free memory space, the free hard disk space and the like of the current server, can be obtained.
Step S103: and judging whether the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value.
After acquiring the resource usage information of the virtual machine, such as CPU usage, memory usage, hard disk usage, average load value, whether the resource utilization rate is higher can be calculated according to each index, for example, the condition that the resource utilization rate reaches the preset resource utilization rate threshold value is that the memory utilization rate exceeds 80%, when the acquired virtual machine memory utilization rate is 90%, then the virtual machine can be considered to reach the preset resource utilization threshold, and meanwhile, a plurality of indexes can be combined to judge whether the virtual machine reaches the preset resource utilization threshold, for example, if the condition that the resource utilization rate reaches the preset resource utilization rate threshold is that the memory utilization rate exceeds 70% and the CPU utilization rate exceeds 70%, when the acquired memory utilization rate of the virtual machine is 75% and the CPU utilization rate is 72%, it may be considered that the resource utilization rate of the virtual machine reaches the preset resource utilization rate threshold. When judging whether the resource utilization rate of the virtual machine reaches the preset resource utilization rate threshold value, the configuration of the virtual machine can be increased or reduced by combining with the actual situation.
Step S104: and reducing and recycling the resources of the virtual machine to the host server of the virtual machine.
And when the resource utilization rate of the virtual machine is judged to be lower than a preset resource utilization rate threshold value, allocating the idle resources of the host server of the virtual machine to the virtual machine, for example, if the memory utilization rate of the virtual machine is lower than 20%, recovering part of the memory of the virtual machine, and if the CPU utilization rate of the virtual machine is lower than 20%, reducing part of the CPU of the virtual machine.
Step S105: and allocating the idle resources of the host server of the virtual machine to the virtual machine.
And when the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value, allocating the idle resources of the host server of the virtual machine to the virtual machine, for example, if the memory utilization rate of the virtual machine is higher than 90%, adding the idle memory resources of the server to the virtual machine, and if the CPU utilization rate of the virtual machine is higher than 80%, adding the idle CPU resources of the server to the virtual machine.
In an embodiment, as shown in fig. 2, a memory usage of a virtual machine in a period of time is obtained according to a monitor of the virtual machine, and an average memory usage of the virtual machine in the period of time is obtained through statistics, and a maximum memory usage of 98% and a minimum memory usage of 80%, when a difference between the maximum memory usage and the minimum memory usage is within 30% of a total memory, it may be considered that a fluctuation of the memory usage of the virtual machine is relatively small, and when a limit condition of a preset resource usage threshold is that the memory usage exceeds 90%, the obtained memory usage of 92% is greater than a preset threshold of 90%, so that it may be determined that the virtual machine resource usage threshold reaches the preset resource usage threshold; when the difference between the maximum memory usage value and the minimum memory usage value exceeds 30% of the total memory, it may be considered that the fluctuation of the memory usage condition of the virtual machine is large, and if the memory usage rate is greater than 80% of the preset threshold corresponding to this condition, it may also be considered that the memory usage rate reaches the preset resource usage rate threshold. When the resource utilization rate of the virtual machine reaches the preset resource utilization rate threshold value, the idle memory of the server of the host of the virtual machine needs to be allocated to the virtual machine, the condition that the memory of the virtual machine is insufficient is relieved, and when the virtual machine does not reach the preset resource utilization rate threshold value, the server recovers part of the memory of the virtual machine, so that resources are saved, and the subsequent allocation of the server to other virtual machines is facilitated.
In an embodiment, as shown in fig. 3, the CPU usage of the virtual machine in a period of time is obtained according to the monitoring program of the virtual machine, and when the CPU usage of the virtual machine in the period of time is obtained through statistics, for example, when the preset CPU usage threshold is 70%, the CPU usage of the virtual machine meets the condition, the virtual machine resource usage reaches the preset resource usage threshold, and the server needs to allocate the idle CPU resource to the virtual machine, so as to alleviate the problem of high CPU usage; if the CPU utilization rate of the virtual machine does not meet the preset threshold value of 70%, the situation that the CPU resources of the virtual machine are excessive is shown, and the server recovers part of the CPU resources of the virtual machine according to the actual situation so as to be distributed to other virtual machines in the following process.
In an embodiment, as shown in fig. 4, the load value fluctuation condition of a virtual machine within a period of time is obtained according to a monitoring program of the virtual machine, an average load value of the virtual machine is obtained through statistics, and if a preset load threshold value is 3, the average load value of the virtual machine exceeds the preset threshold value, which indicates that the resource utilization rate of the virtual machine is high, the server allocates part of CPU resources and memory resources to the virtual machine, so as to alleviate the problem of high load; if the average load value of the virtual machine does not exceed the threshold value, the virtual machine is in a state of excessive computing resources, and the server recovers part of the memory or CPU resources according to the actual situation.
In one embodiment, as shown in fig. 5, the first server in the idle resource state is another server in the idle resource state in the platform, which is not the virtual machine hosting server, the monitoring program first obtains idle resource information of other servers in the platform, when the virtual machine is determined to reach the preset resource utilization threshold, the CPU and the memory resources are required to be added to the virtual machine, when the free resources of the host server of the virtual machine do not meet the CPU and memory resources required by the virtual machine, the virtual machine is scheduled to other servers with sufficient resources in the platform to add resources to the servers, the virtual machine migration mode comprises instance migration and instance live migration, the instance migration is to migrate to other servers when the virtual machine is closed, and the instance live migration is to migrate to other servers when the servers are running.
In an embodiment, as shown in fig. 6, the present invention provides a scheduling apparatus for virtual machine resources, including:
the resource monitoring module is used for acquiring historical resource use information of the virtual machine in a preset historical time period and counting the resource use rate of the virtual machine according to the historical resource use information;
the resource acquisition module is used for acquiring the idle resource information of the specified server;
the monitoring data analysis module is used for judging whether the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value according to the virtual machine resource utilization rate;
and the resource allocation module is used for allocating or recycling the virtual machine resources.
And the scheduling module is used for scheduling the virtual machine to a first server in an idle resource state when the resources of the host server of the virtual machine cannot reach the configuration required by the virtual machine, and allocating resources for the virtual machine by the first server.
The numerical values of the above-described conditions for limitation may be changed.
It should be noted that the above-described embodiments of the apparatus are merely schematic, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. In addition, in the drawings of the embodiment of the apparatus provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, and may be specifically implemented as one or more communication buses or signal lines. One of ordinary skill in the art can understand and implement it without inventive effort.
In summary, the above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the above embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the above embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention. It will be understood by those skilled in the art that all or part of the steps of the above methods may be implemented by instructing the relevant hardware through a program, and the program may be stored in a computer readable storage medium, such as a read-only memory, a magnetic or optical disk, and the like. Alternatively, all or part of the steps of the above embodiments may be implemented using one or more integrated circuits. Accordingly, each module/unit in the above embodiments may be implemented in the form of hardware, and may also be implemented in the form of a software functional module. The present invention is not limited to any specific form of combination of hardware and software.
In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method may be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that, in the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Although the embodiments disclosed in the present disclosure are described above, the above description is only for the convenience of understanding the present disclosure, and is not intended to limit the present disclosure. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the disclosure as defined by the appended claims.

Claims (12)

1. A method for scheduling virtual machine resources is characterized by comprising the following steps:
acquiring the resource utilization rate of a virtual machine;
acquiring idle resource information of a designated server;
judging whether the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value or not;
if the resource utilization rate of the virtual machine reaches a preset resource utilization rate threshold value, allocating the idle resources of the designated server to the virtual machine;
and if the resource utilization rate of the virtual machine does not reach a preset resource utilization rate threshold value, reducing and recycling the resources of the virtual machine to the designated server.
2. The method according to claim 1, wherein the step of obtaining the virtual machine resource usage comprises:
acquiring historical resource use information of the virtual machine in a preset historical time period;
and counting the resource utilization rate of the virtual machine according to the historical resource utilization information.
3. The method according to claim 2, wherein the step of obtaining historical resource usage information of the virtual machine within a preset historical time period comprises:
acquiring memory use information of the virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and counting to obtain the memory utilization rate according to the memory utilization information, wherein the memory utilization rate is the virtual machine resource utilization rate.
4. The method according to claim 3, wherein the step of determining whether the virtual machine resource usage reaches a preset resource usage threshold comprises:
and if the memory utilization rate exceeds a preset memory threshold value, the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value.
5. The method according to claim 2, wherein the step of obtaining historical resource usage information of the virtual machine within a preset historical time period comprises:
acquiring CPU use information of the virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and counting and obtaining the CPU utilization rate according to the CPU utilization information, wherein the CPU utilization rate is the resource utilization rate.
6. The method according to claim 5, wherein the step of determining whether the virtual machine resource usage rate reaches a preset resource usage rate threshold includes:
and if the CPU utilization rate exceeds a preset CPU utilization rate threshold value, the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value.
7. The method according to claim 2, wherein the step of obtaining historical resource usage information of the virtual machine within a preset historical time period comprises:
acquiring load information of a virtual machine in a preset historical time period;
the step of counting the resource utilization rate of the virtual machine according to the historical resource utilization information comprises the following steps:
and obtaining an average load value according to the load information statistics, wherein the average load value is the resource utilization rate.
8. The method according to claim 7, wherein the step of determining whether the virtual machine resource usage reaches a preset resource usage threshold comprises:
and if the average load value exceeds a preset load threshold value, the utilization rate of the virtual machine resources reaches a preset resource utilization rate threshold value.
9. The method of claim 1, wherein the designated server is the virtual machine hosting server or a first server in an idle resource state.
10. The method of claim 9, wherein when the designated server is the first server in an idle resource state, before allocating idle resources of the first server in the idle resource state to the virtual machine, further comprising:
migrating the virtual machine to the first server in an idle resource state.
11. A scheduling apparatus for virtual machine resources, comprising:
the resource monitoring module is used for acquiring historical resource use information of the virtual machine in a preset historical time period and counting the resource use rate of the virtual machine according to the historical resource use information;
the resource acquisition module is used for acquiring the idle resource information of the specified server;
the monitoring data analysis module is used for judging whether the virtual machine resource utilization rate reaches a preset resource utilization rate threshold value according to the virtual machine resource utilization rate;
and the resource allocation module is used for allocating or recycling the virtual machine resources.
12. The apparatus of claim 11, wherein the means for scheduling virtual machine resources further comprises:
and the scheduling module is used for scheduling the virtual machine to a first server in an idle resource state when the resources of the host server of the virtual machine cannot reach the configuration required by the virtual machine, and allocating resources for the virtual machine by the first server.
CN202111341142.0A 2021-11-12 2021-11-12 Virtual machine resource scheduling method and device Withdrawn CN114253663A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111341142.0A CN114253663A (en) 2021-11-12 2021-11-12 Virtual machine resource scheduling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111341142.0A CN114253663A (en) 2021-11-12 2021-11-12 Virtual machine resource scheduling method and device

Publications (1)

Publication Number Publication Date
CN114253663A true CN114253663A (en) 2022-03-29

Family

ID=80792481

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111341142.0A Withdrawn CN114253663A (en) 2021-11-12 2021-11-12 Virtual machine resource scheduling method and device

Country Status (1)

Country Link
CN (1) CN114253663A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370032A (en) * 2023-12-07 2024-01-09 聊城金恒智慧城市运营有限公司 Cloud computing server resource optimization allocation method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648885A (en) * 2016-10-17 2017-05-10 深圳市深信服电子科技有限公司 Dynamic allocation method, device and system for resources of virtual machine

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648885A (en) * 2016-10-17 2017-05-10 深圳市深信服电子科技有限公司 Dynamic allocation method, device and system for resources of virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370032A (en) * 2023-12-07 2024-01-09 聊城金恒智慧城市运营有限公司 Cloud computing server resource optimization allocation method
CN117370032B (en) * 2023-12-07 2024-03-01 聊城金恒智慧城市运营有限公司 Cloud computing server resource optimization allocation method

Similar Documents

Publication Publication Date Title
CN108965485B (en) Container resource management method and device and cloud platform
CN110858161B (en) Resource allocation method, device, system, equipment and medium
US8656404B2 (en) Statistical packing of resource requirements in data centers
JP6490913B2 (en) Task execution by idle resources of grid computing system
CN107295090B (en) Resource scheduling method and device
CN111399970B (en) Reserved resource management method, device and storage medium
US10616134B1 (en) Prioritizing resource hosts for resource placement
CN108874502B (en) Resource management method, device and equipment of cloud computing cluster
WO2013082742A1 (en) Resource scheduling method, device and system
CN107665143B (en) Resource management method, device and system
CN109254843A (en) The method and apparatus for distributing resource
JP2023543744A (en) Resource scheduling method, system, electronic device and computer readable storage medium
CN114546587A (en) Capacity expansion and reduction method of online image recognition service and related device
CN108900435A (en) A kind of method, apparatus and computer storage medium of service deployment
CN107203256B (en) Energy-saving distribution method and device under network function virtualization scene
US11182189B2 (en) Resource optimization for virtualization environments
CN114253663A (en) Virtual machine resource scheduling method and device
US11531572B2 (en) Cross-cluster host reassignment
CN115794305B (en) Method and device for adjusting memory of virtual machine, storage medium and electronic device
CN107562510B (en) Management method and management equipment for application instances
CN108429704B (en) Node resource allocation method and device
WO2017133421A1 (en) Method and device for sharing resources among multiple tenants
CN114327862A (en) Memory allocation method and device, electronic equipment and storage medium
CN114090201A (en) Resource scheduling method, device, equipment and storage medium
CN114691283A (en) Method and device for managing instances and cloud application engine

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WW01 Invention patent application withdrawn after publication

Application publication date: 20220329

WW01 Invention patent application withdrawn after publication