CN103412800A - Virtual machine warm backup method and equipment - Google Patents

Virtual machine warm backup method and equipment Download PDF

Info

Publication number
CN103412800A
CN103412800A CN2013103372285A CN201310337228A CN103412800A CN 103412800 A CN103412800 A CN 103412800A CN 2013103372285 A CN2013103372285 A CN 2013103372285A CN 201310337228 A CN201310337228 A CN 201310337228A CN 103412800 A CN103412800 A CN 103412800A
Authority
CN
China
Prior art keywords
state
virtual machine
machine
dirty data
host virtual
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.)
Granted
Application number
CN2013103372285A
Other languages
Chinese (zh)
Other versions
CN103412800B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310337228.5A priority Critical patent/CN103412800B/en
Publication of CN103412800A publication Critical patent/CN103412800A/en
Application granted granted Critical
Publication of CN103412800B publication Critical patent/CN103412800B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Retry When Errors Occur (AREA)

Abstract

An embodiment of the invention provides a virtual machine warm backup method and equipment, and relates to the field of information communication. Impacts on customer services during backup of a virtual machine can be effectively reduced, and usability of virtual machine services is improved. The method includes acquiring a dirty data volume generated by current services of a main virtual machine, comparing the dirty data with a first threshold value and a second threshold value, wherein the second threshold value is larger than the first threshold value, generating a check point according to a comparison result, and updating the state of a finite state machine according to the dirty data volume and a preset cycle time in the finite state machine so as to perform data warm backup, corresponding to the state of the finite state machine, on the generated check point of the main virtual machine according to the state of the finite state machine. The virtual machine warm backup method and equipment are applied to data warm backup of the virtual machine.

Description

A kind of virtual machine heat backup method and equipment
Technical field
The present invention relates to the information communication field, relate in particular to a kind of virtual machine heat backup method and equipment.
Background technology
Along with popularizing of Intel Virtualization Technology application, the high reliability of virtual machine becomes the emphasis of concern.The virtual machine backup technique, also referred to as virtual machine FT(Fault Tolerance, fault-tolerant), by means of virtual machine itself, can cross-platformly transplant, with characteristics such as bottom hardware have nothing to do, realize high-level efficiency, virtual machine fault tolerant mechanism cheaply, become one of important means that ensures the virtual machine high reliability.
Synchronous in order to realize data, the temporary transient strategy that stops virtual machine and service is adopted in the two-node cluster hot backup of traditional virtual machine, usually active and standby by Primary-Backup() the mode synchronizing virtual machine is at internal memory, CPU(Central Processing Unit, CPU (central processing unit)), I/O((Input/Output, I/O) change made of aspect.By host virtual machine, regularly produce the Checkpoint(checkpoint), then Checkpoint is sent to standby virtual machine with asynchronous system, simultaneously, host virtual machine is predicted with Speculative() mode carries out CLIENT PROGRAM, after standby virtual machine has been confirmed new Checkpoint, host virtual machine forwards normal executive mode to, and the CLIENT PROGRAM on host virtual machine is terminated during generating Checkpoint.Like this, between adjacent C heckpoint, producing the CLIENT PROGRAM of a large amount of dirty datas, will cause very long host virtual machine suspension time while generating Checkpoint, CLIENT PROGRAM can't be moved.In addition, for between adjacent C heckpoint, only producing the seldom CLIENT PROGRAM of dirty data, the few Checkpoint of frequent transmission quantity of information will be because of Dom U(virtual machine) and the Dom0(virtual machine management program) resource contention and affect the normal execution of CLIENT PROGRAM, cause two-node cluster hot backup performance and availability to be had a greatly reduced quality.
Summary of the invention
Embodiments of the invention provide a kind of virtual machine heat backup method and equipment, when realizing that data backup is synchronous, according to the dirty quantity generation checkpoint that virtual machine produces, data are carried out to Hot Spare, in the time of can effectively reducing like this virtual machine backup, on the impact of customer service, improved the availability of virtual machine business.
For achieving the above object, embodiments of the invention adopt following technical scheme:
First aspect, provide a kind of virtual machine heat backup method, comprising:
Obtain the dirty data amount that the host virtual machine current business produces;
Described dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of described host virtual machine, described Second Threshold is greater than described first threshold.
In conjunction with first aspect, in the first of first aspect mode in the cards, after the dirty data amount of obtaining described host virtual machine current business generation, described method also comprises:
According to the predetermined period in described dirty data amount or finite state machine state, upgrade the state of described finite state machine, so that according to described finite state machine state, the data thermal backup corresponding with the state of described finite state machine carried out in the checkpoint of the described host virtual machine of generation;
Wherein, the state of the state of described finite state machine dirty data amount of generation when meaning that described host virtual machine carries out data thermal backup.
In conjunction with the first of first aspect or first aspect mode in the cards, in the second of first aspect mode in the cards, described method also comprises:
In the last subnormal executing state of the checkpoint that generates described host virtual machine, copy in advance the cold page data of described host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
The checkpoint of the described host virtual machine of described generation comprises: the cold page data of host virtual machine described in described the first buffer zone is copied in described checkpoint, and the hot page data of host virtual machine described in described the second buffer zone is copied in described checkpoint.
In conjunction with the second of first aspect or first aspect mode in the cards, in the third mode in the cards of first aspect, described described dirty data amount and first threshold and Second Threshold are compared, and comprise according to the checkpoint that comparative result generates described host virtual machine:
If described dirty data amount is less than described first threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation is more than or equal to described first threshold and is less than described Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, and described the 3rd threshold value is greater than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and be less than described Second Threshold, generate the checkpoint of described host virtual machine.
The third mode in the cards in conjunction with first aspect or first aspect, in the 4th kind of mode in the cards of first aspect, the described state that upgrades finite state machine according to described dirty data amount, so that according to described finite state machine state, data thermal backup is carried out in the checkpoint of the described host virtual machine that generates and comprises:
If described dirty data amount is more than or equal to described first threshold and is less than described Second Threshold, the state of controlling finite state machine is initial state, and then when described finite state machine is initial state, data thermal backup is carried out in described checkpoint;
If described dirty data amount is less than described first threshold, the state of controlling described finite state machine is low dirty data state, and then extend described normal execution mode when described finite state machine is low dirty data state, thereby postponing described host virtual machine enters described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, the state of controlling described finite state machine is high dirty data state, and then when the state of described finite state machine is in described high dirty data state, if described dirty data amount is accumulated to described the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to described standby virtual machine by described cold migration pattern, enters described suspended state thereby postpone described host virtual machine.
The 4th kind of mode in the cards in conjunction with first aspect or first aspect, in the 5th kind of mode in the cards of first aspect, the described state that upgrades finite state machine according to described dirty data amount, so that, according to described finite state machine state, data thermal backup is carried out in the checkpoint that generates described host virtual machine and also comprises:
When the state of described finite state machine is described initial state, if described dirty data amount is less than described first threshold, controlling described finite state machine shifts as described low dirty data state through the first buffering state from described initial state, and then be while hanging down the dirty data state, to control described host virtual machine to extend described normal execution mode at described finite state machine state, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, when if described dirty data amount is more than or equal to described Second Threshold, controlling described finite state machine shifts as described high dirty data state through the second buffering state from described initial state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if described dirty data amount is less than described Second Threshold, control described finite state machine and shift as described initial state through the 3rd buffering state from described high dirty data state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described low dirty data state, when if described dirty data amount is more than or equal to first threshold, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the first buffering state, if described dirty data amount is more than or equal to described first threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the second buffering state, if described dirty data amount is less than described Second Threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the 3rd buffering state, if described dirty data amount is more than or equal to described Second Threshold, the state transitions of controlling described finite state machine is described high dirty data state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
Wherein, described the first buffering state is that described finite state machine shifts and is the buffering state of described low dirty data state from described initial state, described the second buffering state is that described finite state machine shifts and is the buffering state of described high dirty data state from described initial state, and described the 3rd buffering state is that described finite state machine shifts and is the buffering state of described initial state from described high dirty data state.
The 5th kind of mode in the cards in conjunction with first aspect or first aspect, in the 6th kind of mode in the cards of first aspect, the described state that upgrades described finite state machine according to the predetermined period in the finite state machine state, so that according to the state of described finite state machine, data thermal backup is carried out in the checkpoint of the described host virtual machine that generates and comprises:
When the state of described finite state machine is described low dirty data state, if described finite state machine is in the time of described low dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described high dirty data state, if described finite state machine is in the time of described high dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup.
Second aspect, provide a kind of equipment, comprising:
Acquiring unit, the dirty data amount produced be used to obtaining the host virtual machine current business;
The first processing unit, for described dirty data amount and first threshold and Second Threshold are compared, generate the checkpoint of described host virtual machine according to comparative result, described Second Threshold is greater than described first threshold.
In conjunction with second aspect, in the first of second aspect mode in the cards, after the dirty data amount of obtaining described host virtual machine current business generation, also comprise:
The second processing unit, for the predetermined period according to described dirty data amount or finite state machine state, upgrade the state of described finite state machine, so that according to described finite state machine state, the data thermal backup corresponding with described finite state machine carried out in the checkpoint of the described host virtual machine of generation;
Wherein, the state of the state of described finite state machine dirty data amount of generation when meaning that described host virtual machine carries out data thermal backup.
In conjunction with the first of second aspect or second aspect mode in the cards, in the second of second aspect mode in the cards, described the first processing unit also for:
In the last subnormal executing state of the checkpoint that generates described host virtual machine, copy in advance the cold page data of described host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
The cold page data of host virtual machine described in described the first buffer zone is copied in described checkpoint, and the hot page data of host virtual machine described in described the second buffer zone is copied in described checkpoint.
In conjunction with the second of second aspect or second aspect mode in the cards, in the third mode in the cards of second aspect, described the first processing unit specifically for:
If described dirty data amount is less than described first threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation is more than or equal to described first threshold and is less than described Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, and described the 3rd threshold value is greater than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and be less than described Second Threshold, generate the checkpoint of described host virtual machine.
In conjunction with the third mode in the cards of second aspect or second aspect, in the 4th kind of mode in the cards of first aspect, described the second processing unit is used for:
If described dirty data amount is more than or equal to described first threshold and is less than described Second Threshold, the state of controlling finite state machine is initial state, and then when described finite state machine is initial state, data thermal backup is carried out in described checkpoint;
If described dirty data amount is less than described first threshold, the state of controlling described finite state machine is low dirty data state, and then extend described normal execution mode when described finite state machine is low dirty data state, thereby postponing described host virtual machine enters described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, the state of controlling described finite state machine is high dirty data state, and then when the state of described finite state machine is in described high dirty data state, if described dirty data amount is accumulated to described the 3rd threshold value, suspend described host virtual machine, the dirty data of described host virtual machine is sent to described standby virtual machine by described cold migration pattern, enters described suspended state thereby postpone described host virtual machine.
In conjunction with the 4th kind of mode in the cards of second aspect or second aspect, in the 5th kind of mode in the cards of second aspect, described the second processing unit also for:
When the state of described finite state machine is described initial state, if described dirty data amount is less than described first threshold, controlling described finite state machine shifts as described low dirty data state through the first buffering state from described initial state, and then be while hanging down the dirty data state, to control described host virtual machine to extend described normal execution mode at described finite state machine state, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, when if described dirty data amount is more than or equal to described Second Threshold, controlling described finite state machine shifts as described high dirty data state through the second buffering state from described initial state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if described dirty data amount is less than described Second Threshold, control described finite state machine and shift as described initial state through the 3rd buffering state from described high dirty data state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described low dirty data state, when if described dirty data amount is more than or equal to first threshold, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the first buffering state, if described dirty data amount is more than or equal to described first threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the second buffering state, if described dirty data amount is less than described Second Threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the 3rd buffering state, if described dirty data amount is more than or equal to described Second Threshold, the state transitions of controlling described finite state machine is described high dirty data state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
Wherein, described the first buffering state is that described finite state machine shifts and is the buffering state of described low dirty data state from described initial state, described the second buffering state is that described finite state machine shifts and is the buffering state of described high dirty data state from described initial state, and described the 3rd buffering state is that described finite state machine shifts and is the buffering state of described initial state from described high dirty data state.
In conjunction with the 5th kind of mode in the cards of second aspect or second aspect, in the 6th kind of mode in the cards of first aspect, described the second processing unit also for:
When the state of described finite state machine is described low dirty data state, if described finite state machine is in the time of described low dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described high dirty data state, if described finite state machine is in the time of described high dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup.
The embodiment of the present invention provides a kind of virtual machine heat backup method and equipment, the dirty data amount produced by obtaining the host virtual machine current business, dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of host virtual machine, and according to the predetermined period of dirty data amount or finite state machine, upgrade the state of finite state machine, so that according to the finite state machine state, the data thermal backup corresponding with the state of finite state machine carried out in checkpoint to the host virtual machine that generates, can reduce the impact on customer service of virtual machine when backup, promoted the availability of virtual machine business.
The accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below will the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
A kind of virtual machine heat backup method schematic flow sheet that Fig. 1 provides for the embodiment of the present invention;
A kind of virtual machine heat backup method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention;
Virtual machine two-node cluster hot backup functional block diagram in a kind of prior art that Fig. 3 provides for the embodiment of the present invention;
In the prior art that Fig. 4 provides for the embodiment of the present invention, active and standby virtual machine carries out the sequential block diagram of data thermal backup;
The sequential comparison diagram of the executing state of the executing state of CLIENT PROGRAM and CLIENT PROGRAM of the present invention in the prior art that Fig. 5 provides for the embodiment of the present invention;
The sequential comparison diagram of the executing state of the executing state of CLIENT PROGRAM and CLIENT PROGRAM of the present invention in the prior art that Fig. 6 provides for the embodiment of the present invention;
The sequential comparison diagram of the executing state of the executing state of CLIENT PROGRAM and CLIENT PROGRAM of the present invention in the prior art that Fig. 7 provides for the embodiment of the present invention;
A kind of state transitions and the dirty data amount of host virtual machine or the graph of a relation of predetermined period that Fig. 8 provides for the embodiment of the present invention;
A kind of device structure schematic diagram that Fig. 9 provides for the embodiment of the present invention;
A kind of device structure schematic diagram that Figure 10 provides for the embodiment of the present invention;
A kind of device structure schematic diagram that Figure 11 provides for the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of virtual machine heat backup method, as shown in Figure 1, comprising:
101, equipment obtains the dirty data amount that the host virtual machine current business produces.
Wherein, this equipment can be computing machine, and host virtual machine and standby virtual machine operate in respectively on two computing machines.Standby virtual machine is used for the data on host virtual machine are carried out to Hot Spare, usually by (Primary-Backup, standby usage) scheme, is realized, to prevent that host virtual machine lost efficacy because of the virtual machine that computer hardware damages and software fault causes and service pauses.
Wherein, dirty data refers to the data of host virtual machine latest update, comprises the data of new change or the data that newly increase etc.
102, equipment compares dirty data amount and first threshold and Second Threshold, according to comparative result, generates the checkpoint of host virtual machine, and Second Threshold is greater than first threshold.
Exemplary, if the dirty data amount that host virtual machine produces is less than first threshold, postpone generating the Checkpoint(checkpoint of host virtual machine), until the dirty data amount of accumulation is more than or equal to first threshold and is less than Second Threshold, controlling host virtual machine enters suspended state and generates Checkpoint, the interference that can avoid repeatedly the less Checkpoint of transmission information amount to cause to CLIENT PROGRAM;
If the dirty data amount is more than or equal to Second Threshold, postpone generating the Checkpoint of host virtual machine, until the dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend host virtual machine, checkpoint is sent to standby virtual machine by cold migration pattern, then control host virtual machine and enter Speculative(prediction) executing state, with the long-time hang-up of avoiding repeatedly generating the virtual machine that a large amount of dirty data Checkpoint cause, cause CLIENT PROGRAM to move;
If the dirty data amount of host virtual machine accumulation is more than or equal to first threshold, and is less than Second Threshold, generate the checkpoint of host virtual machine and carry out the data Hot Spare, namely enter normal hang-up virtual machine, normal execution mode and prediction executing state.
Wherein, Second Threshold is greater than first threshold, and the 3rd threshold value is greater than Second Threshold.
The embodiment of the present invention provides a kind of virtual machine heat backup method, the dirty data amount produced by obtaining the host virtual machine current business, dirty data amount and first threshold and Second Threshold are compared, Second Threshold is greater than first threshold, according to comparative result, generate the checkpoint of host virtual machine, in the time of can effectively reducing the virtual machine backup, on the impact of customer service, promoted the availability of virtual machine business.
Further embodiment of this invention provides a kind of virtual machine heat backup method, as shown in Figure 2, comprising:
201, equipment obtains the dirty data amount that the host virtual machine current business produces.
Wherein, in computer science, virtual machine refers to and can as real machine, realize by the software of the computing machine of working procedure.
The virtual machine double-machine standby technology, also be virtual machine FT(Fault Tolerance, fault-tolerant) technology, there are host virtual machine and standby virtual machine, host virtual machine and standby virtual machine operate in two different computing machines.Wherein, standby virtual machine is auxiliary virtual machine, host virtual machine receives and sends network packet, Hypervisor(supervisory routine in equipment) host virtual machine and standby virtual machine are managed, Hypervisor regularly produces the Checkpoint(checkpoint of host virtual machine), and this Checkpoint is sent to standby virtual machine with asynchronous system, so that carrying out Hot Spare by the data of host virtual machine, standby virtual machine keeps virtual synchronous, while preventing that host virtual machine from breaking down, standby virtual machine will be in the situation that take over and run application from host virtual machine without interrupting.
Concrete, in prior art, shielded host virtual machine is when the business of execution CLIENT PROGRAM, when host virtual machine timing suspended state, Hypervisor carries out the Checkpoint that generates host virtual machine, this Checkpoint can comprise host virtual machine CPU(Central Processing Unit, processor) state, memory information and peripheral hardware state, and Checkpoint is write to buffer zone, at host virtual machine, predict with Speculative() mode is while carrying out, Hypervisor is sent to standby virtual machine by this Checkpoint, then control host virtual machine and enter normal execution mode, being illustrated in figure 3 and using the Primary-Backup(standby usage) scheme realizes virtual machine two-node cluster hot backup functional block diagram, as shown in Figure 4, for data thermal backup sequential block diagram in the Primary-Backup prior art, the state that comprises host virtual machine and standby virtual machine different phase when data backup, executing state with CLIENT PROGRAM on host virtual machine.
Exemplary, suppose that host virtual machine is at operation Kernel Compile(recompile kernel) during business, in normal implementation, can produce dirty data, wherein, dirty data refers to the data of host virtual machine latest update, comprises the data of new change or the data that newly increase etc.
202, equipment compares dirty data amount and first threshold and Second Threshold, when the dirty data amount is less than first threshold, enter step 203, when the dirty data amount is more than or equal to Second Threshold, enter step 204, when the dirty data amount is more than or equal to first threshold, and while being less than Second Threshold, enter step 206.
Concrete, for the management of active and standby virtual machine, can manage control by Hypervisor, also be the Hypervisor.Hypervisor can monitor each interval host virtual machine dirty data EDD(Epoch Dirty Data) the generation total amount, and dirty data amount and first threshold LT and Second Threshold HT are compared.Wherein, Second Threshold is greater than first threshold, and the 3rd threshold value is greater than Second Threshold.
If 203 dirty data amounts are less than first threshold, equipment postpones generating the checkpoint of host virtual machine, until the dirty data amount of accumulation is more than or equal to first threshold and is less than Second Threshold, generates the checkpoint of host virtual machine, then, enters step 208.
Exemplary, when the dirty data amount EDD produced in normal implementation when host virtual machine is less than first threshold, the Hypervisor supervisory routine can postpone generating the Checkpoint of host virtual machine, skip and hang up virtual machine and local copy, namely skip and generate the Checkpoint operation, extend normal execution mode, until host virtual machine is when the dirty data amount of normal execution mode accumulation is more than or equal to first threshold and is less than Second Threshold, carry out and hang up virtual machine, the Checkpoint of Hypervisor supervisory routine generating virtual machines, then control host virtual machine and enter Speculative execution and normal execution mode, and the Checkpoint that will comprise dirty data is sent to standby virtual machine, with avoid host virtual machine in Speculative carries out to the standby virtual machine less Checkpoint of transmission information amount repeatedly, to CLIENT PROGRAM, cause interference.
As shown in Figure 5, in prior art the state of CLIENT PROGRAM as the CLIENT PROGRAM sequential chart 1. as shown in, the dirty data amount produced when host virtual machine in the present embodiment is lower than the processing sequential chart of first threshold, with CLIENT PROGRAM, 1. contrast, as the CLIENT PROGRAM sequential chart 2. as shown in, can effectively reduce the impact of host virtual machine when backup virtual machine on customer service.
Optionally, the Hypervisor supervisory routine is before suspended state generates the Checkpoint of host virtual machine at host virtual machine, in the last subnormal implementation of suspended state, by the cold page data of Cold pages(in host virtual machine) copy in advance the first buffer zone to, and by the hot page data of Hot pages(in host virtual machine) pre-stored to the second buffer zone, when generating Checkpoint, Hot pages in the second buffer zone of host virtual machine and the first buffer zone Cold pages are copied in Checkpoint, to reduce the virtual machine suspension time, 1. 4. the sequential chart of CLIENT PROGRAM as shown in Figure 6 contrast with Normal Backups state sequential chart.
Wherein, Cold pages can be the page unlikely be modified again after being modified and revising, and Hot pages can be the higher page of Modification Frequency;
Optionally, configuration the first buffer zone, the second buffer zone in internal memory, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages();
Optionally, in internal memory, configure buffer zone, this buffer zone comprises two subareas: the first buffer zone, the second buffer zone, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages().
If 204 dirty data amounts are more than or equal to Second Threshold, equipment postpones generating the checkpoint of host virtual machine, until the dirty data amount of accumulation reaches the 3rd threshold value, generates checkpoint and suspends host virtual machine, and the 3rd threshold value is greater than described Second Threshold.
Exemplary, when the dirty data amount EDD produced in normal implementation when host virtual machine is greater than Second Threshold, the Hypervisor supervisory routine can postpone generating the checkpoint of host virtual machine, namely skip pending operation and the local copy operation of host virtual machine, extend normal execution mode, until host virtual machine is accumulated in normal implementation dirty data amount while arriving the 3rd threshold value, is suspended host virtual machine, wherein, the 3rd threshold value is greater than Second Threshold.
As shown in Figure 7, the normal condition of existing customer's program as the CLIENT PROGRAM sequential chart 1. as shown in, the dirty data amount produced when host virtual machine in the present embodiment is higher than the processing sequential chart of the 3rd threshold value, with CLIENT PROGRAM 1. to such as the CLIENT PROGRAM sequential chart 3. shown in, can effectively reduce the impact of host virtual machine when backup host virtual machine on customer service.
205, equipment is sent to standby virtual machine by checkpoint by cold migration pattern, then enters step 209.
Exemplary, after the Hypervisor supervisory routine is controlled and is suspended virtual machine, once cold migration is carried out in the checkpoint of host virtual machine, these data comprise CPU state, memory information and the peripheral hardware state of host virtual machine, simultaneously the dirty data of accumulation is included in Checkpoint and is sent to standby virtual machine, with the Checkpoint that avoids repeatedly generating a large amount of dirty datas, cause the long-time hang-up of host virtual machine, cause CLIENT PROGRAM to move, then recover host virtual machine and enter the Speculative executing state, then enter normal execution mode.
If 206 dirty data amounts are more than or equal to first threshold, and are less than Second Threshold, equipment generates the checkpoint of host virtual machine, then enters step 207.
Exemplary, if the dirty data amount that the host virtual machine normal execution mode produces is more than or equal to first threshold LT, and be less than Second Threshold HT, Hypervisor supervisory routine control virtual machine carries out data thermal backup, be that host virtual machine carry out to be hung up virtual machine, Speculative carries out and normal execution mode, namely the executive routine sequential chart as shown in Figure 5 the program sequential chart 1. shown in.
If 207 dirty data amounts are more than or equal to first threshold and are less than Second Threshold, the state of equipment control finite state machine is initial state, and then when finite state machine is initial state, data thermal backup is carried out in checkpoint.
Wherein, FSM(Finite State Machine, finite state machine), refer to that in digital circuitry a kind of very important sequential logical circuit module refers to export the sequential logical circuit that depends on past importation and current importation.Finite state machine claims again finite-state automata or is called for short state machine, means between limited state and these states the line number models such as transfer action.Finite state machine also contains one group of register with " memory " function, and the function of these registers is internal states of memory finite state machine, and they often are called as status register.In finite state machine, the next state of status register is not only relevant with input signal, but also relevant with the current state of this register.
Finite state machine, in the FT tolerant system, can record the state of FT system, follows the trail of the FT system state change, utilizes trigger condition to control the FT system state and shifts.
The Hypervisor supervisory routine can be obtained the dirty data total amount that host virtual machine produces in each interval from host virtual machine.When if dirty data amount EDD is more than or equal to first threshold LT and is less than Second Threshold HT, if current importation, dirty data amount LT≤EDD<HT, the state of finite state machine is the SN(initial state), the Hypervisor supervisory routine is carried out data thermal backup when generating the checkpoint of host virtual machine, namely implementation such as CLIENT PROGRAM sequential chart are 1..
If 208 dirty data amounts are less than first threshold, the state of equipment control finite state machine is low dirty data state, and then is prolongation normal execution mode while hanging down the dirty data state at finite state machine, enters suspended state thereby postpone host virtual machine.
Exemplary, when finite state machine obtains current input quantity, the dirty data amount of host virtual machine is less than first threshold, be EDD<LT, the state of finite state machine is the low dirty data state of state SL(), when namely the dirty data amount of host virtual machine is less than first threshold, Hypervisor postpones generating the Checkpoint of host virtual machine, extend the normal execution mode of host virtual machine, enter data thermal backup thereby postpone host virtual machine, namely carry out CLIENT PROGRAM as sequential chart 2. as shown in.
If 209 dirty data amounts are more than or equal to Second Threshold, the state of equipment control finite state machine is high dirty data state, and then when the state of finite state machine is in high dirty data state, if the dirty data amount is accumulated to the 3rd threshold value, generate checkpoint and suspend host virtual machine, checkpoint is sent to standby virtual machine by cold migration pattern, enters suspended state thereby postpone host virtual machine.
Exemplary, when finite state machine obtains current input, the dirty data amount of host virtual machine is more than or equal to Second Threshold, and namely during EDD >=HT, the state of finite state machine is high dirty data state, when the dirty data amount is accumulated to the 3rd threshold value, the control host virtual machine suspends, and by the mode of cold migration, the host virtual machine data is sent to standby virtual machine, enters data thermal backup thereby postpone host virtual machine, namely postpone to enter suspended state, avoid causing long-time hang-up of virtual machine to cause CLIENT PROGRAM to move.Namely carry out the CLIENT PROGRAM sequential chart 3. shown in.
Optionally, if the dirty data amount of host virtual machine is more than or equal to first threshold and is less than Second Threshold, while making the state of finite state machine be initial state, if being the dirty data amount, the data of the current renewal of host virtual machine are less than first threshold, controlling finite state machine shifts as low dirty data state through the first buffering state from initial state, and then the control host virtual machine extends normal execution mode when the finite state machine state is low dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup.
Wherein, the first buffering state TNL, be the buffering state of finite state machine from initial state SN to low dirty data platform SL.When finite state machine shifts as low dirty data state SL from initial state SN, be that finite state machine is input as LT≤EDD<HT initial state in the past, current EDD<LT the first buffering state that is input as, the next state of finite state machine is low dirty data state SL so, thereby make host virtual machine extend normal execution mode, process when namely carrying out the dirty data amount and being less than first threshold LT, enter suspended state and carry out data thermal backup thereby postpone host virtual machine.
Optionally, if the dirty data amount of host virtual machine is more than or equal to first threshold and is less than Second Threshold, while making the state of finite state machine be initial state, if the data of the current renewal of host virtual machine are the dirty data amount while being more than or equal to Second Threshold, controlling finite state machine shifts as high dirty data state through the second buffering state from initial state, and then the control host virtual machine extends normal execution mode when finite state machine is high dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup.
Wherein, the second buffering state TNH, be the buffering state of finite state machine from initial state SN to high dirty data state SH.When finite state machine shifts as high dirty data state SH from initial state SN, be that finite state machine is input as LT≤EDD<HT initial state in the past, current EDD >=HT the second buffering state that is input as, the next state of finite state machine is high dirty data state SH so, thereby make host virtual machine extend normal execution mode, when the dirty data amount is greater than the 3rd threshold value, suspend virtual machine, the mode of the dirty data amount of host virtual machine accumulation by cold migration is sent to for virtual machine, carries out data thermal backup thereby the delay host virtual machine enters suspended state.
Optionally, if the dirty data amount of host virtual machine is more than or equal to Second Threshold, while making the state of finite state machine be high dirty data state, if being the dirty data amount, the data of the current renewal of host virtual machine are less than Second Threshold, control finite state machine and shift as initial state through the 3rd buffering state from high dirty data state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
Wherein, the 3rd buffering state THN is the buffering state of finite state machine from high dirty data state SH to initial state SN.When finite state machine shifts as initial state SN from high dirty data state SH, be input as in the past EDD >=HT, the current EDD<HT that is input as, the next state of finite state machine is initial state SN so, carries out data thermal backup thereby control virtual machine.
Optionally, if the dirty data amount of host virtual machine is less than first threshold, the state that makes finite state machine is while hanging down the dirty data state, if the data of the current renewal of host virtual machine are the dirty data amount while being more than or equal to first threshold, control finite state machine and shift as initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
Concrete, when finite state machine is input as low dirty data state EDD<LT in the past, current while being input as EDD >=LT, the next state of finite state machine is initial state SN so, thereby makes host virtual machine carry out data thermal backup.
Optionally, if the dirty data amount of host virtual machine is less than state that first threshold makes finite state machine while being the first buffering state, if being the dirty data amount, the data of the current renewal of host virtual machine are more than or equal to first threshold, the state transitions of controlling finite state machine is initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
Concrete, the state when the finite state machine past is the first buffering state TNL, namely is input as in the past EDD<LT, and current while being input as EDD >=LT, the state transitions of controlling finite state machine is initial state SN, carries out data thermal backup so that control virtual machine.
Optionally, if the dirty data amount of host virtual machine is more than or equal to state that Second Threshold makes finite state machine while being the second buffering state, if being the dirty data amount, the data of the current renewal of host virtual machine are less than Second Threshold, the state transitions of controlling finite state machine is initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
Concrete, when the finite state machine past state is the second buffering state TNH, namely be input as in the past EDD >=HT, current while being input as EDD<HT, the next state of finite state machine is initial state SN, carries out data thermal backup thereby control virtual machine.
Optionally, if the dirty data amount of host virtual machine is less than state that Second Threshold makes finite state machine while being the 3rd buffering state, if being the dirty data amount, the data of the current renewal of host virtual machine are more than or equal to Second Threshold, the state transitions of controlling finite state machine is high dirty data state, and then the control host virtual machine extends normal execution mode when finite state machine is high dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup.
Concrete, the finite state machine past state is the 3rd buffering state THN, namely be input as in the past EDD<HT, current EDD >=the HT that is input as, the next state of finite state machine is high dirty data state SH so, thereby make the finite states machine control host virtual machine extend normal execution mode, when the dirty data amount reaches the 3rd threshold value, suspend virtual machine, by cold migration pattern, host virtual machine dirty data amount is sent to standby virtual machine, thereby the delay host virtual machine enters suspended state and carries out data thermal backup, has improved high availability and the high-performance of virtual machine business.
Optionally, when the state of finite state machine is low dirty data state, arrive predetermined period if finite state machine is in the time of low dirty data state, controlling the finite state machine transfer is initial state, and then when finite state machine is initial state, carries out data thermal backup.
Concrete, when the state of finite state machine is low dirty data state SL, be that host virtual machine is in normal execution mode, if be in, arrive the Epoch(time threshold interval time of this normal execution mode), in long-time, the data of host virtual machine are not backuped in standby virtual machine, the state transitions of finite state machine is initial state, carries out data thermal backup thereby make host virtual machine enter suspended state.
Optionally, when the state of finite state machine is high dirty data state, if finite state machine is in the time of high dirty data state and arrives predetermined period, control finite state machine and shift as initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
Concrete, when the state of finite state machine is high dirty data state SH, be that host virtual machine is in halted state, if be in, arrive the Epoch(time threshold interval time of halted state), in long-time, the data of host virtual machine are not backuped in standby virtual machine, the state transitions of finite state machine is initial state, carries out data thermal backup thereby make host virtual machine enter suspended state.
By above-mentioned explanation, there are 6 finite states in finite state machine, the dirty data amount of the transfer of these 6 states and host virtual machine or the graph of a relation of predetermined period as shown in Figure 8, make supervisory routine to the checkpoint of host virtual machine, carry out data thermal backup according to the state of finite state machine.
The embodiment of the present invention provides a kind of virtual machine heat backup method, the dirty data amount produced by obtaining the host virtual machine current business, dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of host virtual machine, and according to the predetermined period of dirty data amount or finite state machine, upgrade the state of finite state machine, so that according to the state of finite state machine, data thermal backup is carried out in the checkpoint of the host virtual machine of generation, in the time of can effectively reducing the virtual machine backup, on the impact of customer service, promoted the availability of virtual machine business.
Further embodiment of this invention provides a kind of equipment 01, as shown in Figure 9, comprising:
Acquiring unit 011, the dirty data amount produced be used to obtaining the host virtual machine current business.
The first processing unit 012, for dirty data amount and first threshold and Second Threshold are compared, generate the checkpoint of host virtual machine according to comparative result, Second Threshold is greater than first threshold.
Optionally, as shown in figure 10, after the dirty data amount of obtaining described host virtual machine current business generation, can also comprise:
The second processing unit 013, for the predetermined period according to dirty data amount or finite state machine state, upgrade the state of finite state machine, so that according to the state of finite state machine, the data thermal backup corresponding with finite state machine carried out in the checkpoint of the host virtual machine of generation;
Wherein, the state of the state of finite state machine dirty data amount of generation when meaning that host virtual machine carries out data thermal backup.
Optionally, the first processing unit 012 can also for:
In the last subnormal executing state of the checkpoint that generates host virtual machine, copy in advance the cold page data of host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
Optionally, configuration the first buffer zone, the second buffer zone in internal memory, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages();
Optionally, in internal memory, configure buffer zone, this buffer zone comprises two subareas: the first buffer zone, the second buffer zone, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages();
The cold page data of host virtual machine in the first buffer zone is copied in checkpoint, and the hot page data of host virtual machine in the second buffer zone is copied in checkpoint.
Further, the first processing unit 012 can also be specifically for:
If the dirty data amount is less than first threshold, postpone generating the checkpoint of host virtual machine, until the dirty data amount of accumulation is more than or equal to first threshold and is less than Second Threshold, generate the checkpoint of host virtual machine;
If the dirty data amount is more than or equal to Second Threshold, postpone generating the checkpoint of host virtual machine, until the dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend host virtual machine, checkpoint is sent to standby virtual machine by cold migration pattern, and the 3rd threshold value is greater than Second Threshold;
If the dirty data amount is more than or equal to first threshold, and be less than Second Threshold, generate the checkpoint of host virtual machine.
Further, the second processing unit 013 can for:
If the dirty data amount is more than or equal to first threshold and is less than Second Threshold, the state of controlling finite state machine is initial state, and then when finite state machine is initial state, data thermal backup is carried out in checkpoint;
If the dirty data amount is less than first threshold, the state of controlling finite state machine is low dirty data state, and then when finite state machine is low dirty data state, extends normal execution mode, enters suspended state thereby postpone host virtual machine;
If the dirty data amount is more than or equal to Second Threshold, the state of controlling finite state machine is high dirty data state, and then when the state of finite state machine is in high dirty data state, if the dirty data amount is accumulated to the 3rd threshold value, generate checkpoint and suspend host virtual machine, checkpoint is sent to standby virtual machine by cold migration pattern, enters suspended state thereby postpone host virtual machine.
Further, the second processing unit 013 can also for:
When the state of finite state machine is initial state, if the dirty data amount is less than first threshold, controlling finite state machine shifts as low dirty data state through the first buffering state from initial state, and then the control host virtual machine extends normal execution mode when the finite state machine state is low dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup;
When the state of finite state machine is initial state, when if the dirty data amount is more than or equal to Second Threshold, controlling finite state machine shifts as high dirty data state through the second buffering state from initial state, and then the control host virtual machine extends normal execution mode when finite state machine is high dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup;
When the state of finite state machine is high dirty data state, if the dirty data amount is less than Second Threshold, control finite state machine and shift as initial state through the 3rd buffering state from high dirty data state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup;
When the state of finite state machine is low dirty data state, if when the dirty data amount is more than or equal to first threshold, controls finite state machine and shift as initial state, and then to controlling host virtual machine, carry out data thermal backup when finite state machine is initial state;
When the state of finite state machine was the first buffering state, if the dirty data amount is more than or equal to first threshold, the state transitions of controlling finite state machine was initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup;
When the state of finite state machine was the second buffering state, if the dirty data amount is less than Second Threshold, the state transitions of controlling finite state machine was initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup;
When the state of finite state machine is the 3rd buffering state, if the dirty data amount is more than or equal to Second Threshold, the state transitions of controlling finite state machine is high dirty data state, and then the control host virtual machine extends normal execution mode when finite state machine is high dirty data state, thereby postpone to enter suspended state, so that host virtual machine carries out data thermal backup;
Wherein, the first buffering state is that finite state machine shifts the buffering state for low dirty data state from initial state, the second buffering state is that finite state machine shifts and is the buffering state of high dirty data state from initial state, and the 3rd buffering state is that finite state machine shifts and is the buffering state of initial state from high dirty data state.
Optionally, the second processing unit 013 can also for:
When the state of finite state machine is low dirty data state, if being in the time of low dirty data state, finite state machine arrives predetermined period, controlling the finite state machine transfer is initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup;
When the state of finite state machine is high dirty data state, if being in the time of high dirty data state, finite state machine arrives predetermined period, control finite state machine and shift as initial state, and then when finite state machine is initial state, host virtual machine is carried out to data thermal backup.
The embodiment of the present invention provides a kind of equipment, the dirty data amount produced by obtaining the host virtual machine current business, dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of host virtual machine, and according to the predetermined period of dirty data amount or finite state machine, upgrade the state of finite state machine, so that according to the state of finite state machine, data thermal backup is carried out in the checkpoint that generates host virtual machine, in the time of can effectively reducing the virtual machine backup, on the impact of customer service, promoted the availability of virtual machine business.
Further embodiment of this invention provides a kind of equipment 02, as shown in figure 11, comprising:
Processor (Processor) 021, communication interface (Communications Interface) 022, storer (Memory) 023, communication bus 024.
Processor 021, communication interface 022, storer 023 completes mutual communication by communication bus 024.
Communication interface 022, for net element communication.
Processor 021, for executive routine 025, specifically can carry out the correlation step in above-mentioned Fig. 1 or embodiment of the method shown in Figure 2.
Particularly, program 025 can comprise program code, and program code comprises computer-managed instruction.
Processor 021 may be a central processor CPU (Central Processing Unit), or be configured to implement one or more integrated circuit of the embodiment of the present invention or specific integrated circuit ASIC(Application Specific Integrated Circuit).
Storer 023 is be used to depositing program 025, and storer 023 may comprise high-speed RAM (Random Access Memory) storer, also may also comprise nonvolatile memory (Non-volatile Memory), for example at least one magnetic disk memory.Program 025 specifically can comprise:
Acquiring unit, the dirty data amount produced be used to obtaining the host virtual machine current business;
The first processing unit, for dirty data amount and first threshold and Second Threshold are compared, generate the checkpoint of host virtual machine according to comparative result, Second Threshold is greater than first threshold.
Further, can also comprise:
The second processing unit, for the predetermined period according to dirty data amount or finite state machine state, upgrade the state of finite state machine, so that according to the state of finite state machine, the data thermal backup corresponding with finite state machine carried out in the checkpoint of the host virtual machine of generation;
Wherein, the state of the state of finite state machine dirty data amount of generation when meaning that host virtual machine carries out data thermal backup.
Optionally, can also comprise:
In the last subnormal executing state of the checkpoint that generates host virtual machine, copy in advance the cold page data of host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
Optionally, configuration the first buffer zone, the second buffer zone in internal memory, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages();
Optionally, in internal memory, configure buffer zone, this buffer zone comprises two subareas: the first buffer zone, the second buffer zone, wherein, the first buffer zone is for storing the cold page data of Cold pages(), the second buffer zone is for storing the hot page data of Hot pages();
The cold page data of host virtual machine in the first buffer zone is copied in checkpoint, and the hot page data of host virtual machine in the second buffer zone is copied in checkpoint.
In program 025 specific implementation of each module can referring to Fig. 3 or embodiment illustrated in fig. 4 in corresponding module, be not repeated herein.
The embodiment of the present invention provides a kind of equipment, the dirty data amount produced by obtaining the host virtual machine current business, dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of host virtual machine, and according to the predetermined period of dirty data amount or finite state machine, upgrade the state of finite state machine, so that according to the state of finite state machine, data thermal backup is carried out in the checkpoint of the host virtual machine of generation, in the time of can effectively reducing the virtual machine backup, on the impact of customer service, promoted the availability of virtual machine business.
In several embodiment that the application provides, should be understood that disclosed equipment and method can realize by another way.For example, apparatus embodiments described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual the realization, other dividing mode can be arranged, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
In addition, in equipment and system in each embodiment of the present invention, each functional unit can be integrated in a processing unit, can be also that the independent physics of unit comprises, also can be integrated in a unit two or more unit.And each above-mentioned unit both can adopt the form of hardware to realize, the form that also can adopt hardware to add SFU software functional unit realizes.
The all or part of step that realizes said method embodiment can complete by the hardware that programmed instruction is correlated with, and aforesaid program can be stored in a computer read/write memory medium, and this program, when carrying out, is carried out the step that comprises said method embodiment; And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read Only Memory, abbreviation ROM), the various media that can be program code stored such as random access memory (Random Access Memory is called for short RAM), magnetic disc or CD.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.

Claims (14)

1. a virtual machine heat backup method, is characterized in that, comprising:
Obtain the dirty data amount that the host virtual machine current business produces;
Described dirty data amount and first threshold and Second Threshold are compared, according to comparative result, generate the checkpoint of described host virtual machine, described Second Threshold is greater than described first threshold.
2. method according to claim 1, is characterized in that, after the dirty data amount of obtaining described host virtual machine current business generation, described method also comprises:
According to the predetermined period in described dirty data amount and finite state machine, upgrade the state of described finite state machine, so that according to the state of described finite state machine, the data thermal backup corresponding with the state of described finite state machine carried out in the checkpoint of the described host virtual machine that generates;
Wherein, the state of the state of described finite state machine dirty data amount of generation when meaning that described host virtual machine carries out data thermal backup.
3. method according to claim 1 and 2, is characterized in that, described method also comprises:
In the last subnormal executing state of the checkpoint that generates described host virtual machine, copy in advance the cold page data of described host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
The checkpoint of the described host virtual machine of described generation comprises: the cold page data of host virtual machine described in described the first buffer zone is copied in described checkpoint, and the hot page data of host virtual machine described in described the second buffer zone is copied in described checkpoint.
4. method according to claim 3, is characterized in that, described described dirty data amount and first threshold and Second Threshold compared, and the checkpoint that generates described host virtual machine according to comparative result comprises:
If described dirty data amount is less than described first threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation is more than or equal to described first threshold and is less than described Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, and described the 3rd threshold value is greater than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and be less than described Second Threshold, generate the checkpoint of described host virtual machine.
5. according to the described method of claim 2 to 4 any one, it is characterized in that, the described state that upgrades finite state machine according to described dirty data amount, so that according to the state of described finite state machine, carry out data thermal backup to the checkpoint of the described host virtual machine that generates and comprise:
If described dirty data amount is more than or equal to described first threshold and is less than described Second Threshold, the state of controlling described finite state machine is initial state, and then when described finite state machine is initial state, data thermal backup is carried out in described checkpoint;
If described dirty data amount is less than described first threshold, the state of controlling described finite state machine is low dirty data state, and then extend described normal execution mode when described finite state machine is low dirty data state, thereby postponing described host virtual machine enters described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, the state of controlling described finite state machine is high dirty data state, and then when the state of described finite state machine is in high dirty data state, if described dirty data amount is accumulated to described the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to described standby virtual machine by described cold migration pattern, enters described suspended state thereby postpone described host virtual machine.
6. method according to claim 5, is characterized in that, the described state that upgrades finite state machine according to described dirty data amount so that according to the state of described finite state machine, carries out data thermal backup to the checkpoint of the described host virtual machine that generates and also comprises:
When the state of described finite state machine is described initial state, if described dirty data amount is less than described first threshold, controlling described finite state machine shifts as described low dirty data state through the first buffering state from described initial state, and then be while hanging down the dirty data state, to control described host virtual machine to extend described normal execution mode at described finite state machine state, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, when if described dirty data amount is more than or equal to described Second Threshold, controlling described finite state machine shifts as described high dirty data state through the second buffering state from described initial state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if described dirty data amount is less than described Second Threshold, control described finite state machine and shift as described initial state through the 3rd buffering state from described high dirty data state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described low dirty data state, when if described dirty data amount is more than or equal to first threshold, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the first buffering state, if described dirty data amount is more than or equal to described first threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the second buffering state, if described dirty data amount is less than described Second Threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the 3rd buffering state, if described dirty data amount is more than or equal to described Second Threshold, the state transitions of controlling described finite state machine is described high dirty data state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
Wherein, described the first buffering state is that described finite state machine shifts and is the buffering state of described low dirty data state from described initial state, described the second buffering state is that described finite state machine shifts and is the buffering state of described high dirty data state from described initial state, and described the 3rd buffering state is that described finite state machine shifts and is the buffering state of described initial state from described high dirty data state.
7. according to the described method of claim 5 or 6, it is characterized in that, the described state that upgrades described finite state machine according to the predetermined period in finite state machine, so that according to the state of described finite state machine, carry out data thermal backup to the checkpoint of the described host virtual machine that generates and also comprise:
When the state of described finite state machine is described low dirty data state, if described finite state machine is in the time of described low dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described high dirty data state, if described finite state machine is in the time of described high dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup.
8. an equipment, is characterized in that, comprising:
Acquiring unit, the dirty data amount produced be used to obtaining the host virtual machine current business;
The first processing unit, for described dirty data amount and first threshold and Second Threshold are compared, generate the checkpoint of described host virtual machine according to comparative result, described Second Threshold is greater than described first threshold.
9. equipment according to claim 8, after obtaining the dirty data amount that described host virtual machine current business produces, also comprises:
The second processing unit, for the predetermined period according to described dirty data amount or finite state machine state, upgrade the state of described finite state machine, so that according to the state of described finite state machine, the data thermal backup corresponding with described finite state machine carried out in the checkpoint of the described host virtual machine that generates;
Wherein, the state of the state of described finite state machine dirty data amount of generation when meaning that described host virtual machine carries out data thermal backup.
10. according to claim 8 or claim 9 equipment, is characterized in that, described the first processing unit also for:
In the last subnormal executing state of the checkpoint that generates described host virtual machine, copy in advance the cold page data of described host virtual machine to first buffer zone, and the hot page data of described host virtual machine is pre-stored to the second buffer zone;
The cold page data of host virtual machine described in described the first buffer zone is copied in described checkpoint, and the hot page data of host virtual machine described in described the second buffer zone is copied in described checkpoint.
11. equipment according to claim 10, is characterized in that, described the first processing unit specifically for:
If described dirty data amount is less than described first threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation is more than or equal to described first threshold and is less than described Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, postpone generating the checkpoint of described host virtual machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, and described the 3rd threshold value is greater than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and be less than described Second Threshold, generate the checkpoint of described host virtual machine.
12. according to the described equipment of claim 9 to 11 any one, it is characterized in that, described the second processing unit is used for:
If described dirty data amount is more than or equal to described first threshold and is less than described Second Threshold, the state of controlling finite state machine is initial state, and then when described finite state machine is initial state, data thermal backup is carried out in described checkpoint;
If described dirty data amount is less than described first threshold, the state of controlling described finite state machine is low dirty data state, and then extend described normal execution mode when described finite state machine is low dirty data state, thereby postponing described host virtual machine enters described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, the state of controlling described finite state machine is high dirty data state, and then when the state of described finite state machine is in described high dirty data state, if described dirty data amount is accumulated to described the 3rd threshold value, generate described checkpoint and suspend described host virtual machine, described checkpoint is sent to described standby virtual machine by described cold migration pattern, enters described suspended state thereby postpone described host virtual machine.
13. equipment according to claim 12, is characterized in that, described the second processing unit also for:
When the state of described finite state machine is described initial state, if described dirty data amount is less than described first threshold, controlling described finite state machine shifts as described low dirty data state through the first buffering state from described initial state, and then be while hanging down the dirty data state, to control described host virtual machine to extend described normal execution mode at described finite state machine state, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, when if described dirty data amount is more than or equal to described Second Threshold, controlling described finite state machine shifts as described high dirty data state through the second buffering state from described initial state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if described dirty data amount is less than described Second Threshold, control described finite state machine and shift as described initial state through the 3rd buffering state from described high dirty data state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described low dirty data state, when if described dirty data amount is more than or equal to first threshold, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the first buffering state, if described dirty data amount is more than or equal to described first threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the second buffering state, if described dirty data amount is less than described Second Threshold, the state transitions of controlling described finite state machine is described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described the 3rd buffering state, if described dirty data amount is more than or equal to described Second Threshold, the state transitions of controlling described finite state machine is described high dirty data state, and then when described finite state machine is described high dirty data state, control described host virtual machine and extend described normal execution mode, thereby postpone to enter described suspended state, so that described host virtual machine carries out data thermal backup;
Wherein, described the first buffering state is that described finite state machine shifts and is the buffering state of described low dirty data state from described initial state, described the second buffering state is that described finite state machine shifts and is the buffering state of described high dirty data state from described initial state, and described the 3rd buffering state is that described finite state machine shifts and is the buffering state of described initial state from described high dirty data state.
14. according to the described equipment of claim 12 or 13, it is characterized in that, described the second processing unit also for:
When the state of described finite state machine is described low dirty data state, if described finite state machine is in the time of described low dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup;
When the state of described finite state machine is described high dirty data state, if described finite state machine is in the time of described high dirty data state and arrives described predetermined period, control described finite state machine and shift as described initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out to data thermal backup.
CN201310337228.5A 2013-08-05 2013-08-05 A kind of virtual machine warm backup method and equipment Expired - Fee Related CN103412800B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310337228.5A CN103412800B (en) 2013-08-05 2013-08-05 A kind of virtual machine warm backup method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310337228.5A CN103412800B (en) 2013-08-05 2013-08-05 A kind of virtual machine warm backup method and equipment

Publications (2)

Publication Number Publication Date
CN103412800A true CN103412800A (en) 2013-11-27
CN103412800B CN103412800B (en) 2016-12-28

Family

ID=49605813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310337228.5A Expired - Fee Related CN103412800B (en) 2013-08-05 2013-08-05 A kind of virtual machine warm backup method and equipment

Country Status (1)

Country Link
CN (1) CN103412800B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761166A (en) * 2014-01-22 2014-04-30 上海交通大学 Hot standby disaster tolerance system for network service under virtualized environment and method thereof
CN104239120A (en) * 2014-08-28 2014-12-24 华为技术有限公司 State information synchronization method, state information synchronization device and state information synchronization system for virtual machine
CN104391764A (en) * 2014-10-22 2015-03-04 上海海得控制***股份有限公司 Computer fault-tolerant method and computer fault-tolerant system
CN107171870A (en) * 2017-07-17 2017-09-15 郑州云海信息技术有限公司 A kind of two-node cluster hot backup method and device
CN114116191A (en) * 2021-06-24 2022-03-01 荣耀终端有限公司 Memory cold page processing method and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876926A (en) * 2009-11-26 2010-11-03 北京航空航天大学 Asymmetric software triple-computer hot backup fault-tolerant method
CN102073556A (en) * 2010-12-08 2011-05-25 北京航空航天大学 Hot backup and restoration method, equipment and system for virtual machine
WO2012143844A1 (en) * 2011-04-21 2012-10-26 International Business Machines Corporation Virtual machine high availability

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876926A (en) * 2009-11-26 2010-11-03 北京航空航天大学 Asymmetric software triple-computer hot backup fault-tolerant method
CN102073556A (en) * 2010-12-08 2011-05-25 北京航空航天大学 Hot backup and restoration method, equipment and system for virtual machine
WO2012143844A1 (en) * 2011-04-21 2012-10-26 International Business Machines Corporation Virtual machine high availability

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张旻佳: "虚拟集群环境下多虚拟机协同检查点容错***", 《中国优秀硕士学位论文数据库》 *

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103761166A (en) * 2014-01-22 2014-04-30 上海交通大学 Hot standby disaster tolerance system for network service under virtualized environment and method thereof
WO2015109804A1 (en) * 2014-01-22 2015-07-30 上海交通大学 Dual-server hot-backup disaster recovery system for network service in virtualization environment and method therefor
CN104239120A (en) * 2014-08-28 2014-12-24 华为技术有限公司 State information synchronization method, state information synchronization device and state information synchronization system for virtual machine
CN104239120B (en) * 2014-08-28 2018-06-05 华为技术有限公司 The method, apparatus and system of a kind of status information synchronization of virtual machine
CN104391764A (en) * 2014-10-22 2015-03-04 上海海得控制***股份有限公司 Computer fault-tolerant method and computer fault-tolerant system
CN104391764B (en) * 2014-10-22 2018-02-16 上海海得控制***股份有限公司 A kind of MATLAB software method and system
CN107171870A (en) * 2017-07-17 2017-09-15 郑州云海信息技术有限公司 A kind of two-node cluster hot backup method and device
CN114116191A (en) * 2021-06-24 2022-03-01 荣耀终端有限公司 Memory cold page processing method and electronic equipment
CN114116191B (en) * 2021-06-24 2023-09-01 荣耀终端有限公司 Memory cold page processing method and electronic equipment

Also Published As

Publication number Publication date
CN103412800B (en) 2016-12-28

Similar Documents

Publication Publication Date Title
CN103019888B (en) Backup method and device
CN106201659B (en) A kind of method and host of live migration of virtual machine
JP6527577B2 (en) File system flushing
CN103412800A (en) Virtual machine warm backup method and equipment
WO2016205978A1 (en) Techniques for virtual machine migration
CN101271409A (en) Live migration of a logical partition, method and product thereof
CN103793258A (en) Hypervisor-based server duplication system and method
US10901644B2 (en) Data-aware orchestration
CN111124267A (en) Method, apparatus and computer program product for data writing
CN106550014A (en) Node upgrade method and device in server cluster
CN104932933A (en) Spin lock acquisition method and apparatus
CN102597972B (en) virtual computer system, area management method
CN112306669A (en) Task processing method and device based on multi-core system
US10963182B2 (en) System and method for on-demand recovery points
Joaquim et al. Hourglass: Leveraging transient resources for time-constrained graph processing in the cloud
CN103927215A (en) kvm virtual machine scheduling optimization method and system based on memory disk and SSD disk
CN109189739B (en) Cache space recovery method and device
CN104268097A (en) Metadata processing method and system
CN101999113A (en) Method and system for storage replication
CN103309625B (en) A kind of method and system storing thermophoresis based on self adaptation
CN102521173A (en) Method for automatically writing back data cached in volatile medium
US10025639B2 (en) Energy efficient supercomputer job allocation
CN111465920A (en) Management of data written to a memory controller via a bus interface during a remote copy operation
CN104731632A (en) Method and system for deploying operating system
CN101853269B (en) Consistent processing method for updating distributed data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20161228

Termination date: 20180805

CF01 Termination of patent right due to non-payment of annual fee