CN103019884A - Memory page de-weight method and memory page de-weight device based on virtual machine snapshot - Google Patents

Memory page de-weight method and memory page de-weight device based on virtual machine snapshot Download PDF

Info

Publication number
CN103019884A
CN103019884A CN2012104777513A CN201210477751A CN103019884A CN 103019884 A CN103019884 A CN 103019884A CN 2012104777513 A CN2012104777513 A CN 2012104777513A CN 201210477751 A CN201210477751 A CN 201210477751A CN 103019884 A CN103019884 A CN 103019884A
Authority
CN
China
Prior art keywords
page
hash
content
host
virtual machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012104777513A
Other languages
Chinese (zh)
Other versions
CN103019884B (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.)
Beihang University
Original Assignee
Beihang University
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 Beihang University filed Critical Beihang University
Priority to CN201210477751.3A priority Critical patent/CN103019884B/en
Publication of CN103019884A publication Critical patent/CN103019884A/en
Application granted granted Critical
Publication of CN103019884B publication Critical patent/CN103019884B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a memory page de-weight method and memory page de-weight device based on virtual machine snapshot, which are applied to a virtual machine snapshot system. The method comprises the following steps: a host computer carries out combination processing on memory pages (of the same content) of memory pages corresponding to each virtual machine according to the content of the memory pages corresponding to each virtual machine; and the memory pages (subjected to combination processing) corresponding to each virtual machine are transmitted to a storage system. Problems that snapshot backup data occupy a large quantity of disc space in a virtual machine snapshot technique are modified; and meanwhile the time for backing up the snapshot is reduced.

Description

Page removing repeat method and device based on virtual machine snapshot
Technical field
The present invention relates to field of computer technology, relate in particular to a kind of page removing repeat method and device based on virtual machine snapshot.
Background technology
The virtual machine snapshot technology is the record of realizing a virtual machine running status, and virtual machine can be rolled back at any time the virtual machine running status when recording; Hinder for some reason and when losing efficacy at virtual machine like this, can be from the state of the normal operation of recording before the snapshot point return to, thus realize the backup of virtual machine.
Usually, the virtual machine running status comprises network state, internal storage state, CPU state, reaches Disk State etc.Wherein, the data volume of the page that internal storage state need to be preserved is larger, thereby so that the snapshot data are larger.For example, for cluster virtual machine (virtual machines of 8 1G internal memories) snapshot, the internal storage state that needs to preserve then is the internal memory sum (8G) of virtual machine in the cluster.
Further, the time interval of snapshot is generally a few minutes, and the snapshot of this high frequency has further increased again the snapshot data volume.For example calculate with 10 minutes the snapshot time interval, need 144 snapshots every day, need to occupy the disk space of 1T.
Therefore, in the virtual machine snapshot technology, the snapshot data that data volume is larger not only take a large amount of disk spaces, and increase the snapshot time.
Summary of the invention
The invention provides a kind of page removing repeat method and device based on virtual machine snapshot, there is the problem that takies a large amount of disk spaces in the snapshot data that are used for solution virtual machine snapshot technology.
First aspect of the present invention provides a kind of page removing repeat method based on virtual machine snapshot, comprising:
Host is according to the content of page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding;
Page corresponding to each virtual machine after the described merging processing sent to storage system.
Second aspect of the present invention provides a kind of page removing repeat method based on virtual machine snapshot, is applied to the virtual machine snapshot system, comprising:
Storage system receives respectively the page that each host sends, and the page that described each host sends is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding;
Described storage system merges processing according to the content of the page of each host transmission with the identical page of content in the page of each host transmission;
Described storage system is preserved the page after described merging is processed.
The 3rd aspect of the present invention provides a kind of host, and operation has a plurality of virtual machines, comprising:
The first processing module is used for the content according to page corresponding to a plurality of virtual machines that move on the described host, and the identical page of content merges processing in the page that described a plurality of virtual machines are corresponding;
Sending module is used for page corresponding to each virtual machine after the described merging processing sent to storage system.
The 4th aspect of the present invention provides a kind of storage system, is applied to the virtual machine snapshot system, comprising:
Receiver module is used for receiving respectively the page that each host sends, and the page that described each host sends is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding;
The second processing module is used for the content according to the page of each host transmission, and the identical page of content in the page of each host transmission is merged processing;
Preserve module, be used for preserving the page after described merging is processed.
The 5th aspect of the present invention provides a kind of virtual machine snapshot system, comprising:
Above-mentioned host and storage system.
The embodiment of the invention is by the content of host according to page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding; Page corresponding to each virtual machine after the described merging processing sent to storage system, can reduce the data volume that host sends to the page of storage system, thereby there is the problem that takies a large amount of disk spaces in the snapshot data that can improve in the virtual machine snapshot technology; Send to simultaneously the data volume of the page of storage system by reducing host, can reduce the network overhead between host and the storage system, also can reduce the snapshot time.
Description of drawings
The schematic flow sheet based on the page removing repeat method of virtual machine snapshot that Fig. 1 provides for one embodiment of the invention;
The schematic flow sheet based on the page removing repeat method of virtual machine snapshot that Fig. 2 provides for another embodiment of the present invention;
The structural representation of the host that Fig. 3 provides for another embodiment of the present invention;
The structural representation of the storage system that Fig. 4 provides for another embodiment of the present invention;
Fig. 5 is the Organization Chart of the virtual machine snapshot system of Fig. 1-application embodiment illustrated in fig. 4;
Fig. 6 is the Hash representation intention of Fig. 1-application embodiment illustrated in fig. 4;
Fig. 7 is the process synoptic diagram that the Hash structural table of Fig. 1-application embodiment illustrated in fig. 4 is set up;
Fig. 8 is the process synoptic diagram that the Hash structural table of Fig. 1-application embodiment illustrated in fig. 4 upgrades;
Fig. 9 is the synoptic diagram of the data packet format of Fig. 1-application embodiment illustrated in fig. 4.
Embodiment
The schematic flow sheet based on the page removing repeat method of virtual machine snapshot that Fig. 1 provides for one embodiment of the invention; Fig. 5 is the Organization Chart of the virtual machine snapshot system of Fig. 1-application embodiment illustrated in fig. 4, and such as Fig. 1 and shown in Figure 5, the page removing repeat method based on virtual machine snapshot of present embodiment specifically comprises:
101, host is according to the content of page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding.
Usually, each virtual machine moves same operating system mostly in the cluster virtual machine, carrying is similarly used, identical so that a large amount of data are arranged in each virutal machine memory, the Organization Chart of virtual machine snapshot system shown in Figure 5 is the snapshot for cluster virtual machine, carry out the backup of data take cluster virtual machine as unit, for a large amount of identical internal storage data that exists in the snapshot processes that reduces cluster virtual machine, reduce the snapshot time, in the embodiment of the invention, each host is according to the content of the page that each virtual machine is corresponding in this host, and the page that content is identical merges processing, during specific implementation:
For example, shown in Figure 5, virtual machine VM1 and virtual machine VM2 are arranged in the first host, supposing respectively has 4 pages among VM1 and the VM2, and the first host obtains 4 pages among the virtual machine VM1 and 4 pages among the virtual machine VM2; According to each self-corresponding 4 content that page is corresponding among virtual machine VM1 and the virtual machine VM2, the content of the page 3 among the content of determining page 1 among the VM1 and page 3 and the VM2 is identical, this host can merge processing with the page 1 among the VM1 and the page 3 among page 3 and the VM2, be that optional one of them page sends to storage system in page 1 that host can be in VM1 and the page 3 among page 3 and the VM2, do not need the page 1 among the VM1 and the page 3 among page 3 and the VM2 are all sent to storage system.
Need to prove that in actual applications, the page quantity of each virtual machine is more, suppose that virutal machine memory is 1G, then this virtual machine comprises the 256K page, wherein, K is the unit that is used for expressing quantity in the computing machine, and 1K=1024bit is if adopt the mode that compares page by page more consuming time.
In an embodiment of the invention, in order to improve page content efficient relatively, adopt the Hash hash algorithm to calculate the hash value of each memory pages, Hash values corresponding to each page according to calculating makes up RBTree corresponding to each page or chained list; Wherein, page information corresponding to each page that Hash values is identical is inserted in the Hash Hash node of described Hash values correspondence on described RBTree or chained list; During specific implementation:
Fig. 6 is the synoptic diagram of the Hash structural table of Fig. 1-application embodiment illustrated in fig. 4, and as shown in Figure 6, the Hash structural table comprises bucket (bucket), Hash node (hash node), page information (page item);
Wherein, bucket is mainly used to realize the quick indexing to page, and bucket comprises Hash bucket (hashbucket) and address bucket (addr bucket);
Wherein, addr bucket is used for page information page item is carried out index, and hash bucket makes up RBTree or chained list according to the hash value among the page information page item.
Wherein, stored the page or leaf of one group of similar hash value among each hash bucket, for example, a hash value can represent with 32 bits, suppose that the hash value that front 20 bits of hash value are identical is as similar hash value, in the present embodiment, similar hash value can be inserted among the same hash bucket, be used for improving the index efficiency to page; Suppose that the Hash structural table forms hash bucket by the 1M element, wherein each hash bucket is front 20 bit values of hash value, and therefore, each hash bucket can express at most 4096 (the different hash node of (2^12) individual hash value.
Wherein, hash node can be with the form carry of chained list or RBTree on the Hash structural table, if the hash node number in each bucket array element less than 3, then with chain sheet form carry on the Hash structural table; If the hash node number in each bucket array element is little large or equal 3, then with the form carry of RBTree on the Hash structural table.
Each Hash node is safeguarding the page information tabulation of corresponding page, and the page item that each page that hash value is identical is corresponding is inserted in page information tabulation corresponding to described Hash values corresponding hash node on described RBTree or chained list.
Wherein, page item is safeguarding the page information of corresponding page, and concrete example is such as the address that comprises page or leaf, affiliated virtual machine, hash value, web update information etc.
Below foundation and the renewal of Hash structural table is described in detail:
Fig. 7 is the process synoptic diagram that the Hash structural table of Fig. 1-application embodiment illustrated in fig. 4 is set up, host obtains all pages of virtual machine, make up respectively page information page item corresponding to each page, the page information page item of each page is deposited among the addr bucket according to the page address of correspondence, while is according to the content of each page, calculate the hash value of each page, according to the hash value of each page the page information page item of the page of correspondence is stored in the page information tabulation of hashnode of the correspondence among the hash bucket; Specific implementation comprises as shown in Figure 7:
1, obtains a page.
Present embodiment obtains content and the page information of the either memory page or leaf in the virtual machine by host.
2, calculate the hash value.
Specifically according to the content of this page, calculate the hash value of this page.
3, make up page item.
Particularly, make up the page item of page, hash value or the information such as page address information or the described virtual machine numbering of this page of the corresponding page of record in each page item.
4, page item is stored in the item corresponding among the addr bucket according to page address.
5, the hash value according to page item finds hash node node corresponding among the hash bucket.
For example, in the Hash structural table, inquire about corresponding hash bucket according to the front 20bit value of hash value corresponding to this page, further according to the hash node of rear 12bit value definite correspondence in the hash of correspondence bucket of the hash value of each this page.
6, whether hash node number is 0, if execution in step 7 then, otherwise execution in step 12.
7, newly-built hash node.
Assignment hash value is the hash value of page item, and the hash value that is about to this page is defined as the hash value of this newly-built hash node.
8, hash node is inserted in the chained list.
The hash node that this is newly-built is inserted in the chained list.
9, page item is joined in the page information tabulation of hash node.
The page item of this page is inserted in the page information tabulation of this newly-built hash node.
10, whether hash node number is less than 3; If end process then, otherwise execution in step 11.
Particularly, inquire about other the hash node that whether also exists among the hash bucket that this newly-built hash node belongs to, if determine other the number of hash node less than 2, determine that then hash node number among the hash bucket that this newly-built hash node belongs to is less than 3.
11, hash node is organized as RBTree.
Particularly, inquire about other the hash node that whether also exists among the hash bucket that this newly-built hash node belongs to, if determine that other the number of hash node is more than or equal to 2, determine that then hash node number among the hash bucket that this newly-built hash node belongs to more than or equal to 3, then is organized as RBTree with hashnode.
12, whether hash node is chained list, if carry out 13, otherwise carries out 19.
If the hash node that above-mentioned steps 6 is determined is not 0, determine further then whether hash node is chained list.
13, the traversal chained list is searched hash node according to the hash value of page item.
Specifically search corresponding hash node according to the hash value of the page information page item of page.
14, whether find hash node, if execution in step 15, otherwise execution in step 7.
15, the content of other pages in the content of this page and the hash node chained list relatively.
16, whether find same page, if carry out 17, otherwise execution in step 18.
17, merge this page, the page item of this page is inserted in the page information tabulation of hash node.
18, the page item with this page inserts in the page information tabulation of hash node.
19, the traversal RBTree is searched hash node according to the hash value of page item.
In the above-mentioned steps 12, if determine that hash node is not chained list, then further travel through RBTree, search hash node according to the hash value of page item.
20, whether find hash node, if carry out 15, otherwise carry out 21.
21, newly-built hash node.
Assignment hash value is the hash value of page item, and the hash value that is about to this page is defined as the hash value of this newly-built hash node.
22, hash node is inserted in the RBTree.
Specifically this newly-built hash node is inserted in the RBTree.
23, page item is joined in the page information tabulation of hash node.
Specifically the page item with this page is inserted in the page information tabulation of this newly-built hash node.
Fig. 8 is the process synoptic diagram that the Hash structural table of Fig. 1-application embodiment illustrated in fig. 4 upgrades, in the virtual machine operational process, the content of supposing page changes, find page item corresponding to this page according to the address of page, recomputate the hash value of this page, according to the hash value that recomputates, determine the hash bucket of this hash value ownership, hash bucket in ownership determines corresponding hashnode, the page item that this page is corresponding inserts among the hash node that determines, specific implementation comprises as shown in Figure 8:
24, obtain a page;
Present embodiment obtains content and the page information pageitem of the either memory page or leaf in the virtual machine by host.
25, according to the corresponding page item of this page address index in addr bucket;
Particularly, according to the address of page, in addr bucket, obtain the page information page item corresponding with this page address, in this corresponding page information page item, obtain the hash value of this page.
26, calculate the hash value of this page;
27, whether the hash value changes, if execution in step 28 and 33, otherwise execution in step 34;
The hash value of the page that step 26 is calculated and the hash value of this page that step 25 is obtained compare, and determine whether the hash value of this page variation has occured.
28, this page item of deletion from the page information tabulation of hash node;
If step 27 determines the hash value of this page variation has occured, the hash value of this page that then obtains according to step 25 is determined corresponding hash node, deletes page item corresponding to this page in the page information of the hash of correspondence node is tabulated.Need to prove, be inserted with the page item corresponding to page of identical hash value in the hash node tabulation.
29, whether hash node tabulation is empty, if execution in step 30, otherwise execution in step 33;
30, delete this hash node;
31, whether Hash node number less than 3, if execution in step 32, otherwise end process;
The hash bucket that supposes the hash node ownership of this deletion is RBTree, and behind step 30 deletion hashnode, further whether the Hash node number among the hash bucket of the hash node of definite this deletion ownership is less than 3.
32, hash node is formed chained list;
Suppose Hash node number among the hash bucket of hash node ownership of step 30 deletion less than 3, the hash node of other among the hash bucket that the hash node that then will delete belongs to composition chained list.
33, upgrade the page item of this page;
If step 27 is determined the hash value of this page variation has been occured, the hash value of the page that then calculates according to step 26, upgrade the hash value among the page item of this page, the hash value of the page that calculates according to step 26, redefine the hash bucket corresponding with this hash value, for example determine corresponding hash bucket according to the front 20bit value of hash value, if should have the hashnode that mates with this hash value among the correspondence hash bucket, then directly the page item of the page that this hash value is corresponding is inserted in the page information tabulation of corresponding hash node; If should not have the hash node that mates with this hash value among the correspondence hash bucket, then make up new hash node, and in the new hash node tabulation that makes up, insert this hash node.
34, whether this page content changes, if execution in step 28, otherwise end process;
If step 27 is determined the hash value of this page and do not changed, determine further then whether the content of this page changes.
In an embodiment of the invention, based on the Hash structural table of above-mentioned structure, host is according to the content of page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding, specifically comprises:
Described host utilization data packet format as shown in Figure 9, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item.
102, page corresponding to each virtual machine after the described merging processing sent to storage system.
Particularly, host respectively with the Packet Generation of the page that each Hash node is corresponding in the described Hash structural table to storage system;
In order to reduce analysis of the data packet and the processing cost of storage system to receiving, in an embodiment of the invention, consult a kind of data packet format between host and the storage system, wherein, data packet format as shown in Figure 9, present embodiment utilizes content and the page information of page corresponding to each virtual machine after this default data packet format encapsulation merging is processed, and content and the page information of each page after the described encapsulation process sent to storage system.
The embodiment of the invention is by the content of host according to page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding; Page corresponding to each virtual machine after the described merging processing sent to storage system, can reduce the data volume that host sends to the page of storage system, thereby there is the problem that takies a large amount of disk spaces in the snapshot data that can improve in the virtual machine snapshot technology; Send to simultaneously the data volume of the page of storage system by reducing host, can reduce the network overhead between host and the storage system, also can reduce the snapshot time;
Simultaneously, present embodiment encapsulates content and the page information of the page that needs transmission by the data packet format of consulting between host and the storage system, can reduce analysis of the data packet and the processing cost of storage system to receiving, also can realize reducing the purpose of snapshot time.
The schematic flow sheet based on the page removing repeat method of virtual machine snapshot that Fig. 2 provides for another embodiment of the present invention; As shown in Figure 2, comprising:
201, storage system receives respectively the page that each host sends.
Wherein, the page of described each host transmission is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding.
In order to reduce analysis of the data packet and the processing cost of storage system to receiving, in an embodiment of the invention, consult a kind of data packet format between host and the storage system, wherein, data packet format is for example shown in Figure 9, in the present embodiment, storage system receives respectively after the page of each host transmission, resolve the page that each host sends according to data packet format shown in Figure 9, obtain respectively corresponding content and page information corresponding to described page of page that each host sends.
202, described storage system merges processing according to the content of the page of each host transmission with the identical page of content in the page of each host transmission.
For example shown in Figure 5, comprise 5 pages in the page information that the first host sends, comprise 4 pages in the page information that the second host sends, comprise 3 pages in the page information that the 3rd host sends;
Wherein, the content of the first page that the first host sends is identical with the content of the 3rd page that the second host sends, and therefore, storage system can merge processing with the page of this identical content;
The content of the second page that the first host sends is identical with the content of the 3rd page that the 3rd host sends, and therefore, storage system can merge processing with the page of this identical content;
The content of the 4th page that the first host sends is identical with the content of the first page that the second host sends, and therefore, storage system can merge processing with the page of this identical content;
The content of the 5th page that the first host sends is identical with the content of the first page that the 3rd host sends, and therefore, storage system can merge processing with the page of this identical content;
Wherein, storage system merges processing with the page of this identical content, refers to that specifically storage system can choose a page wantonly and preserve and get final product in the page of identical content.
Need to prove that in actual applications, the page quantity that each host sends is more, if adopt the mode that compares page by page more consuming time.
In an embodiment of the invention, in order to improve page content efficient relatively, content according to each page, adopt the Hash hash algorithm to calculate the hash value of each page, according to Hash values corresponding to each page that calculates, make up Hash structural table corresponding to each page, wherein, the page information of each page that Hash values is identical is inserted in the page information tabulation of described Hash values corresponding Hash Hash node on described Hash structural table; Specific implementation can with reference to the detailed content in the step 101 among figure 1 embodiment, repeat no more.
In an embodiment of the invention, based on the Hash structural table of above-mentioned structure, described storage system merges processing according to the content of the page of each host transmission with the identical page of content in the page of each host transmission, comprising:
The data packet format that described storage system utilization is default, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item.
203, described storage system is preserved the page after described merging is processed.
Particularly, storage system is preserved the packet of the page that each Hash node is corresponding in the described Hash structural table respectively.
The page that the embodiment of the invention sends according to each host by storage system, the content of the page that sends according to each host, the identical page of content in the page of each host transmission is merged processing, and preserve page after described merging is processed, thereby can reduce the disk expense, save disk space;
Simultaneously, present embodiment encapsulates content and the page information of the page that needs transmission by the data packet format of consulting between host and the storage system, can reduce analysis of the data packet and the processing cost of storage system to receiving, also can realize reducing the purpose of snapshot time.
The structural representation of the host that Fig. 3 provides for another embodiment of the present invention; Wherein, the a plurality of virtual machines that move on the described host, as shown in Figure 3, host comprises: the first processing module 301, be used for the content according to page corresponding to a plurality of virtual machines that move on the described host, the identical page of content merges processing in the page that described a plurality of virtual machines are corresponding;
Sending module 302 is used for page corresponding to each virtual machine that the first processing module 301 merges after processing sent to storage system;
In one embodiment of the present invention, host also comprises:
Hash module 303, concrete content and the page information that is used for obtaining page corresponding to each virtual machine; According to the content of each page, utilize the Hash hash algorithm, calculate hash value corresponding to each page; According to hash value corresponding to each page that calculates, make up the Hash structural table corresponding with each page, described Hash structural table comprises RBTree and/or chained list; The page information of each page is inserted in Hash node corresponding to hash value corresponding with each page in the described Hash structural table.
Wherein, the Hash structural table of Hash module 303 structures can improve the first processing module 301 and carry out page content efficient relatively.
In one embodiment of the present invention, host also comprises:
The first processing module 301, the concrete default data packet format of utilization that is used for, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item;
Sending module 302, the Packet Generation of the page corresponding with described each Hash node of Hash structural table after also being used for respectively the first processing module 301 being processed is to storage system.
The embodiment of the invention is by the content of host according to page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding; Page corresponding to each virtual machine after the described merging processing sent to storage system, can reduce the data volume that host sends to the page of storage system, thereby there is the problem that takies a large amount of disk spaces in the snapshot data that can improve in the virtual machine snapshot technology; Send to simultaneously the data volume of the page of storage system by reducing host, can reduce the network overhead between host and the storage system, also can reduce the snapshot time;
Simultaneously, present embodiment encapsulates content and the page information of the page that needs transmission by the data packet format of consulting between host and the storage system, can reduce analysis of the data packet and the processing cost of storage system to receiving, also can realize reducing the purpose of snapshot time.
The structural representation of the storage system that Fig. 4 provides for another embodiment of the present invention is applied to the virtual machine snapshot system, and as shown in Figure 4, storage system comprises:
Receiver module 401 is used for receiving respectively the page that each host sends, and the page that described each host sends is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding;
The second processing module 402 is used for the content according to the page of each host transmission, and the identical page of content in the page of each host transmission is merged processing;
Preserve module 403, be used for preserving the page that the second processing module 402 merges after processing;
Described storage system also comprises:
Parsing module 404 is used for resolving the page that each host sends according to default data packet format after receiver module 401 receives respectively the page information of each host transmission, obtains respectively corresponding content and the page information of page that each host sends.
Hash module 405 is used for the content according to each page after parsing module 404 parsings, utilizes the Hash hash algorithm, calculates hash value corresponding to each page; According to hash value corresponding to each page that calculates, make up the Hash structural table corresponding with each page, described Hash structural table comprises RBTree and/or chained list; The page information of each page is inserted in Hash node corresponding to hash value corresponding with each page in the described Hash structural table.Wherein, the Hash structural table of Hash module 405 structures can improve the second processing module 402 and carry out page content efficient relatively.
The second processing module 402, the concrete default data packet format of utilization that is used for, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item.
Wherein, preserve module 403, the concrete packet that is used for preserving respectively the page corresponding with described each Hash node of Hash structural table after 402 merging of the second processing module are processed.
The page that the embodiment of the invention sends according to each host by storage system, the content of the page that sends according to each host, the identical page of content in the page of each host transmission is merged processing, and preserve page after described merging is processed, thereby can reduce the disk expense, save disk space;
Simultaneously, present embodiment encapsulates content and the page information of the page that needs transmission by the data packet format of consulting between host and the storage system, can reduce analysis of the data packet and the processing cost of storage system to receiving, also can realize reducing the purpose of snapshot time.
Another embodiment of the present invention provides a kind of virtual machine snapshot system, comprising:
The as shown in Figure 3 host that provides of embodiment and the as shown in Figure 4 storage system that provides of embodiment, wherein, the content of host can be with reference to associated description in the host that provides embodiment illustrated in fig. 3, the content of storage system can with reference to associated description in the storage system that provides embodiment illustrated in fig. 4, repeat no more.
Need to prove, when virtual machine hinders inefficacy for some reason, whole cluster virtual machine need to roll back to a snapshot point, during specific implementation, for example read content and the page information corresponding to this page of the page of preserving in the storage system, wherein, for example comprise page address, virtual machine sign, the residing host information of virtual machine in the page information, then content and the corresponding page information with this page sends to respectively corresponding host, respectively the page address of this page content according to correspondence is written in the internal memory of corresponding virtual machine by each host.
One of ordinary skill in the art will appreciate that: all or part of step that realizes above-mentioned each embodiment of the method can be finished by the relevant hardware of programmed instruction.Aforesaid program can be stored in the computer read/write memory medium.This program is carried out the step that comprises above-mentioned each embodiment of the method when carrying out; And aforesaid storage medium comprises: the various media that can be program code stored such as ROM, RAM, magnetic disc or CD.
It should be noted that at last: above each embodiment is not intended to limit only in order to technical scheme of the present invention to be described; Although with reference to aforementioned each embodiment the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment puts down in writing, and perhaps some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. the page removing repeat method based on virtual machine snapshot is characterized in that, comprising:
Host is according to the content of page corresponding to each virtual machine, and the identical page of content merges processing in the page that each virtual machine is corresponding;
Page corresponding to each virtual machine after the described merging processing sent to storage system.
2. method according to claim 1 is characterized in that, host is according to the content of page corresponding to each virtual machine, and the identical page of content merges before the processing in the page that each virtual machine is corresponding, specifically comprises:
Described host obtains content and the page information of page corresponding to each virtual machine;
According to the content of each page, utilize the Hash hash algorithm, calculate hash value corresponding to each page;
According to hash value corresponding to each page that calculates, make up the Hash structural table corresponding with each page, described Hash structural table comprises RBTree and/or chained list;
The page information of each page is inserted in the page information tabulation of Hash node corresponding with the hash value of each page in the described Hash structural table.
3. method according to claim 2 is characterized in that, the identical page of content merges processing in the page that each virtual machine is corresponding, specifically comprises:
According to default data packet format, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item.
4. the page removing repeat method based on virtual machine snapshot is characterized in that, comprising:
Storage system receives respectively the page that each host sends, and the page that described each host sends is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding;
Described storage system merges processing according to the content of the page of each host transmission with the identical page of content in the page of each host transmission;
Described storage system is preserved the page after described merging is processed.
5. method according to claim 4 is characterized in that, the content of the page that described storage system sends according to each host, and the identical page of content merges before the processing in the page that each host is sent, and comprising:
Described storage system is resolved the page that each host sends according to default data packet format, obtains respectively corresponding content and page information corresponding to described page of page that each host sends.
6. method according to claim 5, it is characterized in that, described storage system is resolved the page that each host sends according to default data packet format, obtains respectively after page information corresponding to content corresponding to page that each host sends and described page, comprising:
Described storage system is utilized the Hash hash algorithm according to the content of each page, calculates hash value corresponding to each page;
According to hash value corresponding to each page that calculates, make up the Hash structural table corresponding with each page, described Hash structural table comprises RBTree and/or chained list;
The page information of each page is inserted in the page information tabulation of Hash node corresponding with the hash value of each page in the described Hash structural table.
7. method according to claim 6 is characterized in that, described storage system merges processing according to the content of the page of each host transmission with the identical page of content in the page of each host transmission, comprising:
The data packet format that described storage system utilization is default, described data packet format comprises at least one page content list item and the page information list item corresponding with each page content list item, the content of the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in each page content list item, and each page information that comprises in the page information tabulation with the page that each Hash node is corresponding in the described Hash structural table is encapsulated into respectively in the corresponding page information list item.
8. host, operation has a plurality of virtual machines, it is characterized in that, comprising:
The first processing module is used for the content according to page corresponding to a plurality of virtual machines that move on the described host, and the identical page of content merges processing in the page that described a plurality of virtual machines are corresponding;
Sending module is used for page corresponding to each virtual machine after the described merging processing sent to storage system.
9. a storage system is applied to the virtual machine snapshot system, it is characterized in that, comprising:
Receiver module is used for receiving respectively the page that each host sends, and the page that described each host sends is to obtain after the identical page of content merges processing in described each host page that each virtual machine is corresponding;
The second processing module is used for the content according to the page of each host transmission, and the identical page of content in the page of each host transmission is merged processing;
Preserve module, be used for preserving the page after described merging is processed.
10. a virtual machine snapshot system is characterized in that, comprising:
Host as claimed in claim 8 and storage system as claimed in claim 9.
CN201210477751.3A 2012-11-21 2012-11-21 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot Active CN103019884B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210477751.3A CN103019884B (en) 2012-11-21 2012-11-21 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210477751.3A CN103019884B (en) 2012-11-21 2012-11-21 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot

Publications (2)

Publication Number Publication Date
CN103019884A true CN103019884A (en) 2013-04-03
CN103019884B CN103019884B (en) 2015-07-01

Family

ID=47968514

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210477751.3A Active CN103019884B (en) 2012-11-21 2012-11-21 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot

Country Status (1)

Country Link
CN (1) CN103019884B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104035822A (en) * 2014-05-28 2014-09-10 中国科学院计算技术研究所 Low-cost efficient internal storage redundancy removing method and system
CN104281818A (en) * 2013-07-11 2015-01-14 中国移动通信集团公司 Disk data safety protection method and monitor in virtual machine architecture
CN104933054A (en) * 2014-03-18 2015-09-23 上海帝联信息科技股份有限公司 Uniform resource locator (URL) storage method and device of cache resource file, and cache server
CN105022656A (en) * 2014-04-21 2015-11-04 中国电信股份有限公司 Management method and device of virtual machine snapshot
WO2016037344A1 (en) * 2014-09-12 2016-03-17 Intel Corporation Memory and resource management in a virtual computing environment
WO2016141719A1 (en) * 2015-03-11 2016-09-15 华为技术有限公司 Channel detection method and apparatus
CN106874119A (en) * 2017-02-25 2017-06-20 郑州云海信息技术有限公司 Merging method and device based on the scanning of homogeneity internal memory
CN107329836A (en) * 2017-07-13 2017-11-07 北京元心科技有限公司 Multi-system memory management method and device and mobile terminal
CN110209489A (en) * 2018-02-28 2019-09-06 贵州白山云科技股份有限公司 A kind of EMS memory management process and device suitable for memory page structure
US10467106B2 (en) 2017-05-24 2019-11-05 Industrial Technology Research Institute Data processing method, data processing system, and non-transitory computer program product for controlling a workload delay time
CN113076175A (en) * 2021-03-26 2021-07-06 北京汇钧科技有限公司 Memory sharing method and device for virtual machine
CN114138424A (en) * 2022-02-07 2022-03-04 苏州浪潮智能科技有限公司 Virtual machine memory snapshot generation method and device and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174943A1 (en) * 2009-01-07 2010-07-08 Lenovo (Beijing) Limited Method for restoring client operating system-based system, virtual machine manager and system using the same
CN102331949A (en) * 2011-10-12 2012-01-25 华为技术有限公司 Methods for generating and restoring memory snapshot of virtual machine, device and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100174943A1 (en) * 2009-01-07 2010-07-08 Lenovo (Beijing) Limited Method for restoring client operating system-based system, virtual machine manager and system using the same
CN102331949A (en) * 2011-10-12 2012-01-25 华为技术有限公司 Methods for generating and restoring memory snapshot of virtual machine, device and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
VMWARE CORPORATION: "《Understanding Memory Resource Management in VMware ESX Server》", 26 August 2009 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104281818B (en) * 2013-07-11 2017-09-05 中国移动通信集团公司 Hard disk data protection method and monitor under virtual machine architecture
CN104281818A (en) * 2013-07-11 2015-01-14 中国移动通信集团公司 Disk data safety protection method and monitor in virtual machine architecture
CN104933054A (en) * 2014-03-18 2015-09-23 上海帝联信息科技股份有限公司 Uniform resource locator (URL) storage method and device of cache resource file, and cache server
CN104933054B (en) * 2014-03-18 2018-07-06 上海帝联信息科技股份有限公司 The URL storage methods and device of cache resource file, cache server
CN105022656A (en) * 2014-04-21 2015-11-04 中国电信股份有限公司 Management method and device of virtual machine snapshot
CN105022656B (en) * 2014-04-21 2018-09-14 中国电信股份有限公司 virtual machine snapshot management method and device
CN104035822A (en) * 2014-05-28 2014-09-10 中国科学院计算技术研究所 Low-cost efficient internal storage redundancy removing method and system
WO2016037344A1 (en) * 2014-09-12 2016-03-17 Intel Corporation Memory and resource management in a virtual computing environment
CN106575235A (en) * 2014-09-12 2017-04-19 英特尔公司 Memory and resource management in a virtual computing environment
US10216532B2 (en) 2014-09-12 2019-02-26 Intel Corporation Memory and resource management in a virtual computing environment
CN106575235B (en) * 2014-09-12 2020-10-23 英特尔公司 Memory and resource management in a virtualized computing environment
CN106034108A (en) * 2015-03-11 2016-10-19 华为技术有限公司 Channel detecting method and channel detecting device
WO2016141719A1 (en) * 2015-03-11 2016-09-15 华为技术有限公司 Channel detection method and apparatus
CN106034108B (en) * 2015-03-11 2019-07-19 华为技术有限公司 A kind of channel detection method and device
CN106874119A (en) * 2017-02-25 2017-06-20 郑州云海信息技术有限公司 Merging method and device based on the scanning of homogeneity internal memory
US10467106B2 (en) 2017-05-24 2019-11-05 Industrial Technology Research Institute Data processing method, data processing system, and non-transitory computer program product for controlling a workload delay time
CN107329836A (en) * 2017-07-13 2017-11-07 北京元心科技有限公司 Multi-system memory management method and device and mobile terminal
CN110209489A (en) * 2018-02-28 2019-09-06 贵州白山云科技股份有限公司 A kind of EMS memory management process and device suitable for memory page structure
CN113076175A (en) * 2021-03-26 2021-07-06 北京汇钧科技有限公司 Memory sharing method and device for virtual machine
WO2022199206A1 (en) * 2021-03-26 2022-09-29 北京汇钧科技有限公司 Memory sharing method and device for virtual machines
CN113076175B (en) * 2021-03-26 2022-09-30 北京汇钧科技有限公司 Memory sharing method and device for virtual machine
CN114138424A (en) * 2022-02-07 2022-03-04 苏州浪潮智能科技有限公司 Virtual machine memory snapshot generation method and device and electronic equipment
CN114138424B (en) * 2022-02-07 2022-05-20 苏州浪潮智能科技有限公司 Virtual machine memory snapshot generation method and device and electronic equipment

Also Published As

Publication number Publication date
CN103019884B (en) 2015-07-01

Similar Documents

Publication Publication Date Title
CN103019884A (en) Memory page de-weight method and memory page de-weight device based on virtual machine snapshot
US10303596B2 (en) Read-write control method for memory, and corresponding memory and server
EP3309685B1 (en) Method and apparatus for writing data to cache
CN102508788B (en) SSD (solid state drive) and SSD garbage collection method and device
CN100541453C (en) Large capacity cache implementation method and storage system
CN102591947A (en) Fast and low-RAM-footprint indexing for data deduplication
CN101315628A (en) Internal memory database system and method and device for implementing internal memory data base
CN102467408A (en) Method and device for accessing data of virtual machine
CN104423894A (en) Data storage device and flash memory control method thereof
CN102843396A (en) Data writing and reading method and device in distributed caching system
CN104866428A (en) Data access method and data access device
CN104238962A (en) Method and device for writing data into cache
CN103593477A (en) Collocation method and device of Hash database
CN103577513A (en) Systems and/or methods for caching xml information sets with delayed node instantiation
CN103838853A (en) Mixed file system based on different storage media
CN106407224A (en) Method and device for file compaction in KV (Key-Value)-Store system
CN103049224A (en) Method, device and system for importing data into physical tape
CN113282249B (en) Data processing method, system, device and medium
CN108089825A (en) A kind of storage system based on distributed type assemblies
CN103942161A (en) Redundancy elimination system and method for read-only cache and redundancy elimination method for cache
CN109407985B (en) Data management method and related device
CN104809178A (en) Write-in method of key/value database memory log
CN105045850A (en) Method for recovering junk data in cloud storage log file system
KR20100117295A (en) Method for driving of data storage device and data storage device thereof
CN104834477A (en) Data writing method and device based on flash memory

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