CN103412800B - A kind of virtual machine warm backup method and equipment - Google Patents

A kind of virtual machine warm backup method and equipment Download PDF

Info

Publication number
CN103412800B
CN103412800B CN201310337228.5A CN201310337228A CN103412800B CN 103412800 B CN103412800 B CN 103412800B CN 201310337228 A CN201310337228 A CN 201310337228A CN 103412800 B CN103412800 B CN 103412800B
Authority
CN
China
Prior art keywords
state
machine
virtual machine
dirty data
threshold
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.)
Expired - Fee Related
Application number
CN201310337228.5A
Other languages
Chinese (zh)
Other versions
CN103412800A (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

Landscapes

  • Retry When Errors Occur (AREA)

Abstract

The embodiment of the present invention provides a kind of virtual machine warm backup method and equipment, relates to the information communications field, it is possible to effectively reduces the impact on customer service when virtual machine backs up, improves the availability of virtual machine business.Its method is: by obtaining the dirty data amount that host virtual machine current business produces, dirty data amount is compared with first threshold and Second Threshold, Second Threshold is more than first threshold, the checkpoint of host virtual machine is generated according to comparative result, and the state of finite state machine is updated according to the predetermined period time in dirty data amount and finite state machine, so that according to the state of finite state machine, the checkpoint of the host virtual machine generated is carried out at the data thermal backup that the state of finite state machine is corresponding.The embodiment of the present invention is for the data thermal backup of virtual machine.

Description

A kind of virtual machine warm backup method and equipment
Technical field
The present invention relates to the information communications field, particularly relate to a kind of virtual machine warm backup method and set Standby.
Background technology
Along with popularizing of Intel Virtualization Technology application, the high reliability of virtual machine becomes the weight of concern Point.Virtual machine backup technique, also referred to as virtual machine FT(Fault Tolerance, fault-tolerant), Can cross-platform transplant by means of virtual machine itself, the characteristic such as unrelated with bottom hardware, it is achieved that High efficiency, the virtual machine fault tolerant mechanism of low cost, become and ensure the important of virtual machine high reliability One of means.
In order to realize data syn-chronization, conventional virtual machine two-node cluster hot backup use temporarily terminate virtual machine and Service strategy, generally active and standby by Primary-Backup() mode synchronizing virtual machine internal memory, CPU(Central Processing Unit, CPU), I/O((Input/Output, Input/output) change made of aspect.Checkpoint(inspection is produced by host virtual machine timing Make an inventory of), then Checkpoint is sent in an asynchronous manner standby virtual machine, meanwhile, main void Plan machine is predicted with Speculative() mode performs CLIENT PROGRAM, confirming newly at standby virtual machine Checkpoint after, host virtual machine forwards normal executive mode to, the client on host virtual machine Program is terminated during generating Checkpoint.So, in adjacent C heckpoint Between produce the CLIENT PROGRAM of a large amount of dirty data, will result in the longest main void when generating Checkpoint Plan machine suspension time, makes CLIENT PROGRAM to run.It addition, in adjacent C heckpoint Between only produce the CLIENT PROGRAM of little dirty data, the Checkpoint that frequent transmission quantity of information is few Will be because of Dom U(virtual machine) and 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 warm backup method and equipment, are realizing data When backup synchronizes, generate checkpoint according to dirty quantity produced by virtual machine and data are carried out heat Backup, so can effectively reduce the impact on customer service when virtual machine backs up, improve void The availability of plan machine business.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
First aspect, it is provided that a kind of virtual machine warm backup method, including:
Obtain the dirty data amount that host virtual machine current business produces;
Described dirty data amount is compared with first threshold and Second Threshold, according to comparative result Generating the checkpoint of described host virtual machine, described Second Threshold is more than described first threshold.
In conjunction with first aspect, in the first mode in the cards of first aspect, obtaining After the dirty data amount that described host virtual machine current business produces, described method also includes:
Have according to the predetermined period renewal in described dirty data amount or finite state machine status The state of limit state machine, in order to according to described finite state machine status, the described master that will generate The checkpoint of virtual machine carries out the data thermal backup corresponding with the state of described finite state machine;
Wherein, the state of described finite state machine is used for representing that described host virtual machine carries out data heat The state of the dirty data amount produced during backup.
In conjunction with the first mode in the cards of first aspect or first aspect, in first aspect The second mode in the cards in, described method also includes:
In generating the previous subnormal execution state of checkpoint of described host virtual machine, by described The cold page data of host virtual machine copies the first relief area in advance to, and by described host virtual machine Hot page data is prestored to the second relief area;
The checkpoint of the described host virtual machine of described generation includes: described in described first relief area The cold page data of host virtual machine copies in described checkpoint, and by described second relief area The hot page data of described host virtual machine copies in described checkpoint.
In conjunction with the second mode in the cards of first aspect or first aspect, in first aspect The third mode in the cards in, described by described dirty data amount and first threshold and second Threshold value compares, and includes according to the checkpoint of the comparative result described host virtual machine of generation:
If described dirty data amount is less than described first threshold, then postpone generating described host virtual machine Checkpoint, until the described dirty data amount of accumulation is more than or equal to described first threshold and less than institute State Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, then postpone generating described main void The checkpoint of plan machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generates described inspection Make an inventory of and suspend described host virtual machine, described checkpoint is sent to by cold migration pattern standby empty Plan machine, described 3rd threshold value is more than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and less than described second threshold Value, then generate the checkpoint of described host virtual machine.
In conjunction with the third mode in the cards of first aspect or first aspect, in first aspect The 4th kind of mode in the cards in, described according to described dirty data amount update finite state machine State, in order to according to described finite state machine status, to the described host virtual machine generated Checkpoint carries out data thermal backup and includes:
If described dirty data amount is more than or equal to described first threshold and less than described Second Threshold, The state then controlling finite state machine is initial state, and then is initial state at described finite state machine Time described checkpoint is carried out data thermal backup;
If described dirty data amount is less than described first threshold, then control the shape of described finite state machine State is low dirty data state, so extend when described finite state machine is low dirty data state described just Often perform state, thus postpone described host virtual machine and enter described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, then control described finite state The state of machine is high dirty data state, and then to be in described height dirty when the state of described finite state machine During data state, if described dirty data amount accumulates described 3rd threshold value, then generate described checkpoint And suspend described host virtual machine, described checkpoint is sent to described by described cold migration pattern Standby virtual machine, thus postpone described host virtual machine and enter described suspended state.
In conjunction with first aspect or the 4th kind of mode in the cards of first aspect, in first aspect The 5th kind of mode in the cards in, described according to described dirty data amount update finite state machine State, in order to according to described finite state machine status, to the inspection generating described host virtual machine Make an inventory of and carry out data thermal backup and also include:
When the state of described finite state machine is described initial state, if described dirty data amount is less than Described first threshold, then control described finite state machine and buffer state from described initial state through first Transfer is described low dirty data state, and then when described finite state machine status is low dirty data state Control described host virtual machine and extend described normal execution mode, thus postpone to enter described hang-up shape State, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, if described dirty data amount is more than Or during equal to described Second Threshold, then control described finite state machine from described initial state through the Two buffering state transfers are described high dirty data state, and then are that described height is dirty at described finite state machine Control described host virtual machine during data state and extend described normal execution mode, thus postpone to enter institute State 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 Less than described Second Threshold, then control described finite state machine from described high dirty data state through Three buffering state transfers are described initial state, and then when described finite state machine is described initial state Described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described low dirty data state, if described dirty data amount During more than or equal to first threshold, then controlling the transfer of 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 data heat Backup;
When the state of described finite state machine is described first buffering state, if described dirty data amount More than or equal to described first threshold, then control the state transfer of described finite state machine for described Initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out Data thermal backup;
When the state of described finite state machine is described second buffering state, if described dirty data amount Less than described Second Threshold, then control the state transfer of described finite state machine for described initially State, and then when described finite state machine is described initial state, described host virtual machine is carried out data Hot Spare;
When the state of described finite state machine is described 3rd buffering state, if described dirty data amount More than or equal to described Second Threshold, then control the state transfer of described finite state machine for described High dirty data state, and then described master is controlled when described finite state machine is described high dirty data state Virtual machine extends described normal execution mode, thus postpones to enter described suspended state, so that Described host virtual machine carries out data thermal backup;
Wherein, described first buffering state be described finite state machine from the transfer of described initial state be institute Stating the buffering state of low dirty data state, described second buffering state is that described finite state machine is at the beginning of described Primary state transfer is the buffering state of described high dirty data state, and described 3rd buffering state is described limited shape State machine is from the buffering state that the transfer of described high dirty data state is described initial state.
In conjunction with first aspect or the 5th kind of mode in the cards of first aspect, in first aspect The 6th kind of mode in the cards in, described according to the predetermined period in finite state machine status Update the state of described finite state machine, in order to according to the state of described finite state machine, right The checkpoint of the described host virtual machine generated carries out data thermal backup and includes:
When the state of described finite state machine is described low dirty data state, if described finite state Machine is in the described predetermined period of time arrival of described low dirty data state, then control described limited shape The transfer of state machine is described initial state, and then when described finite state machine is described initial state to institute State host virtual machine and carry out 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 described predetermined period of time arrival of described high dirty data state, then control described limited shape The transfer of state machine is described initial state, and then when described finite state machine is described initial state to institute State host virtual machine and carry out data thermal backup.
Second aspect, it is provided that a kind of equipment, including:
Acquiring unit, for obtaining the dirty data amount that host virtual machine current business produces;
First processing unit, for carrying out described dirty data amount with first threshold and Second Threshold Relatively, generating the checkpoint of described host virtual machine according to comparative result, described Second Threshold is more than Described first threshold.
In conjunction with second aspect, in the first mode in the cards of second aspect, obtaining After the dirty data amount that described host virtual machine current business produces, also include:
Second processing unit, pre-for according in described dirty data amount or finite state machine status If the cycle updates the state of described finite state machine, in order to according to described finite state machines State, carries out the number corresponding with described finite state machine by the checkpoint of the described host virtual machine generated According to Hot Spare;
Wherein, the state of described finite state machine is used for representing that described host virtual machine carries out data heat The state of the dirty data amount produced during backup.
In conjunction with the first mode in the cards of second aspect or second aspect, in second aspect The second mode in the cards in, described first processing unit is additionally operable to:
In generating the previous subnormal execution state of checkpoint of described host virtual machine, by described The cold page data of host virtual machine copies the first relief area in advance to, and by described host virtual machine Hot page data is prestored to the second relief area;
Copy the cold page data of host virtual machine described in described first relief area to described inspection In making an inventory of, and copy the hot page data of host virtual machine described in described second relief area to institute State in checkpoint.
In conjunction with the second mode in the cards of second aspect or second aspect, in second aspect The third mode in the cards in, described first processing unit specifically for:
If described dirty data amount is less than described first threshold, then postpone generating described host virtual machine Checkpoint, until the described dirty data amount of accumulation is more than or equal to described first threshold and less than institute State Second Threshold, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, then postpone generating described main void The checkpoint of plan machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generates described inspection Make an inventory of and suspend described host virtual machine, described checkpoint is sent to by cold migration pattern standby empty Plan machine, described 3rd threshold value is more than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and less than described second threshold Value, then generate the checkpoint of described host virtual machine.
In conjunction with the third mode in the cards of second aspect or second aspect, in first aspect The 4th kind of mode in the cards in, described second processing unit is used for:
If described dirty data amount is more than or equal to described first threshold and less than described Second Threshold, The state then controlling finite state machine is initial state, and then is initial state at described finite state machine Time described checkpoint is carried out data thermal backup;
If described dirty data amount is less than described first threshold, then control the shape of described finite state machine State is low dirty data state, so extend when described finite state machine is low dirty data state described just Often perform state, thus postpone described host virtual machine and enter described suspended state;
If described dirty data amount is more than or equal to described Second Threshold, then control described finite state The state of machine is high dirty data state, and then to be in described height dirty when the state of described finite state machine During data state, if described dirty data amount accumulates described 3rd threshold value, then suspend described master virtual Machine, is sent to described standby virtual by the dirty data of described host virtual machine by described cold migration pattern Machine, thus postpone described host virtual machine and enter described suspended state.
In conjunction with second aspect or the 4th kind of mode in the cards of second aspect, in second aspect The 5th kind of mode in the cards in, described second processing unit is additionally operable to:
When the state of described finite state machine is described initial state, if described dirty data amount is less than Described first threshold, then control described finite state machine and buffer state from described initial state through first Transfer is described low dirty data state, and then when described finite state machine status is low dirty data state Control described host virtual machine and extend described normal execution mode, thus postpone to enter described hang-up shape State, so that described host virtual machine carries out data thermal backup;
When the state of described finite state machine is described initial state, if described dirty data amount is more than Or during equal to described Second Threshold, then control described finite state machine from described initial state through the Two buffering state transfers are described high dirty data state, and then are that described height is dirty at described finite state machine Control described host virtual machine during data state and extend described normal execution mode, thus postpone to enter institute State 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 Less than described Second Threshold, then control described finite state machine from described high dirty data state through Three buffering state transfers are described initial state, and then when described finite state machine is described initial state Described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described low dirty data state, if described dirty data amount During more than or equal to first threshold, then controlling the transfer of 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 data heat Backup;
When the state of described finite state machine is described first buffering state, if described dirty data amount More than or equal to described first threshold, then control the state transfer of described finite state machine for described Initial state, and then when described finite state machine is described initial state, described host virtual machine is carried out Data thermal backup;
When the state of described finite state machine is described second buffering state, if described dirty data amount Less than described Second Threshold, then control the state transfer of described finite state machine for described initially State, and then when described finite state machine is described initial state, described host virtual machine is carried out data Hot Spare;
When the state of described finite state machine is described 3rd buffering state, if described dirty data amount More than or equal to described Second Threshold, then control the state transfer of described finite state machine for described High dirty data state, and then described master is controlled when described finite state machine is described high dirty data state Virtual machine extends described normal execution mode, thus postpones to enter described suspended state, so that Described host virtual machine carries out data thermal backup;
Wherein, described first buffering state be described finite state machine from the transfer of described initial state be institute Stating the buffering state of low dirty data state, described second buffering state is that described finite state machine is at the beginning of described Primary state transfer is the buffering state of described high dirty data state, and described 3rd buffering state is described limited shape State machine is from the buffering state that the transfer of described high dirty data state is described initial state.
In conjunction with second aspect or the 5th kind of mode in the cards of second aspect, in first aspect The 6th kind of mode in the cards in, described second processing unit is additionally operable to:
When the state of described finite state machine is described low dirty data state, if described finite state Machine is in the described predetermined period of time arrival of described low dirty data state, then control described limited shape The transfer of state machine is described initial state, and then when described finite state machine is described initial state to institute State host virtual machine and carry out 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 described predetermined period of time arrival of described high dirty data state, then control described limited shape The transfer of state machine is described initial state, and then when described finite state machine is described initial state to institute State host virtual machine and carry out data thermal backup.
The embodiment of the present invention provides a kind of virtual machine warm backup method and equipment, by obtaining main void The dirty data amount that plan machine current business produces, enters dirty data amount with first threshold and Second Threshold Row compares, and generates the checkpoint of host virtual machine according to comparative result, and according to dirty data amount or have The predetermined period of limit state machine updates the state of finite state machine, in order to according to finite state machine State, carries out the number corresponding with the state of finite state machine to the checkpoint of the host virtual machine generated According to Hot Spare, it is possible to reduce the impact on customer service when virtual machine backs up, improve virtual machine The availability of business.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below by right In embodiment or description of the prior art, the required accompanying drawing used is briefly described, it should be apparent that, Accompanying drawing in describing below is only some embodiments of the present invention, for those of ordinary skill in the art From the point of view of, on the premise of not paying creative work, it is also possible to obtain the attached of other according to these accompanying drawings Figure.
A kind of virtual machine warm backup method schematic flow sheet that Fig. 1 provides for the embodiment of the present invention;
A kind of virtual machine warm backup method schematic flow sheet that Fig. 2 provides for the embodiment of the present invention;
Virtual machine two-node cluster hot backup merit in a kind of prior art that Fig. 3 provides for the embodiment of the present invention Can block diagram;
In the prior art that Fig. 4 provides for the embodiment of the present invention, active and standby virtual machine carries out data heat The timing diagram of backup;
In the prior art that Fig. 5 provides for the embodiment of the present invention execution state of CLIENT PROGRAM with The sequential comparison diagram of the execution state of CLIENT PROGRAM of the present invention;
In the prior art that Fig. 6 provides for the embodiment of the present invention execution state of CLIENT PROGRAM with The sequential comparison diagram of the execution state of CLIENT PROGRAM of the present invention;
In the prior art that Fig. 7 provides for the embodiment of the present invention execution state of CLIENT PROGRAM with The sequential comparison diagram of the execution state of CLIENT PROGRAM of the present invention;
A kind of state that Fig. 8 provides for the embodiment of the present invention shifts the dirty data with host virtual machine Amount or the graph of a relation of predetermined period;
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.
Detailed description of the invention
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 entered Row clearly and completely describes, it is clear that described embodiment is only a part of embodiment of the present invention, Rather than whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art are not having Have and make the every other embodiment obtained under creative work premise, broadly fall into present invention protection Scope.
The embodiment of the present invention provides a kind of virtual machine warm backup method, as it is shown in figure 1, include:
101, equipment obtains the dirty data amount that host virtual machine current business produces.
Wherein, this equipment can be computer, and host virtual machine and standby virtual machine are separately operable two On platform computer.Standby virtual machine is used for carrying out the data on host virtual machine Hot Spare, generally by (Primary-Backup, standby usage) scheme realizes, to prevent host virtual machine because calculating The virtual machine that machine hardware damage and software fault cause lost efficacy and service pauses.
Wherein, dirty data refers to the data of host virtual machine latest update, including the data newly changed Or the data etc. newly increased.
102, dirty data amount is compared by equipment with first threshold and Second Threshold, according to than Relatively result generates the checkpoint of host virtual machine, and Second Threshold is more than first threshold.
Exemplary, if the dirty data amount that host virtual machine produces is less than first threshold, then postpone raw Become host virtual machine Checkpoint(checkpoint), until accumulation dirty data amount more than or etc. In first threshold and less than Second Threshold, control host virtual machine and enter suspended state and generate Checkpoint, can avoid quantity of information less Checkpoint being transmitted several times to CLIENT PROGRAM The interference caused;
If dirty data amount is more than or equal to Second Threshold, then postpone generating host virtual machine Checkpoint, until the dirty data amount of accumulation reaches the 3rd threshold value, generates described checkpoint also Suspend host virtual machine, checkpoint is sent to standby virtual machine by cold migration pattern, then controls Host virtual machine enters Speculative(prediction) perform state, the dirtiest to avoid repeatedly generating The long-time hang-up of the virtual machine that data Checkpoint cause and cause CLIENT PROGRAM to transport OK;
If the dirty data amount of host virtual machine accumulation is more than or equal to first threshold, and less than the second threshold Value, then generate the checkpoint of host virtual machine and carry out data thermal backup, i.e. enters normal hang-up Virtual machine, normal execution mode and prediction perform state.
Wherein, Second Threshold is more than first threshold, and the 3rd threshold value is more than Second Threshold.
The embodiment of the present invention provides a kind of virtual machine warm backup method, works as by obtaining host virtual machine The dirty data amount that front business produces, compares dirty data amount with first threshold and Second Threshold Relatively, Second Threshold is more than first threshold, generates the checkpoint of host virtual machine according to comparative result, Can effectively reduce the impact on customer service when virtual machine backs up, improve virtual machine business Availability.
Further embodiment of this invention provides a kind of virtual machine warm backup method, as in figure 2 it is shown, bag Include:
201, equipment obtains the dirty data amount that host virtual machine current business produces.
Wherein, in computer science, virtual machine refers to run journey as real machine The software of the computer of sequence realizes.
Virtual machine double-machine standby technology, is also virtual machine FT(Fault Tolerance, fault-tolerant) , there is host virtual machine and standby virtual machine, host virtual machine and standby virtual machine and operate in two not in technology In same computer.Wherein, standby virtual machine is auxiliary virtual machine, and host virtual machine receives and sends Network packet, the Hypervisor(in equipment manages program) to host virtual machine with for virtual Machine is managed, and Hypervisor timing produces the Checkpoint(checkpoint of host virtual machine), And this Checkpoint is sent in an asynchronous manner standby virtual machine, in order to standby virtual machine will be main The data of virtual machine carry out Hot Spare to keep virtual synchronous, prevent host virtual machine from breaking down Time, standby virtual machine will be without taking over from host virtual machine in the case of interrupting and running application program.
Concrete, in prior art, shielded host virtual machine when performing business CLIENT PROGRAM, When host virtual machine timing suspended state, Hypervisor performs to generate host virtual machine Checkpoint, this Checkpoint can include host virtual machine CPU(Central Processing Unit, processor) state, memory information and peripheral state, and by slow for Checkpoint write Rush district, host virtual machine with Speculative(predict) mode perform time, Hypervisor will This Checkpoint is sent to standby virtual machine, then controls host virtual machine entrance and normally performs shape State, is illustrated in figure 3 use Primary-Backup(standby usage) to realize virtual machine double for scheme Machine hot-backup function block diagram, as shown in Figure 4, for data warm in Primary-Backup prior art Backup timing diagram, including host virtual machine and standby virtual machine shape of different phase when data backup The execution state of the CLIENT PROGRAM in state, and host virtual machine.
Exemplary, it is assumed that host virtual machine is running the compiling of Kernel Compile(kernel) industry During business, during normal execution, can produce dirty data, wherein, dirty data refers to main virtual The data of machine latest update, including the data newly changed or the data etc. newly increased.
202, dirty data amount is compared by equipment with first threshold and Second Threshold, when dirty number During according to amount less than first threshold, enter step 203, when dirty data amount is more than or equal to the second threshold During value, enter step 204, when dirty data amount is more than or equal to first threshold, and less than second During threshold value, enter step 206.
Concrete, the management for active and standby virtual machine can be managed control by Hypervisor System, is also Hypervisor.Hypervisor can monitor each interval host virtual machine dirty data EDD(Epoch Dirty Data) generation total amount, and by dirty data amount and first threshold LT Compare with Second Threshold HT.Wherein, Second Threshold is more than first threshold, the 3rd threshold value More than Second Threshold.
If 203 dirty data amounts are less than first threshold, then equipment postpones generating the inspection of host virtual machine Make an inventory of, until the dirty data amount of accumulation is more than or equal to first threshold and less than Second Threshold, raw Become the checkpoint of host virtual machine, then, enter step 208.
Exemplary, when dirty data amount EDD that host virtual machine produces during normal execution During less than first threshold, Hypervisor management program can be postponed generating host virtual machine Checkpoint, skips hang-up virtual machine and local copy, i.e. skips generation Checkpoint behaviour Make, extend normal execution mode, until the dirty data that host virtual machine is accumulated at normal execution mode When amount is more than or equal to first threshold and less than Second Threshold, perform to hang up virtual machine, The Checkpoint of Hypervisor management Program Generating virtual machine, then controls host virtual machine and enters Enter Speculative to perform and normal execution mode, and by including dirty data Checkpoint is sent to standby virtual machine, with avoid host virtual machine in Speculative performs to Standby virtual machine is transmitted several times the less Checkpoint of quantity of information, interferes to CLIENT PROGRAM.
As it is shown in figure 5, the state of CLIENT PROGRAM such as CLIENT PROGRAM sequential chart 1. institute in prior art Showing, the dirty data amount produced when host virtual machine in the present embodiment is less than the process sequential of first threshold Figure, 1. contrast with CLIENT PROGRAM, as CLIENT PROGRAM sequential chart 2. shown in, can effectively reduce main void The virtual machine impact on customer service during the backup of plan machine.
Optionally, Hypervisor management program is that suspended state generation is main virtual at host virtual machine Before the Checkpoint of machine, during the previous subnormal execution of suspended state, by main void The cold page data of Cold pages(in plan machine) copy the first relief area in advance to, and will be main The hot page data of Hot pages(in virtual machine) it is prestored to the second relief area, giving birth to When becoming Checkpoint, the Hot pages in the second relief area of host virtual machine and first is delayed Rush district Cold pages and copy in Checkpoint, to reduce virtual machine suspension time, such as figure 1. 4. the sequential chart of the CLIENT PROGRAM shown in 6 contrast with Normal Backups state timing chart.
Wherein, Cold pages can be to be modified and revised unlikely to be repaiied afterwards again The page changed, Hot pages can be the page that amendment frequency is higher;
Optionally, configuring the first relief area, the second relief area in internal memory, wherein, first delays Rush district for storing the cold page data of Cold pages(), the second relief area is used for storing Hot The hot page data of pages();
Optionally, configuring relief area in internal memory, this relief area comprises Liang Gezi district: first delays Rushing district, the second relief area, wherein, the first relief area is used for storing the cold page of Cold pages( Data), the second relief area is used for storing the hot page data of Hot pages().
If 204 dirty data amounts are more than or equal to Second Threshold, then equipment postponement generates main virtual The checkpoint of machine, until the dirty data amount of accumulation reaches the 3rd threshold value, generates checkpoint and suspends Host virtual machine, the 3rd threshold value is more than described Second Threshold.
Exemplary, when dirty data amount EDD that host virtual machine produces during normal execution During more than Second Threshold, Hypervisor management program can postpone generating the inspection of host virtual machine Point, i.e. skips pending operation and the local copy operation of host virtual machine, extends normal execution mode, During until the dirty data amount that host virtual machine is accumulated during normal execution arrives three threshold values, temporarily Stopping host virtual machine, wherein, the 3rd threshold value is more than Second Threshold.
As it is shown in fig. 7, the normal condition of existing customer's program such as CLIENT PROGRAM sequential chart 1. institute Showing, the dirty data amount produced when host virtual machine in the present embodiment is higher than the process sequential of the 3rd threshold value Figure, 1. 3. shown to such as CLIENT PROGRAM sequential chart with CLIENT PROGRAM, it is possible to effectively to reduce main void The host virtual machine impact on customer service during the backup of plan machine.
205, checkpoint is sent to standby virtual machine by cold migration pattern by equipment, then enters Step 209.
Exemplary, after Hypervisor management programme-control suspends virtual machine, by host virtual machine Checkpoint perform the coldest migration, these data include the CPU state of host virtual machine, internal memory Information and peripheral state, be included in the dirty data of accumulation in Checkpoint simultaneously and be sent to Standby virtual machine, to avoid the Checkpoint repeatedly generating a large amount of dirty data to cause host virtual machine Long-time hang-up, causes CLIENT PROGRAM to run, and then recovers host virtual machine and enters Speculative performs state, enters back into normal execution mode.
If 206 dirty data amounts are more than or equal to first threshold, and less than Second Threshold, then set The standby checkpoint generating host virtual machine, then enters step 207.
Exemplary, if the dirty data amount that host virtual machine normal execution mode produces is more than or equal to First threshold LT, and less than Second Threshold HT, then Hypervisor management programme-control is virtual Machine carries out data thermal backup, i.e. host virtual machine perform to hang up virtual machine, Speculative perform and Normal execution mode, i.e. performs program sequential chart program sequential chart as shown in Figure 5 1. shown.
If 207 dirty data amounts are more than or equal to first threshold and less than Second Threshold, then equipment The state controlling finite state machine is initial state, and then when finite state machine is initial state to inspection Make an inventory of and carry out data thermal backup.
Wherein, FSM(Finite State Machine, finite state machine), refer in numeral In Circuits System, a kind of highly important sequential logical circuit module, refer to that output is depended in the past Importation and the sequential logical circuit being currently entered part.Finite state machine is also known as finite state Automat or be called for short state machine, represents between limited state and these states the row such as transfer action Mathematical model.Finite state machine possibly together with one group of depositor with " memory " function, these The function of depositor is the internal state of memory finite state machine, and they are commonly referred to as Status register Device.In finite state machine, the next state of status register is not only relevant with input signal, But also it is relevant with the current state of this depositor.
Finite state machine, in FT tolerant system, can record the state of FT system, follows the trail of FT system state change, utilizes trigger condition to control FT system mode and shifts.
Hypervisor management program can obtain host virtual machine in each interval from host virtual machine Produced dirty data total amount.If dirty data amount EDD more than or equal to first threshold LT and During less than Second Threshold HT, if the part of being currently entered, dirty data amount LT≤EDD < HT, Then the state of finite state machine is SN(initial state), Hypervisor management program is generating Carry out data thermal backup during the checkpoint of host virtual machine, i.e. perform process such as CLIENT PROGRAM sequential chart ①。
If 208 dirty data amounts are less than first threshold, then equipment controls the state of finite state machine For low dirty data state, and then extend when finite state machine is low dirty data state and normally perform shape State, thus postpone host virtual machine and enter suspended state.
Exemplary, when finite state machine obtains the amount of being currently entered, the dirty data amount of host virtual machine Less than first threshold, i.e. EDD < LT, then the state of finite state machine is that state SL(is low dirty Data state), when i.e. the dirty data amount of host virtual machine is less than first threshold, Hypervisor postpones Generate the Checkpoint of host virtual machine, extend the normal execution mode of host virtual machine, thus prolong Host virtual machine enters data thermal backup late, i.e. performs CLIENT PROGRAM such as sequential chart 2. shown.
If 209 dirty data amounts are more than or equal to Second Threshold, then equipment controls finite state machine State be high dirty data state, and then when the state of finite state machine is in high dirty data state, If dirty data amount is accumulated to the 3rd threshold value, then generate checkpoint and suspend host virtual machine, will check Point is sent to standby virtual machine by cold migration pattern, thus postpones host virtual machine and enter hang-up shape State.
Exemplary, when finite state machine is currently entered, the dirty data amount of host virtual machine is big In or equal to Second Threshold, i.e. during EDD >=HT, the state of finite state machine is high dirty data State, when dirty data amount is accumulated to three threshold values, is controlled host virtual machine and suspends, and moved by cold Host virtual machine data are sent to standby virtual machine by the mode moved, thus postpone host virtual machine and enter number According to Hot Spare, i.e. postpone to enter suspended state, it is to avoid cause virtual machine to hang up for a long time and cause visitor Family program cannot be run.I.e. perform CLIENT PROGRAM sequential chart 3. shown.
Optionally, if the dirty data amount of host virtual machine is more than or equal to first threshold and less than second Threshold value so that when the state of finite state machine is initial state, if the number that host virtual machine currently updates According to i.e. dirty data amount less than first threshold, then control finite state machine and delay through first from initial state Rushing state transfer is low dirty data state, and then the control when finite state machine status is low dirty data state Host virtual machine extends normal execution mode, thus postpones to enter suspended state, so that winner is virtual Machine carries out data thermal backup.
Wherein, the first buffering state TNL, for finite state machine from initial state SN to low dirty data The buffering state of platform SL.When finite state machine shifts as low dirty data state SL from initial state SN, I.e. finite state machine in the past input is LT≤EDD < HT initial state, be currently entered into EDD < LT first buffers state, then the next state of finite state machine is low dirty data state SL, so that host virtual machine extends normal execution mode, i.e. performs dirty data amount less than the Process during one threshold value LT, thus postpone host virtual machine and enter suspended state to carry out data hot standby Part.
Optionally, if the dirty data amount of host virtual machine is more than or equal to first threshold and less than second Threshold value so that when the state of finite state machine is initial state, if the number that host virtual machine currently updates During according to i.e. dirty data amount more than or equal to Second Threshold, then control finite state machine from initial state warp Crossing the second buffering state transfer is high dirty data state, and then when finite state machine is high dirty data state Control host virtual machine and extend normal execution mode, thus postpone to enter suspended state, so that winner Virtual machine carries out data thermal backup.
Wherein, the second buffering state TNH, for finite state machine from initial state SN to high dirty data The buffering state of state SH.When finite state machine shifts as high dirty data state SH from initial state SN Time, i.e. finite state machine input in the past is LT≤EDD < HT initial state, is currently entered as EDD >=HT second buffers state, then the next state of finite state machine is high dirty data state SH, So that host virtual machine extends normal execution mode, when dirty data amount is more than three threshold values, Suspend virtual machine, the dirty data amount that host virtual machine is accumulated is sent to standby by the way of cold migration Virtual machine, thus postpone host virtual machine entrance suspended state and carry out data thermal backup.
Optionally, if the dirty data amount of host virtual machine is more than or equal to Second Threshold so that limited When the state of state machine is high dirty data state, if the data i.e. dirty data that host virtual machine currently updates Amount less than Second Threshold, then controls finite state machine and turns through the 3rd buffering state from high dirty data state Moving is initial state, and then it is hot standby when finite state machine is initial state, host virtual machine to be carried out data Part.
Wherein, the 3rd buffering state THN be finite state machine from high dirty data state SH to initially The buffering state of state SN.When finite state machine shifts as initial state SN from high dirty data state SH Time, past input is EDD >=HT, is currently entered as EDD < HT, then finite state The next state of machine is initial state SN, thus controls virtual machine and carry out data thermal backup.
Optionally, if the dirty data amount of host virtual machine is less than first threshold so that finite state machine State when being low dirty data state, if the i.e. dirty data amount of data that host virtual machine currently updates is more than Or during equal to first threshold, then controlling finite state machine transfer is initial state, and then at limited shape When state machine is initial state, host virtual machine is carried out data thermal backup.
Concrete, when finite state machine input in the past is low dirty data state EDD < LT, currently When input is for EDD >=LT, then the next state of finite state machine is initial state SN, So that host virtual machine carries out data thermal backup.
Optionally, if the dirty data amount of host virtual machine makes finite state machine less than first threshold When state is the first buffering state, if the data i.e. dirty data amount that currently updates of host virtual machine more than or Equal to first threshold, then the state transfer controlling finite state machine is initial state, and then limited When state machine is initial state, host virtual machine is carried out data thermal backup.
Concrete, when the state in finite state machine past is the first buffering state TNL, i.e. pass by Input is EDD < LT, when current input is EDD >=LT, then controls finite state machine State transfer for initial state SN, in order to control virtual machine and carry out data thermal backup.
Optionally, if the dirty data amount of host virtual machine makes limited shape more than or equal to Second Threshold When the state of state machine is the second buffering state, if the data i.e. dirty data amount that host virtual machine currently updates Less than Second Threshold, then the state transfer controlling finite state machine is initial state, and then limited When state machine is initial state, host virtual machine is carried out data thermal backup.
Concrete, when finite state machine past state is the second buffering state TNH, the most defeated Enter for EDD >=HT, when being currently entered as EDD < HT, the next shape of finite state machine State is initial state SN, thus controls virtual machine and carry out data thermal backup.
Optionally, if the dirty data amount of host virtual machine makes finite state machine less than Second Threshold When state is the 3rd buffering state, if the data i.e. dirty data amount that currently updates of host virtual machine more than or Equal to Second Threshold, then the state transfer controlling finite state machine is high dirty data state, Jin Er Control host virtual machine when finite state machine is high dirty data state and extend normal execution mode, thus prolong Enter suspended state late, so that host virtual machine carries out data thermal backup.
Concrete, finite state machine past state is the 3rd buffering state THN, i.e. passes by input For EDD < HT, it is currently entered as EDD >=HT, then the next shape of finite state machine State is high dirty data state SH, normally holds so that finite states machine control host virtual machine extends Row state, when dirty data amount reaches three threshold values, suspends virtual machine, by cold migration pattern Host virtual machine dirty data amount is sent to standby virtual machine, thus postpones host virtual machine and enter hang-up shape State carries out data thermal backup, improves high availability and the high-performance of virtual machine business.
Optionally, when the state of finite state machine is low dirty data state, if at finite state machine Arrive predetermined period in the time of low dirty data state, then it is initial for controlling finite state machine transfer State, and then data thermal backup is carried out when finite state machine is initial state.
Concrete, when the state of finite state machine is low dirty data state SL, i.e. lead virtual Machine is in normal execution mode, if arriving Epoch the interval time being in this normal execution mode (time threshold), long-time in the data of host virtual machine are not backuped in standby virtual machine, The state transfer of finite state machine is initial state, enters so that host virtual machine enters suspended state Row data thermal backup.
Optionally, when the state of finite state machine is high dirty data state, if at finite state machine Arrive predetermined period in the time of high dirty data state, then it is initial for controlling finite state machine transfer State, and then when finite state machine is initial state, host virtual machine is carried out data thermal backup.
Concrete, when the state of finite state machine is high dirty data state SH, i.e. lead virtual Machine placed in a suspend state, if arriving Epoch(time threshold interval time placed in a suspend state Value), long-time in the data of host virtual machine are not backuped in standby virtual machine, finite state The state transfer of machine is initial state, so that host virtual machine enters suspended state carries out data heat Backup.
By described above, there are 6 finite states in finite state machine, turning of these 6 states Move the graph of a relation of the dirty data amount with host virtual machine or predetermined period as shown in Figure 8 so that management Program carries out data thermal backup according to the state of finite state machine to the checkpoint of host virtual machine.
The embodiment of the present invention provides a kind of virtual machine warm backup method, works as by obtaining host virtual machine The dirty data amount that front business produces, compares dirty data amount with first threshold and Second Threshold Relatively, generate the checkpoint of host virtual machine according to comparative result, and according to dirty data amount or limited shape The predetermined period of state machine updates the state of finite state machine, in order to according to the shape of finite state machine State, carries out data thermal backup by the checkpoint of the host virtual machine of generation, it is possible to effectively reduce virtual Impact on customer service during machine backup, improves the availability of virtual machine business.
Further embodiment of this invention provides a kind of equipment 01, as it is shown in figure 9, include:
Acquiring unit 011, for obtaining the dirty data amount that host virtual machine current business produces.
First processing unit 012, for carrying out dirty data amount with first threshold and Second Threshold Relatively, generating the checkpoint of host virtual machine according to comparative result, Second Threshold is more than first threshold.
Optionally, as shown in Figure 10, the dirty of described host virtual machine current business generation is being obtained After data volume, it is also possible to including:
Second processing unit 013, pre-for according in dirty data amount or finite state machine status If the cycle updates the state of finite state machine, in order to according to the state of finite state machine, will be raw The checkpoint of the host virtual machine become carries out the data thermal backup corresponding with finite state machine;
Wherein, the state of finite state machine is used for representing that host virtual machine carries out product during data thermal backup The state of raw dirty data amount.
Optionally, the first processing unit 012 can be also used for:
In generating the previous subnormal execution state of checkpoint of host virtual machine, by host virtual machine Cold page data copy the first relief area in advance to, and by the hot page number of described host virtual machine According to being prestored to the second relief area;
Optionally, configuring the first relief area, the second relief area in internal memory, wherein, first delays Rush district for storing the cold page data of Cold pages(), the second relief area is used for storing Hot The hot page data of pages();
Optionally, configuring relief area in internal memory, this relief area comprises Liang Gezi district: first delays Rushing district, the second relief area, wherein, the first relief area is used for storing the cold page of Cold pages( Data), the second relief area is used for storing the hot page data of Hot pages();
The cold page data of host virtual machine in first relief area is copied in checkpoint, and by In two relief areas, the hot page data of host virtual machine copies in checkpoint.
Further, the first processing unit 012 can also be specifically for:
If dirty data amount is less than first threshold, then postpone generating the checkpoint of host virtual machine, until The dirty data amount of accumulation, more than or equal to first threshold and less than Second Threshold, generates host virtual machine Checkpoint;
If dirty data amount is more than or equal to Second Threshold, then postpone generating the inspection of host virtual machine Point, until the dirty data amount of accumulation reaches the 3rd threshold value, generates described checkpoint and suspends main void Plan machine, is sent to standby virtual machine by checkpoint by cold migration pattern, and the 3rd threshold value is more than second Threshold value;
If dirty data amount is more than or equal to first threshold, and less than Second Threshold, then generates main void The checkpoint of plan machine.
Further, the second processing unit 013 may be used for:
If dirty data amount is more than or equal to first threshold and less than Second Threshold, then control limited shape The state of state machine is initial state, and then when finite state machine is initial state to checkpoint number According to Hot Spare;
If dirty data amount is less than first threshold, then the state controlling finite state machine is low dirty data State, and then normal execution mode is extended when finite state machine is low dirty data state, thus postpone Host virtual machine enters suspended state;
If dirty data amount is more than or equal to Second Threshold, then the state controlling finite state machine is height Dirty data state, and then when the state of finite state machine is in high dirty data state, if dirty data amount Accumulation to the 3rd threshold value, is then generated checkpoint and suspends host virtual machine, being moved by cold checkpoint Shifting mode is sent to standby virtual machine, thus postpones host virtual machine and enter suspended state.
Further, the second processing unit 013 can be also used for:
When the state of finite state machine is initial state, if dirty data amount is less than first threshold, then Control finite state machine to shift as low dirty data state, Jin Er through the first buffering state from initial state Control host virtual machine when finite state machine status is low dirty data state and extend normal execution mode, from And 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, if dirty data amount is more than or equal to the second threshold During value, then control finite state machine and shift as high dirty data through the second buffering state from initial state State, and then the prolongation of control host virtual machine normally performs shape when finite state machine is high dirty data state State, thus 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 dirty data amount is less than the second threshold Value, then control finite state machine shifting through the 3rd buffering state from high dirty data state is initial state, And then when finite state machine is initial state, host virtual machine is carried out data thermal backup;
When the state of finite state machine is low dirty data state, if dirty data amount is more than or equal to the During one threshold value, then controlling finite state machine transfer is initial state, and then is just at finite state machine During primary state, control host virtual machine is carried out data thermal backup;
When the state of finite state machine is the first buffering state, if dirty data amount is more than or equal to the One threshold value, then the state transfer controlling finite state machine is initial state, and then at finite state machine For host virtual machine being carried out data thermal backup during initial state;
When the state of finite state machine is the second buffering state, if dirty data amount is less than the second threshold Value, then the state transfer controlling finite state machine is initial state, and then is just at finite state machine During primary state, host virtual machine is carried out data thermal backup;
When the state of finite state machine is the 3rd buffering state, if dirty data amount is more than or equal to the Two threshold values, then the state transfer controlling finite state machine is high dirty data state, and then at limited shape Control host virtual machine when state machine is high dirty data state and extend normal execution mode, thus 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 is from delaying that initial state transfer is low dirty data state Rushing state, the second buffering state is that finite state machine is from the buffering that initial state transfer is high dirty data state State, the 3rd buffering state is that finite state machine is from the buffering state that the transfer of high dirty data state is initial state.
Optionally, the second processing unit 013 can be also used for:
When the state of finite state machine is low dirty data state, if finite state machine is in low dirty number Arrive predetermined period according to the time of state, then control finite state machine transfer for initial state, Jin Er When finite state machine is initial state, host virtual machine is carried out data thermal backup;
When the state of finite state machine is high dirty data state, if finite state machine is in high dirty number Arrive predetermined period according to the time of state, then control finite state machine transfer for initial state, Jin Er When finite state machine is initial state, host virtual machine is carried out data thermal backup.
The embodiment of the present invention provides a kind of equipment, by obtaining what host virtual machine current business produced Dirty data amount, compares dirty data amount with first threshold and Second Threshold, according to comparing knot Fruit generates the checkpoint of host virtual machine, and according to dirty data amount or the predetermined period of finite state machine Update the state of finite state machine, in order to according to the state of finite state machine, by main for generation void The checkpoint of plan machine carries out data thermal backup, it is possible to effectively reduce when virtual machine backs up user's industry The impact of business, improves the availability of virtual machine business.
A kind of equipment 02 of further embodiment of this invention offer, as shown in figure 11, including:
Processor (Processor) 021, communication interface (Communications Interface) 022, memorizer (Memory) 023, communication bus 024.
Processor 021, communication interface 022, memorizer 023 is completed by communication bus 024 Mutual communication.
Communication interface 022, is used for and net element communication.
Processor 021, is used for the program that performs 025, specifically can perform above-mentioned Fig. 1 or Fig. 2 The shown correlation step in embodiment of the method.
Specifically, program 025 can include program code, and program code includes computer operation Instruction.
Processor 021 is probably a central processor CPU (Central Processing Or specific integrated circuit ASIC(Application Specific Integrated Unit), Circuit), or be configured to implement the embodiment of the present invention one or more integrated circuits.
Memorizer 023 is used for program of depositing 025, and memorizer 023 may comprise high-speed RAM (Random Access Memory) memorizer, it is also possible to also include nonvolatile memory (Non-volatile Memory), for example, at least one disk memory.Program 025 is concrete May include that
Acquiring unit, for obtaining the dirty data amount that host virtual machine current business produces;
First processing unit, for comparing dirty data amount with first threshold and Second Threshold Relatively, generating the checkpoint of host virtual machine according to comparative result, Second Threshold is more than first threshold.
Further, it is also possible to including:
Second processing unit, for according to the default week in dirty data amount or finite state machine status Phase updates the state of finite state machine, in order to according to the state of finite state machine, by generate The checkpoint of host virtual machine carries out the data thermal backup corresponding with finite state machine;
Wherein, the state of finite state machine is used for representing that host virtual machine carries out product during data thermal backup The state of raw dirty data amount.
Optionally, it is also possible to including:
In generating the previous subnormal execution state of checkpoint of host virtual machine, by host virtual machine Cold page data copy the first relief area in advance to, and by the hot page number of described host virtual machine According to being prestored to the second relief area;
Optionally, configuring the first relief area, the second relief area in internal memory, wherein, first delays Rush district for storing the cold page data of Cold pages(), the second relief area is used for storing Hot The hot page data of pages();
Optionally, configuring relief area in internal memory, this relief area comprises Liang Gezi district: first delays Rushing district, the second relief area, wherein, the first relief area is used for storing the cold page of Cold pages( Data), the second relief area is used for storing the hot page data of Hot pages();
The cold page data of host virtual machine in first relief area is copied in checkpoint, and by In two relief areas, the hot page data of host virtual machine copies in checkpoint.
In program 025, implementing of each module may refer in Fig. 3 or embodiment illustrated in fig. 4 Corresponding module, be not repeated herein.
The embodiment of the present invention provides a kind of equipment, by obtaining what host virtual machine current business produced Dirty data amount, compares dirty data amount with first threshold and Second Threshold, according to comparing knot Fruit generates the checkpoint of host virtual machine, and according to dirty data amount or the predetermined period of finite state machine Update the state of finite state machine, in order to according to the state of finite state machine, the master that will generate The checkpoint of virtual machine carries out data thermal backup, it is possible to effectively reduce when virtual machine backs up user The impact of business, improves the availability of virtual machine business.
In several embodiments provided herein, it should be understood that disclosed equipment and Method, can realize by another way.Such as, apparatus embodiments described above is only It is only illustrative, such as, the division of described unit, it is only a kind of logic function and divides, Actual can have when realizing other dividing mode, the most multiple unit or assembly can in conjunction with or Person is desirably integrated into another system, or some features can be ignored, or does not performs.Another point, Shown or discussed coupling each other or direct-coupling or communication connection can be to pass through The INDIRECT COUPLING of some interfaces, device or unit or communication connection, can be electrical, machinery or Other form.
It addition, in equipment in each embodiment of the present invention and system, each functional unit is permissible It is integrated in a processing unit, it is also possible to be that the independent physics of unit includes, it is also possible to two Individual or two or more unit is integrated in a unit.And above-mentioned each unit both can use firmly The form of part realizes, it would however also be possible to employ hardware adds the form of SFU software functional unit and realizes.
The all or part of step realizing said method embodiment can be correlated with by programmed instruction Hardware complete, aforesaid program can be stored in a computer read/write memory medium, This program upon execution, performs to include the step of said method embodiment;And aforesaid storage is situated between Matter includes: (Read Only Memory is called for short for USB flash disk, portable hard drive, read only memory ROM), random access memory (Random Access Memory, be called for short RAM), The various medium that can store program code such as magnetic disc or CD.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is also Being not limited to this, any those familiar with the art is at the technology model that the invention discloses In enclosing, change can be readily occurred in or replace, all should contain within protection scope of the present invention. Therefore, protection scope of the present invention should be as the criterion with described scope of the claims.

Claims (12)

1. a virtual machine warm backup method, it is characterised in that including:
Obtain the dirty data amount that host virtual machine current business produces;
Described dirty data amount is compared with first threshold and Second Threshold, raw according to comparative result Becoming the checkpoint of described host virtual machine, described Second Threshold is more than described first threshold;
Described finite state machine is updated according to the predetermined period in described dirty data amount or finite state machine State, in order to according to the state of described finite state machine, to the described host virtual machine generated Checkpoint carries out the data thermal backup corresponding with the state of described finite state machine;
Wherein, to be used for representing that described host virtual machine carries out data hot standby for the state of described finite state machine The state of the dirty data amount produced during part.
Method the most according to claim 1, it is characterised in that described method also includes:
In generating the previous subnormal execution state of checkpoint of described host virtual machine, by described master The cold page data of virtual machine copies the first relief area in advance to, and by the hot page of described host virtual machine Face data are prestored to the second relief area;
The checkpoint of the described host virtual machine of described generation includes: by main described in described first relief area The cold page data of virtual machine copies in described checkpoint, and by described in described second relief area The hot page data of host virtual machine copies in described checkpoint.
Method the most according to claim 2, it is characterised in that described by described dirty data amount Compare with first threshold and Second Threshold, generate the inspection of described host virtual machine according to comparative result Make an inventory of and include:
If described dirty data amount is less than described first threshold, then postpone generating the inspection of described host virtual machine Make an inventory of, until the described dirty data amount of accumulation is more than or equal to described first threshold and less than described the Two threshold values, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, then postpone generating described master virtual The checkpoint of machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generates described checkpoint And suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, Described 3rd threshold value is more than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and less than described Second Threshold, Then generate the checkpoint of described host virtual machine.
Method the most according to claim 3, it is characterised in that described according to described dirty data Amount updates the state of finite state machine, in order to according to the state of described finite state machine, to generation The checkpoint of described host virtual machine carry out data thermal backup and include:
If described dirty data amount is more than or equal to described first threshold and less than described Second Threshold, then The state controlling described finite state machine is initial state, and then is initial state at described finite state machine Time described checkpoint is carried out data thermal backup;
If described dirty data amount is less than described first threshold, then control the state of described finite state machine For low dirty data state, and then extend when described finite state machine is low dirty data state and described normally hold Row state, thus postpone described host virtual machine and enter suspended state;
If described dirty data amount is more than or equal to described Second Threshold, then control described finite state machine State be 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 accumulates described 3rd threshold value, then generate described checkpoint and suspend described master Virtual machine, is sent to described standby virtual machine by described checkpoint by described cold migration pattern, thus Postpone described host virtual machine and enter described suspended state.
Method the most according to claim 4, it is characterised in that described according to described dirty data Amount updates the state of finite state machine, in order to according to the state of described finite state machine, to generation The checkpoint of described host virtual machine carry out data thermal backup and also include:
When the state of described finite state machine is described initial state, if described dirty data amount is less than institute State first threshold, then control described finite state machine from described initial state through the first buffering state transfer For described low dirty data state, and then control institute when described finite state machine status is low dirty data state State host virtual machine and extend described normal execution mode, thus postpone to enter described suspended state, so that Obtain described host virtual machine and carry out data thermal backup;
When the state of described finite state machine is described initial state, if described dirty data amount more than or During equal to described Second Threshold, then control described finite state machine and delay through second from described initial state Rushing state transfer is described high dirty data state, and then is described high dirty data state at described finite state machine Time control described host virtual machine and extend described normal execution mode, thus postpone to enter described hang-up shape 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 little In described Second Threshold, then control described finite state machine and delay through the 3rd from described high dirty data state Rushing state transfer is described initial state, and then when described finite state machine is described initial state to described Host virtual machine carries out data thermal backup;
When the state of described finite state machine is described low dirty data state, if described dirty data amount is big In or during equal to first threshold, then control the transfer of described finite state machine for described initial state, and then When described finite state machine is described initial state, described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described first buffering state, if described dirty data amount is big In or equal to described first threshold, then control the state transfer of described finite state machine for described initially State, and then when described finite state machine is described initial state, described host virtual machine is carried out data heat Backup;
When the state of described finite state machine is described second buffering state, if described dirty data amount is little In described Second Threshold, then the state transfer controlling described finite state machine is described initial state, enters And when described finite state machine is described initial state, described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described 3rd buffering state, if described dirty data amount is big In or equal to described Second Threshold, then the state transfer controlling described finite state machine is dirty for described height Data state, and then described host virtual machine is controlled when described finite state machine is described high dirty data state Extend described normal execution mode, thus postpone to enter described suspended state, so that described main void Plan machine carries out data thermal backup;
Wherein, described first buffering state is that described finite state machine shifts as described from described initial state The buffering state of low dirty data state, described second buffering state is that described finite state machine is from described initial state Transfer is the buffering state of described high dirty data state, described 3rd buffering state be described finite state machine from The transfer of described high dirty data state is the buffering state of described initial state.
Method the most according to claim 4, it is characterised in that described according to finite state machine In predetermined period update described finite state machine state, in order to according to described finite state machine State, the checkpoint of described host virtual machine generated is carried out data thermal backup and also includes:
When the state of described finite state machine is described low dirty data state, if described finite state machine The time being in described low dirty data state arrives described predetermined period, then control described finite state machine Transfer is described initial state, and then when described finite state machine is described initial state to described main void Plan machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if described finite state machine The time being in described high dirty data state arrives described predetermined period, then control described finite state machine Transfer is described initial state, and then when described finite state machine is described initial state to described main void Plan machine carries out data thermal backup.
7. a subscriber equipment, it is characterised in that including:
Acquiring unit, for obtaining the dirty data amount that host virtual machine current business produces;
First processing unit, for comparing described dirty data amount with first threshold and Second Threshold Relatively, generating the checkpoint of described host virtual machine according to comparative result, described Second Threshold is more than described First threshold;
Second processing unit, for according to presetting in described dirty data amount or finite state machine status Cycle updates the state of described finite state machine, in order to according to the state of described finite state machine, The checkpoint of the described host virtual machine generated is carried out the data corresponding with described finite state machine hot standby Part;
Wherein, to be used for representing that described host virtual machine carries out data hot standby for the state of described finite state machine The state of the dirty data amount produced during part.
Subscriber equipment the most according to claim 7, it is characterised in that described first processes list Unit is additionally operable to:
In generating the previous subnormal execution state of checkpoint of described host virtual machine, by described master The cold page data of virtual machine copies the first relief area in advance to, and by the hot page of described host virtual machine Face data are prestored to the second relief area;
Copy the cold page data of host virtual machine described in described first relief area to described checkpoint In, and copy the hot page data of host virtual machine described in described second relief area to described inspection In point.
Subscriber equipment the most according to claim 8, it is characterised in that described first processes list Unit specifically for:
If described dirty data amount is less than described first threshold, then postpone generating the inspection of described host virtual machine Make an inventory of, until the described dirty data amount of accumulation is more than or equal to described first threshold and less than described the Two threshold values, generate the checkpoint of described host virtual machine;
If described dirty data amount is more than or equal to described Second Threshold, then postpone generating described master virtual The checkpoint of machine, until the described dirty data amount of accumulation reaches the 3rd threshold value, generates described checkpoint And suspend described host virtual machine, described checkpoint is sent to standby virtual machine by cold migration pattern, Described 3rd threshold value is more than described Second Threshold;
If described dirty data amount is more than or equal to described first threshold, and less than described Second Threshold, Then generate the checkpoint of described host virtual machine.
Subscriber equipment the most according to claim 9, it is characterised in that described second processes Unit is used for:
If described dirty data amount is more than or equal to described first threshold and less than described Second Threshold, then The state controlling finite state machine is initial state, and then when described finite state machine is initial state pair Described checkpoint carries out data thermal backup;
If described dirty data amount is less than described first threshold, then control the state of described finite state machine For low dirty data state, and then extend when described finite state machine is low dirty data state and described normally hold Row state, thus postpone described host virtual machine and enter suspended state;
If described dirty data amount is more than or equal to described Second Threshold, then control described finite state machine State be high dirty data state, and then when the state of described finite state machine is in described high dirty data During state, if described dirty data amount accumulates described 3rd threshold value, then generate described checkpoint and suspend Described host virtual machine, is sent to described standby virtual machine by described checkpoint by described cold migration pattern, Thus postpone described host virtual machine and enter described suspended state.
11. subscriber equipmenies according to claim 10, it is characterised in that described second processes Unit is additionally operable to:
When the state of described finite state machine is described initial state, if described dirty data amount is less than institute State first threshold, then control described finite state machine from described initial state through the first buffering state transfer For described low dirty data state, and then control institute when described finite state machine status is low dirty data state State host virtual machine and extend described normal execution mode, thus postpone to enter described suspended state, so that Obtain described host virtual machine and carry out data thermal backup;
When the state of described finite state machine is described initial state, if described dirty data amount more than or During equal to described Second Threshold, then control described finite state machine and delay through second from described initial state Rushing state transfer is described high dirty data state, and then is described high dirty data state at described finite state machine Time control described host virtual machine and extend described normal execution mode, thus postpone to enter described hang-up shape 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 little In described Second Threshold, then control described finite state machine and delay through the 3rd from described high dirty data state Rushing state transfer is described initial state, and then when described finite state machine is described initial state to described Host virtual machine carries out data thermal backup;
When the state of described finite state machine is described low dirty data state, if described dirty data amount is big In or during equal to first threshold, then control the transfer of described finite state machine for described initial state, and then When described finite state machine is described initial state, described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described first buffering state, if described dirty data amount is big In or equal to described first threshold, then control the state transfer of described finite state machine for described initially State, and then when described finite state machine is described initial state, described host virtual machine is carried out data heat Backup;
When the state of described finite state machine is described second buffering state, if described dirty data amount is little In described Second Threshold, then the state transfer controlling described finite state machine is described initial state, enters And when described finite state machine is described initial state, described host virtual machine is carried out data thermal backup;
When the state of described finite state machine is described 3rd buffering state, if described dirty data amount is big In or equal to described Second Threshold, then the state transfer controlling described finite state machine is dirty for described height Data state, and then described host virtual machine is controlled when described finite state machine is described high dirty data state Extend described normal execution mode, thus postpone to enter described suspended state, so that described main void Plan machine carries out data thermal backup;
Wherein, described first buffering state is that described finite state machine shifts as described from described initial state The buffering state of low dirty data state, described second buffering state is that described finite state machine is from described initial state Transfer is the buffering state of described high dirty data state, described 3rd buffering state be described finite state machine from The transfer of described high dirty data state is the buffering state of described initial state.
12. subscriber equipmenies according to claim 10, it is characterised in that described second processes Unit is additionally operable to:
When the state of described finite state machine is described low dirty data state, if described finite state machine The time being in described low dirty data state arrives described predetermined period, then control described finite state machine Transfer is described initial state, and then when described finite state machine is described initial state to described main void Plan machine carries out data thermal backup;
When the state of described finite state machine is described high dirty data state, if at described finite state machine Arrive described predetermined period in the time of described high dirty data state, then control the transfer of described finite state machine For described initial state, and then when described finite state machine is described initial state, described host virtual machine is entered Row 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 CN103412800A (en) 2013-11-27
CN103412800B true 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)

Families Citing this family (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
CN104239120B (en) * 2014-08-28 2018-06-05 华为技术有限公司 The method, apparatus and system of a kind of status information synchronization of virtual machine
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
CN114116191B (en) * 2021-06-24 2023-09-01 荣耀终端有限公司 Memory cold page processing method and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101876926B (en) * 2009-11-26 2012-06-20 北京航空航天大学 Asymmetric software triple-computer hot backup fault-tolerant method
CN102073556B (en) * 2010-12-08 2012-11-28 北京航空航天大学 Hot backup and restoration method, equipment and system for virtual machine
CN103493021B (en) * 2011-04-21 2016-06-22 国际商业机器公司 Method and system for fault monitoring and reparation

Also Published As

Publication number Publication date
CN103412800A (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103412800B (en) A kind of virtual machine warm backup method and equipment
US20220269645A1 (en) Memory mat as a register file
CN103631633B (en) Virtual machine total-system online migration method, device and system
US7971029B2 (en) Barrier synchronization method, device, and multi-core processor
US10467048B2 (en) Techniques for virtual machine migration
CN102792276B (en) Buffer disk in flashcopy cascade
US7200688B2 (en) System and method asynchronous DMA command completion notification by accessing register via attached processing unit to determine progress of DMA command
US20180246751A1 (en) Techniques to select virtual machines for migration
CN109725840A (en) It is throttled using asynchronous wash away to write-in
CN105980991A (en) Memory resource sharing among multiple compute nodes
CN102136993B (en) A kind of methods, devices and systems of Data Migration
CN111124277A (en) Deep learning data set caching method, system, terminal and storage medium
CN105446893A (en) Data storage method and device
CN106201659A (en) A kind of method of live migration of virtual machine and host
CN103150267B (en) Cache synchronization method among multiple controllers
CN102597972B (en) virtual computer system, area management method
WO2013119905A1 (en) Method for distributed caching and scheduling for shared nothing computer frameworks
CN108415798A (en) A kind of fault-tolerant implementation method of virtual machine based on KVM
CN106484073A (en) The method of energy saving of system and energy conserving system
JP5776813B2 (en) Multi-core processor system, control method and control program for multi-core processor system
US10025639B2 (en) Energy efficient supercomputer job allocation
US9274877B2 (en) Incident handling
CN115562805A (en) Resource migration method and device and electronic equipment
CN105183738A (en) Distributed memory file system based on descent and checkpoint technology
Afonso et al. Heterogeneous CPU/FPGA reconfigurable computing system for avionic test application

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20161228

Termination date: 20180805