CN107368349B - Resource management method and device - Google Patents
Resource management method and device Download PDFInfo
- Publication number
- CN107368349B CN107368349B CN201710583289.8A CN201710583289A CN107368349B CN 107368349 B CN107368349 B CN 107368349B CN 201710583289 A CN201710583289 A CN 201710583289A CN 107368349 B CN107368349 B CN 107368349B
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- rate
- state change
- state
- cpu processing
- 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.)
- Active
Links
- 238000007726 management method Methods 0.000 title abstract description 21
- 230000008859 change Effects 0.000 claims abstract description 62
- 230000005540 biological transmission Effects 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims abstract description 12
- 238000012545 processing Methods 0.000 claims description 48
- 230000008569 process Effects 0.000 claims description 8
- 238000012546 transfer Methods 0.000 claims description 7
- 230000005055 memory storage Effects 0.000 claims description 4
- 238000013508 migration Methods 0.000 abstract description 25
- 230000005012 migration Effects 0.000 abstract description 25
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
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)
- Multi Processors (AREA)
Abstract
The invention provides a resource management method and a device, wherein the method comprises the following steps: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time; and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine. According to the technical scheme, the resource operation parameters of the virtual machine are adjusted, so that the state change rate is smaller than the state transmission rate, and the real-time rapid migration of the virtual machine is realized.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a resource management method and apparatus.
Background
In computer science, virtual machines are part of software, each running its own operating system and software applications as an independent platform; the virtual machine monitor manages allocation and virtualization of computer resources, virtualizing underlying hardware or emulated hardware devices of the host machine, making use of the virtual machine transparent to the guest operating system or to a remote client using the virtual machine; the host is capable of running multiple virtual machines simultaneously, where each virtual machine is used by a local or remote client, the host allocates a certain amount of host resources to each virtual machine, and each virtual machine executes an application using the allocated resources.
When a virtual machine is migrated from one host to another host in real time (a virtual machine live migration process refers to live migration in a state where the virtual machine is kept in a startup running state), and a state change rate of the virtual machine is greater than a state migration rate, the live migration work cannot be realized.
For example: for memory transfer of a virtual machine, when the state change rate of the virtual machine is greater than the state migration rate, a specific page of the transferred memory is modified again on the virtual machine on the source host, and needs to be transferred again, so that the real-time memory transfer cannot be completed.
Therefore, it is desirable to provide a resource management scheme to solve the above technical problems.
Disclosure of Invention
The invention provides a resource management method and a resource management device, which are used for solving the problems.
The invention provides a resource management method, which comprises the following steps: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
The invention provides a resource management device, which comprises a processor, a resource management unit and a resource management unit, wherein the processor is suitable for realizing each instruction; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor;
acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
The technical scheme provided by the embodiment of the invention is as follows: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time; and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
According to the technical scheme, the resource operation parameters of the virtual machine are adjusted, so that the state change rate is smaller than the state transmission rate, and the real-time rapid migration of the virtual machine is realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a diagram illustrating a virtual machine migration architecture according to embodiment 1 of the present invention;
FIG. 2 is a flowchart of a resource management method according to embodiment 2 of the present invention;
FIG. 3 is a flowchart of a resource management method according to embodiment 3 of the present invention;
FIG. 4 is a flowchart of a resource management method according to embodiment 4 of the present invention;
FIG. 5 is a flowchart of a resource management method according to embodiment 5 of the present invention;
fig. 6 is a block diagram of a resource management apparatus according to embodiment 6 of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The embodiment of the invention has the technical characteristics that: monitoring a state change rate of the virtual machine undergoing live migration, and after determining that the state change rate of the virtual machine is greater than or equal to a state transfer rate of the virtual machine during a live migration process, adjusting one or more resources of the virtual machine to reduce the state change rate of the virtual machine to less than the state transfer rate of the virtual machine. The embodiment of the invention limits the computing resources on the virtual machine in a mode of ensuring that the state change rate of the virtual machine is less than the state transmission rate of the virtual machine. For example, if during live migration the virtual machine is generating more dirty pages than transferred pages, the amount of resources dedicated to the virtual machine (e.g., CPU, memory, network, etc.) is reduced so that the number of transferred pages will be higher than the contaminated pages.
Fig. 1 is a diagram illustrating a virtual machine migration architecture according to embodiment 1 of the present invention, which includes a source host 110 and a target host 120. Running virtual machine 1, virtual machine 2 … virtual machine n on the source host 110; running virtual machine a, virtual machine b … virtual machine N on the target host 120; the guest operating system OS operated by each virtual machine comprises Windows, Linux, Solaris and Mac OS; each virtual machine is accessed by one or more clients of one or more networks, including private networks (e.g., local area networks, wide area networks, intranets, etc.), public networks.
On the source host 110, virtual machine 1, virtual machine 2 … virtual machine n are connected to host migration agent 1 through virtual machine monitor 1; on the target host 120, virtual machine a, virtual machine b … virtual machine N is connected to host migration agent 2 through virtual machine monitor 2; wherein, the virtual machine monitor is used for simulating an underlying hardware platform; and the virtual machine resource operation parameter is reduced according to the indication of the host migration agent.
The source host 110 and the target host 120 are respectively connected to a host controller 130; of course, in some virtualization systems, the host controller 130 may reside in a designated host or be part of the source host 110, the target host 120.
The virtual machines are managed by the host controller 130. The host controller 130 includes a migration control agent 131 that is responsible for the migration of virtual machines over a network channel 132. In addition, the source host 110 and the target host 120 include a host migration agent 1 and a host migration agent 2 to assist the migration control agent 131 or directly handle the migration process.
The migrated virtual machine 140 migrates from the source host 110 to the target host 120, and the state of the virtual machine 140 will be transferred between the two hosts, during which transfer the virtual machine 140 is still running on the source host 110.
Fig. 2 is a flowchart of a resource management method according to embodiment 2 of the present invention, which includes the following steps:
step 201: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
step 202: and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
Further, the resource operation parameters include: CPU processing rate, memory storage rate, network transmission rate.
Further, if the state change rate is greater than or equal to the state transmission rate, the process of adjusting the resource operation parameters of the virtual machine is as follows:
and if the resource operation parameter is the CPU processing rate, dividing the CPU processing rate by a first preset constant, and taking a calculation result as the adjusted CPU processing rate.
Preferably, when the virtual machine is migrated according to the adjusted CPU processing rate, if the state change rate of the virtual machine is greater than or equal to the state transmission rate, the adjusted CPU processing rate is divided by the first preset constant, and a calculation result is used as the CPU processing rate after re-adjustment.
Further, if the state change rate is greater than or equal to the state transmission rate, the process of adjusting the resource operation parameters of the virtual machine is as follows:
if the resource operation parameter is the CPU processing rate, multiplying the CPU processing rate by a state change ratio to obtain a first CPU processing speed; wherein the state change ratio is a ratio of a state transmission rate of the virtual machine to a state change rate of the virtual machine.
Preferably, when the virtual machine is migrated according to the first CPU processing speed, if the state change rate of the virtual machine is greater than or equal to the state transmission rate, the first CPU processing speed is divided by a first preset constant, and a calculation result is used as a second CPU processing speed.
Fig. 3 is a flowchart of a resource management method according to embodiment 3 of the present invention, including the following steps:
step 301: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
step 302: judging whether the state change rate is greater than or equal to the state transmission rate, if so, executing step 303, otherwise, continuing to execute step 301;
step 303: dividing the CPU processing rate by a first preset constant, and taking a calculation result as the adjusted CPU processing rate;
the first preset constant may be flexibly set as required (e.g., 1, 2), and is not limited herein to limit the protection scope of the present embodiment.
Step 304: continuing to judge whether the state change rate is greater than or equal to the state transmission rate, if so, executing step 303; otherwise, go to step 305;
step 305: judging whether the migration is completed, if so, executing step 306; otherwise, go to step 301;
step 306: and (6) ending.
Fig. 4 is a flowchart of a resource management method according to embodiment 4 of the present invention, including the following steps:
step 401: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
step 402: judging whether the state change rate is greater than or equal to the state transmission rate, if so, executing a step 403, otherwise, continuing to execute the step 401;
step 403: multiplying the CPU processing rate by a state change ratio to obtain a first CPU processing speed;
wherein the state change ratio is a ratio of a state transmission rate of the virtual machine to a state change rate of the virtual machine.
For example, the CPU processing rate is adjusted by multiplying the current CPU processing rate by the ratio of the number of memory pages transferred to the number of memory pages contaminated.
Step 404: determining whether the state change rate is greater than or equal to the state transmission rate, if so, performing step 405; otherwise, go to step 407;
step 405: dividing the first CPU processing speed by a first preset constant, and taking a calculation result as a second CPU processing speed;
step 406: judging whether the state change rate is greater than or equal to the state transmission rate, if so, executing step 403, otherwise, executing step 407;
step 407: judging whether the migration is completed, if so, executing step 408; otherwise, go to step 401;
step 408: and (6) ending.
Fig. 5 is a flowchart of a resource management method according to embodiment 5 of the present invention, including the following steps:
step 501: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
step 502: judging whether the state change rate is greater than or equal to the state transmission rate, if so, executing a step 503, otherwise, continuing to execute the step 501;
step 503: multiplying the CPU processing rate by a state change ratio to obtain a first CPU processing speed;
wherein the state change ratio is a ratio of a state transmission rate of the virtual machine to a state change rate of the virtual machine.
For example, the CPU processing rate is adjusted by multiplying the current CPU processing rate by the ratio of the number of memory pages transferred to the number of memory pages contaminated.
Step 504: dividing the first CPU processing speed by a first preset constant, and taking a calculation result as a second CPU processing speed;
step 505: judging whether the state change rate is greater than or equal to the state transmission rate, if so, executing step 503, otherwise, executing step 506;
step 506: judging whether the migration is completed, if so, executing step 507; otherwise, go to step 501;
step 507: and (6) ending.
Fig. 6 is a structural diagram of a resource management device according to embodiment 6 of the present invention, which includes a processor adapted to implement various instructions; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor;
acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
Further, the resource operation parameters include: CPU processing rate, memory storage rate, network transmission rate.
Further, if the state change rate is greater than or equal to the state transmission rate, the process of adjusting the resource operation parameters of the virtual machine is as follows:
and if the resource operation parameter is the CPU processing rate, dividing the CPU processing rate by a first preset constant, and taking a calculation result as the adjusted CPU processing rate.
Preferably, when the virtual machine is migrated according to the adjusted CPU processing rate, if the state change rate of the virtual machine is greater than or equal to the state transmission rate, the adjusted CPU processing rate is divided by the first preset constant, and a calculation result is used as the CPU processing rate after re-adjustment.
The technical scheme provided by the embodiment of the invention is as follows: acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time; and if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine.
According to the technical scheme, the resource operation parameters of the virtual machine are adjusted, so that the state change rate is smaller than the state transmission rate, and the real-time rapid migration of the virtual machine is realized.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (6)
1. A method for resource management, comprising the steps of:
acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine,
the resource operating parameters include: the rate of processing by the CPU is,
if the state change rate is greater than or equal to the state transmission rate, the process of adjusting the resource operation parameters of the virtual machine is as follows:
if the resource operation parameter is the CPU processing rate, multiplying the CPU processing rate by a state change ratio to obtain a first CPU processing speed; wherein the state change ratio is a ratio of a state transmission rate of the virtual machine to a state change rate of the virtual machine.
2. The method of claim 1, wherein the resource operating parameters further comprise: memory storage rate, network transmission rate.
3. The method according to claim 1, wherein when the virtual machine is migrated according to the first CPU processing speed, if the state change rate of the virtual machine is greater than or equal to the state transfer rate, the first CPU processing speed is divided by a first preset constant, and a calculation result is used as a second CPU processing speed.
4. A resource management device comprising a processor adapted to implement instructions; a storage device adapted to store a plurality of instructions, the instructions adapted to be loaded and executed by the processor;
acquiring the state change rate and the state transmission rate of the virtual machine which is migrated in real time;
if the state change rate is greater than or equal to the state transmission rate, adjusting the resource operation parameters of the virtual machine,
the resource operating parameters include: the rate of processing by the CPU is,
if the state change rate is greater than or equal to the state transmission rate, the process of adjusting the resource operation parameters of the virtual machine is as follows:
if the resource operation parameter is the CPU processing rate, multiplying the CPU processing rate by a state change ratio to obtain a first CPU processing speed; wherein the state change ratio is a ratio of a state transmission rate of the virtual machine to a state change rate of the virtual machine.
5. The apparatus of claim 4, wherein the resource operating parameters further comprise: memory storage rate, network transmission rate.
6. The apparatus according to claim 4, wherein when the virtual machine is migrated according to the first CPU processing speed, if the state change rate of the virtual machine is greater than or equal to the state transfer rate, the first CPU processing speed is divided by a first preset constant, and a calculation result is used as a second CPU processing speed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710583289.8A CN107368349B (en) | 2017-07-17 | 2017-07-17 | Resource management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710583289.8A CN107368349B (en) | 2017-07-17 | 2017-07-17 | Resource management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107368349A CN107368349A (en) | 2017-11-21 |
CN107368349B true CN107368349B (en) | 2020-09-08 |
Family
ID=60307587
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710583289.8A Active CN107368349B (en) | 2017-07-17 | 2017-07-17 | Resource management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107368349B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109189545B (en) * | 2018-07-06 | 2021-03-30 | 烽火通信科技股份有限公司 | Implementation method and system for improving thermal migration reliability of virtual machine |
CN112783605B (en) * | 2021-01-27 | 2024-02-23 | 深信服科技股份有限公司 | Method, device, equipment and storage medium for thermomigration of virtual machine |
CN115454565A (en) * | 2022-07-29 | 2022-12-09 | 天翼云科技有限公司 | Data migration method and device of virtual machine, electronic equipment and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081552A (en) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | Method, device and system for transferring from physical machine to virtual machine on line |
CN103218260A (en) * | 2013-03-06 | 2013-07-24 | 中国联合网络通信集团有限公司 | Virtual machine migration method and device |
CN103365704A (en) * | 2012-03-26 | 2013-10-23 | ***通信集团公司 | Memory pre-copying method in virtual machine migration, device executing memory pre-copying method and system |
CN103685256A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Virtual machine migration management method, device and system |
CN103955399A (en) * | 2014-04-30 | 2014-07-30 | 华为技术有限公司 | Migrating method and device for virtual machine, as well as physical host |
CN104767643A (en) * | 2015-04-09 | 2015-07-08 | 喜舟(上海)实业有限公司 | Disaster recovery backup system based on virtual machine |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9323553B2 (en) * | 2013-09-13 | 2016-04-26 | International Business Machines Corporation | Reducing virtual machine suspension time in checkpoint system |
-
2017
- 2017-07-17 CN CN201710583289.8A patent/CN107368349B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081552A (en) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | Method, device and system for transferring from physical machine to virtual machine on line |
CN103365704A (en) * | 2012-03-26 | 2013-10-23 | ***通信集团公司 | Memory pre-copying method in virtual machine migration, device executing memory pre-copying method and system |
CN103218260A (en) * | 2013-03-06 | 2013-07-24 | 中国联合网络通信集团有限公司 | Virtual machine migration method and device |
CN103685256A (en) * | 2013-12-06 | 2014-03-26 | 华为技术有限公司 | Virtual machine migration management method, device and system |
CN103955399A (en) * | 2014-04-30 | 2014-07-30 | 华为技术有限公司 | Migrating method and device for virtual machine, as well as physical host |
CN104767643A (en) * | 2015-04-09 | 2015-07-08 | 喜舟(上海)实业有限公司 | Disaster recovery backup system based on virtual machine |
Also Published As
Publication number | Publication date |
---|---|
CN107368349A (en) | 2017-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9594590B2 (en) | Application migration with dynamic operating system containers | |
US8863138B2 (en) | Application service performance in cloud computing | |
US10768972B2 (en) | Managing virtual machine instances utilizing a virtual offload device | |
US9552233B1 (en) | Virtual machine migration using free page hinting | |
Nelson et al. | Fast Transparent Migration for Virtual Machines. | |
CN108694117B (en) | Method and device for managing test environment based on container technology | |
US9081612B2 (en) | Virtual machine control method and virtual machine | |
US9424067B2 (en) | Managing virtual machine instances utilizing an offload device | |
JP6564838B2 (en) | Multi-operating system operating method and apparatus based on Industrial Internet Operating System | |
CN107368349B (en) | Resource management method and device | |
US9268583B2 (en) | Migration of virtual machines with shared memory | |
CN103942087A (en) | Virtual machine thermal migration method, related device and cluster computing system | |
JP2013196604A (en) | Computer and band control method | |
JP6144639B2 (en) | Network control device, communication system, network control method, and network control program | |
CN111026500B (en) | Cloud computing simulation platform, and creation method, device and storage medium thereof | |
US9965311B2 (en) | Application of a pattern to inactive pages in guest memory | |
US20170024231A1 (en) | Configuration of a computer system for real-time response from a virtual machine | |
US20180246772A1 (en) | Method and apparatus for allocating a virtual resource in network functions virtualization network | |
US20130219040A1 (en) | Storage area network configuration of vitual fibre channel ports prior to client creation | |
US20170090965A1 (en) | Dirty Memory Tracking with Assigned Devices by Exitless Paravirtualization | |
KR101495069B1 (en) | Method for virtual desktop service based on iov nic and apparatus thereof | |
US20160373523A1 (en) | Profile management method and apparatus for running of virtual desktop in heterogeneous server | |
CN113127144A (en) | Processing method, processing device and storage medium | |
US20210004255A1 (en) | Vm performance guaranteeing system and vm performance guaranteeing method | |
CN111580935A (en) | Network communication method, device, equipment and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |