CN109753340A - Virtual machine snapshot processing method, apparatus and system - Google Patents

Virtual machine snapshot processing method, apparatus and system Download PDF

Info

Publication number
CN109753340A
CN109753340A CN201711091731.1A CN201711091731A CN109753340A CN 109753340 A CN109753340 A CN 109753340A CN 201711091731 A CN201711091731 A CN 201711091731A CN 109753340 A CN109753340 A CN 109753340A
Authority
CN
China
Prior art keywords
disk
snapshot
disk block
block
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
CN201711091731.1A
Other languages
Chinese (zh)
Other versions
CN109753340B (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711091731.1A priority Critical patent/CN109753340B/en
Priority to PCT/CN2018/113335 priority patent/WO2019091322A1/en
Publication of CN109753340A publication Critical patent/CN109753340A/en
Application granted granted Critical
Publication of CN109753340B publication Critical patent/CN109753340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The embodiment of the present application provides a kind of virtual machine snapshot processing method, apparatus and system.In the embodiment of the present application, by increasing snapshot caching for VM, frequency of use meets the disk block of sets requirement in required disk snapshot in storage VM start-up course, based on this, when receiving the reading disk requests that VM is issued during startup, the disk block that inquiry VM is requested in the disk of VM and snapshot caching respectively returns to VM when inquiring the disk block of VM request in the disk of VM or snapshot caching.Since what is stored in snapshot caching is frequency of use meets sets requirement in disk snapshot disk block, the probability for reading disk block needed for disk requests are hit can be increased, the probability to snapshot center requests disk block is reduced, thus the concurrent pressure of the entirety for mitigating snapshot center.

Description

Virtual machine snapshot processing method, apparatus and system
Technical field
This application involves technical field of memory more particularly to a kind of virtual machine snapshot processing methods, apparatus and system.
Background technique
Virtual machine (Virtual Machine, VM), which refers to, has complete hardware system function, fortune by what software was simulated Complete computer of the row in a completely isolated environment.VM is operated on host, has independent running environment, favorably In the safety of raising host, and that multiple operating systems can be run on individual host, therefore be becoming increasingly popular.
A series of advantages based on VM, more and more Internet applications bring into operation on VM.The industry of Internet application Business flowed fluctuation is larger, when the peak traffic of Internet application arrives, needs to start a large amount of VM in a short time.When VM starts Dependent on some disk snapshot, disk snapshot includes operating system and other data needed for VM operation.Disk snapshot is generally deposited Storage is in snapshot center.
When for needing to read disk block in VM start-up course, first have to read in the disk of VM, when not in the disk of VM In when reading, Xiang Kuaizhao center requests.When starting a large amount of VM in the short time, snapshot center may need concurrent processing a large amount of Request, the concurrent pressure at snapshot center are larger.
Summary of the invention
The many aspects of the application provide a kind of virtual machine snapshot processing method, apparatus and system, to mitigate in snapshot The concurrent pressure of the heart.
The embodiment of the present application provides a kind of virtual machine snapshot processing method, comprising:
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are described for requesting The first disk block in disk snapshot needed for first virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot caching It is stored with the disk block that frequency of use in the disk snapshot meets sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu First virtual machine returns to first disk block.
The embodiment of the present application also provides a kind of virtual machine snapshot processing unit, comprising:
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are described for requesting The first disk block in disk snapshot needed for first virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot caching It is stored with the disk block that frequency of use in the disk snapshot meets sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu First virtual machine returns to first disk block.
The embodiment of the present application also provides a kind of electronic equipment, comprising: memory and processor;
The memory, for storing program;
The processor is coupled to the memory, for executing described program to be used for:
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are described for requesting The first disk block in disk snapshot needed for first virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot caching It is stored with the disk block that frequency of use in the disk snapshot meets sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu First virtual machine returns to first disk block.
The application also provides a kind of cloud computing system, comprising: computing cluster, storage cluster and snapshot center;
The computing cluster, for providing the computing resource of the first virtual machine, first virtual machine runs on the meter It calculates in cluster;
The storage cluster, the disk and snapshot caching, the snapshot for being used to provide the described the first virtual machine are deposited Contain the disk block that frequency of use in disk snapshot needed for first virtual machine starts meets sets requirement;
The snapshot center, for storing the disk snapshot;
The storage cluster includes storage management apparatus, and the storage management apparatus is used for:
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are described for requesting The first disk block in disk snapshot needed for first virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot caching It is stored with the disk block that frequency of use in the disk snapshot meets sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu First virtual machine returns to first disk block.
In the embodiment of the present application, increase snapshot caching for virtual machine, required disk is fast in storage virtual machine start-up course Meet the disk block of sets requirement according to middle frequency of use, be based on this, when the reading magnetic for receiving virtual machine and issuing during startup When disk is requested, the disk block that inquiry virtual machine is requested in the disk of virtual machine and snapshot caching respectively, when the magnetic in virtual machine Virtual machine is returned to when inquiring the disk block of virtual machine request in disk or snapshot caching.Since what is stored in snapshot caching is magnetic Frequency of use meets the disk block of sets requirement in disk snapshot, can increase the probability for reading disk block needed for disk requests are hit, The probability to snapshot center requests disk block is reduced, thus the concurrent pressure of the entirety for mitigating snapshot center.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the signal that the exemplary memory that one exemplary embodiment of the application provides calculates isolated cloud computing framework Figure;
Fig. 2 a is that the IO thread that the application another exemplary embodiment provides and Lazyload thread started in the first VM A process schematic of disk block is handled in journey;
Fig. 2 b is that the IO thread that the application another exemplary embodiment provides and Lazyload thread started in the first VM Another process schematic of disk block is handled in journey;
Fig. 3 a is the flow diagram for the virtual machine snapshot processing method that the application another exemplary embodiment provides;
Fig. 3 b is the flow diagram for the virtual machine snapshot processing method that the application another exemplary embodiment provides;
Fig. 4 is a kind of structural schematic diagram for virtual machine snapshot processing unit that the another embodiment of the application provides;
Fig. 5 is the structural schematic diagram for a kind of electronic equipment that the another embodiment of the application provides.
Specific embodiment
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Every other embodiment obtained under the premise of creative work out, shall fall in the protection scope of this application.
For the problem that the concurrent pressure in snapshot center of the existing technology is larger, the embodiment of the present application provides a kind of solution Scheme, cardinal principle are: increasing snapshot caching for VM, store in VM start-up course frequency of use in required disk snapshot and meet and set The disk block of provisioning request is based on this, when receiving the reading disk requests that VM is issued during startup, respectively in the disk of VM With snapshot caching in inquiry VM request disk block, when the disk of VM or snapshot caching in inquire VM request disk block when Return to VM.Since that store in snapshot caching is frequency of use meets sets requirement in disk snapshot disk block, Ke Yizeng The big probability for reading disk block needed for disk requests are hit, reduces the probability to snapshot center requests disk block, to mitigate snapshot The concurrent pressure of the entirety at center.
Below in conjunction with attached drawing, the technical scheme provided by various embodiments of the present application will be described in detail.
Fig. 1 is the schematic diagram that the storage that one exemplary embodiment of the application provides calculates isolated cloud computing framework.Such as Fig. 1 Shown, which includes: computing cluster 101, storage cluster (EBS) 102 and snapshot center 103.Computing cluster 101 can be with It is one or more.Storage cluster 102 is also possible to one or more.Snapshot center 103 is generally one, but is not limited to one It is a.
Computing cluster 101 includes multiple calculate nodes.Calculate node is that have the equipment of certain computing capability, is generally comprised The components such as processor, memory and ethernet controller.For example, calculate node can be personal computer, desktop computer, Server etc..Calculate node in computing cluster 101 can realize by same type equipment, can also be real by different type equipment It is existing.Computing cluster 101 is mainly responsible for VM and provides computing resource, and VM may operate in the calculate node in computing cluster 101.
Storage cluster 102 includes more storage equipment.Storing equipment is to have the equipment of certain storage capacity, is generally comprised At least one piece of physical storage medium such as processor, system bus and hard disk, memory.For example, storage equipment can be clothes Business device, desktop computer, personal computer, mobile phone, tablet computer, database etc..Server can be General Server, cloud clothes Business device, cloud host, virtual center etc..Storage equipment in storage cluster 102 can be same type, be also possible to inhomogeneity Type.
In addition to storing equipment, storage cluster 102 further includes storage management apparatus.Storage management apparatus is mainly responsible for storage The storage management logic of cluster 102.On deployment is realized, storage management apparatus can individually be disposed independently of each storage equipment, or Person can also be deployed in some or certain storage equipment.Storage cluster 102 is mainly responsible for VM and provides storage resource, such as There is provided disk (VM disk) for each VM, that is, disk needed for running on the VM in computing cluster 101 is located in storage cluster 102, Realize that storage calculates isolated framework.
Disk snapshot needed for snapshot center 103 is mainly responsible for storage VM starting, which includes VM start-up course Needed for operating system and other data, but it is not limited to this.Optionally, snapshot center 103 can using storage cost compared with Low object stores (object storage) mode.
Multiple VM can be run in the calculate node of computing cluster 101.In these VM, some VM use identical disk Snapshot, some VM use different disk snapshots.Each VM is stored in snapshot center 103 needs disk snapshot to be used.To not For VM, whether the disk snapshot no matter used is identical, and the start-up course dependent on disk snapshot is similar.For convenient for retouching It states and distinguishes, the present embodiment is illustrated by taking the first VM as an example.Wherein, the first VM can be any run in calculate node VM。
In the case where user needs to run a VM, disk can be created for the first VM in storage cluster 102.For example, The command interface that user can be provided by storage management apparatus, to storage management apparatus input disk creation instruction.Disk wound Building instruction can be different due to the difference of storage system.Storage management apparatus can be created according to disk and be instructed, and at some or certain be deposited It stores up in equipment and creates a disk for the first VM.Wherein, in the first VM start-up course, the disk of the first VM is mainly used for storage Disk snapshot needed for one VM start-up course.
In the present embodiment, disk snapshot includes multiple disk blocks (block), and each disk block is assigned one in sequence A call number (Index).Wherein, disk block is the minimum memory unit of disk snapshot, and minimum load unit.Wherein, no Can be identical with the size of disk block, it can not also be identical.In the identical situation of disk block size, disk block is not limited Size, such as can be 200MB, 300MB or 500MB etc. with a disk block.
It, can be to depositing when the first VM is needed using some disk block (needing to read disk) in the first VM start-up course It stores up management equipment and issues reading disk requests.Storage management apparatus inquires according to the reading disk requests in the disk of the first VM The disk block of one VM request.When inquiring the disk block of the first VM request in the disk in the first VM, looked into the first VM return The disk block ask;When not inquiring the disk block of the first VM request in the disk of the first VM, the center Xiang Kuaizhao 103 is requested The disk block.
In the case where starting a large amount of VM in a short time, if not inquiring the disk of each VM request in the disk of each VM Block, it is that each VM requests disk block that storage management apparatus, which needs to concentrate to snapshot center 103, at this time, to cause snapshot center 103 Concurrent pressure it is larger.
To solve the problems, such as that the concurrent pressure in snapshot center 103 is larger, storage management apparatus selects one in storage cluster 102 Block memory space caches (cache) as snapshot.Snapshot caching is mainly used for storage disk, and middle frequency of use meets setting fastly It is required that disk block.Optionally, the disk block that frequency of use meets sets requirement can be several highest magnetic of frequency of use Disk block perhaps can be several disk blocks of frequency of use greater than setpoint frequency threshold value or can be frequency of use at certain Several disk blocks in a section.Wherein, the frequency of use of disk block can be the use frequency of disk block within a certain period of time Frequency of use in rate, such as nearest one week or it is one month nearest in frequency of use etc..The disk stored in snapshot caching The probability that block is hit during the first VM reads disk is higher, such as higher than setting probability threshold value.
It,, can when the first VM is needed using some disk block (needing to read disk) in the first VM start-up course based on this Disk requests are read to issue to storage management apparatus, which carries the call number of disk block, is directed toward reading disk requests and is asked The disk block asked.It for ease of description and distinguishes, the requested disk block of disk requests will be read and be known as the first disk block, the first disk Block is some disk block in disk snapshot needed for the first VM starts.Storage management apparatus receives the first VM and sends out during startup Reading disk requests out can inquire the first disk block in disk and the snapshot caching of the first VM respectively.When the first VM's When inquiring the first disk block in disk or snapshot caching, the first disk block inquired is returned to the first VM, and is not had to fast The first disk block is requested according to center 103.When all not inquiring the first disk block in the disk of the first VM and snapshot caching, to The first disk block is requested at snapshot center 103, and the first disk block that snapshot center 103 is returned is stored to the disk of the first VM In, for the first VM use.
In the present embodiment, by snapshot cache in the higher disk block of frequency of use, certain journey in storage disk snapshot Can increase on degree the first VM when reading disk directly in storage cluster 102 hit needed for disk block probability, and then reduce to The probability of disk block is requested at snapshot center 103, mitigates the concurrent pressure at snapshot center 103.
Wherein, the disk of snapshot caching and the first VM are all storage management apparatus on the memory space in storage cluster 102 The performance for inquiring snapshot caching and the disk of the first VM is essentially identical, therefore can not be to the magnetic of inquiry snapshot caching and the first VM The sequence of disk limits.For example, snapshot caching can be first inquired, when not inquiring the first disk block in snapshot caches, then Inquire the disk of the first VM.Alternatively, the disk of the first VM can also be inquired first, when not inquiring first in the disk in the first VM When disk block, then inquire snapshot caching.
Further, it is contemplated that the disk of the first VM is that the first VM is specially enjoyed, and snapshot caching is all VM shared, therefore The disk that the first VM can first be inquired, when inquiring the first disk block in the disk in the first VM, without inquiring snapshot caching, The pressure of snapshot caching can be mitigated in this way.
In above-described embodiment or following embodiments, storage management apparatus can be before the first VM starting, according to other VM to the service condition of disk block each in disk snapshot, obtains the frequency of use of each disk block in disk block during startup; The disk block that frequency of use meets sets requirement in each disk block is stored into snapshot caching.Other VM refer to be made with the first VM With identical disk snapshot and the VM that starts before the first VM.Certainly, in the first VM start-up course, storage management apparatus can also To be started according to the first VM, the other VM being currently up in addition to the first VM and the other VM started before the first VM To the service condition of disk block each in disk snapshot in journey, the frequency of use of each disk block in disk block is obtained, according to each disk Disk block in the frequency of use real-time update snapshot caching of block.The disk block stored in snapshot caching is dynamic change.Example Such as, storage management apparatus can count each VM within nearest a period of time to the service condition of disk block each in disk snapshot, incite somebody to action The highest N number of disk block of frequency of use is stored into snapshot caching.N is pre-set numerical value, is a positive integer.
In some embodiments, in the first VM start-up course, on the one hand storage management apparatus can respond the first VM's Read disk requests and provide disk block to the first VM, on the other hand can be granularity using disk block using it is lazy load (Lazyload) to Disk snapshot is loaded in the disk of first VM.The operation of these two aspects can execute parallel.
In an implementation, storage management apparatus can star two threads: Lazyload thread and IO thread.Its In, Lazyload thread, which is mainly responsible for, loads magnetic into the disk of the first VM according to disk block loading sequence in a manner of Lazyload Disk block in disk snapshot.IO thread is mainly responsible for the reading disk requests that the first VM of processing is issued.
A referring to fig. 2 is issued to IO thread when the first VM needs to read disk and is read disk requests (the reading disk in such as Fig. 2 a Request is 1.), which carries the call number of the disk block of reading in need.IO thread according to the reading disk requests, according to The disk (the reading disk block in such as Fig. 2 a is 2.) and snapshot caching of the first VM of secondary inquiry (the reading disk block in such as Fig. 2 a is 3.);If The disk block that the disk or snapshot caching query of first VM is identified to disk block call number then returns to the first VM (such as Fig. 2 a In return disk block 4.);If the magnetic that disk block call number is identified is not inquired in disk and the snapshot caching of the first VM Disk block then indicates disk block that Lazyload thread requests disk block call number to be identified to snapshot center 103 (in such as Fig. 2 a Read disk block 5.).For Lazyload thread, before receiving instruction, loaded in a manner of Lazyload according to disk block Sequence loads the disk block in disk snapshot into the disk of the first VM.When receiving instruction, Lazyload thread can be excellent The first disk block identified from the reading disk block call number of snapshot center 103 simultaneously stores (such as Fig. 2 a into the disk of the first VM In write disk block 6.), so that the first VM uses the disk block as early as possible.The disk block is being read from snapshot center 103 After the disk block that call number is identified, Lazyload thread can continue in a manner of Lazyload according to disk block loading sequence The disk block in disk snapshot is loaded into the disk of the first VM.
It is worth noting that in fig. 2 a, it is assumed that snapshot caching include disk block d1, disk block d2 ... disk block dk, Snapshot center include disk block d1, disk block d2 ... disk block dn, this is only not limited to this as example.
From the foregoing, it can be seen that in conjunction with the higher disk block of frequency of use in the disk snapshot stored in snapshot caching, IO thread Hit rate will greatly improve, VM can be reduced to the dependency degree of Lazyload thread, therefore can control Lazyload The speed of thread is slow as far as possible, influence of the reduction Lazyload thread to storage cluster 102 and snapshot center 103 as far as possible, very To accomplishing not influence substantially.
In one exemplary embodiment, snapshot cache on the basis of, Lazyload thread in a manner of Lazyload according to Disk block loading sequence load disk block mode include: according to disk block loading sequence, snapshot caching in inquiry need to The disk block loaded in the disk of first VM (the reading disk block in such as Fig. 2 a is 7.).When not snapshot caching in inquire the need When the disk block to be loaded into the disk of the first VM, the center Xiang Kuaizhao 103 request it is described need into the disk of the first VM plus The disk block (the reading disk block in such as Fig. 2 a is 5.) of load, and the needs that snapshot center 103 is returned are to the disk of the first VM The disk block of middle load stores into the disk of the first VM and (writes disk block 6. in such as Fig. 2 a).It is inquired when in snapshot caches When the disk block for needing to load into the disk of the first VM, described need to the first VM's will be inquired in snapshot caches The disk block loaded in disk stores into the disk of the first VM and (writes disk block 6. in such as Fig. 2 a).It can be seen that working as from fast It, can without being requested to snapshot center 103 when according to reading the disk block for needing to load into the disk of the first VM in caching To reduce the number for requesting disk block to snapshot center 103, further mitigate the pressure at snapshot center 103.
Further, Lazyload thread loaded according to disk block loading sequence into the disk of the first VM disk block it Before, can be cached from snapshot or snapshot center 103 in reading disk block preferred list, the is stored in the disk block preferred list One VM uses sequence to disk block each in disk snapshot;Use sequence as disk block each disk block the first VM Loading sequence.Wherein, the first VM is used sequencing when each disk block as the suitable of Lazyload thread load disk block Sequence is conducive to be loaded onto the disk block preferentially used in the first VM start-up course preferentially in the disk of the first VM, be conducive to Hit probability of the reading disk requests of the first VM in disk is improved, reduces and inquires snapshot caching because the first VM reads disk requests Number, mitigate the pressure of snapshot caching, in the scene of especially in a short time a large amount of VM starting, can reduce the reading magnetic of each VM Disk request is to concurrent pressure caused by snapshot caching.
In one exemplary embodiment, a method of obtaining disk block preferred list, comprising: going through in advance to the first VM The service condition of disk block each in disk snapshot is counted in history start-up course, obtains use of the first VM to each disk block Sequentially;Each disk block is stored the call number of each disk block into disk block preferred list using sequence according to the first VM; And store disk block preferred list into snapshot caching or snapshot center 103, for the use of Lazyload thread.
Still optionally further, it is a kind of to the first VM in history start-up course to the use feelings of disk block each in disk snapshot The mode that condition is counted includes: to count the reading disk requests and read disk requests that the first VM is issued in history start-up course Sequencing;The call number for reading the requested disk block of disk requests is collected, then according to the elder generation for reading disk requests Sequence afterwards sequentially stores each call number for reading the requested disk block of disk requests into disk block preferred list.
In the above-described embodiments, the case where the first VM reads disk during startup is essentially described.In addition to this situation, First VM during startup can also write magnetic disk.In the first VM start-up course, it may be necessary to carry out writing behaviour to some disk block Make, such as modifies certain data.These write operations may relate to already existing disk block in the disk of the first VM, it is also possible to relate to And the first VM disk in the disk block that is not present.For needing the disk block being not present in the disk to the first VM to carry out writing behaviour The disk block for needing write operation can be first loaded into the disk of the first VM by the case where making, and then be executed to the disk block Write operation, but this efficiency is lower.In this regard, the disk that storage management apparatus is the first VM creates a sparse file (shadow File), which is mainly used to temporarily store the incremental data of certain disk blocks in the first VM disk.Optionally, this is dilute The size for dredging file is identical as the size of disk of the first VM.
Based on above-mentioned sparse file, when the first VM needs write magnetic disk, write magnetic disk can be issued to storage management apparatus and asked It asks, which can carry the call number for needing to be implemented the disk block of write operation, be directed toward the disk block for needing to be implemented write operation.For just In description, the disk block that disk requests are related to will be write and be known as second disk block.Disk requests are write in storage management apparatus reception, according to This writes disk requests, judges in the disk of the first VM with the presence or absence of second disk block.When in the disk in the first VM include second When disk block, write operation directly is executed in the second disk block;When not including second disk block in the disk of the first VM, then The incremental data for writing disk requests is written in the corresponding sparse file of disk of the first VM.In this embodiment, in needs pair In the case that the disk block being not present in the disk of first VM carries out write operation, complete can be completed without waiting for disk block load Write operation is conducive to the efficiency for improving write operation.
It further, can also be using incremental data on bitmap file (bitmap file) Lai Jilu sparse file Position.A sector (sector) in bitmap file in the corresponding sparse file in each position (bit), for recording the sector Use state.If being stored with incremental data in a sector, corresponding position is effective in bitmap file, such as is set to 1.It is based on This can also be in sparse file after by the corresponding sparse file of disk of the first VM of the incremental data of write request write-in The corresponding position in respective sectors is effective by position of the recording increment data in sparse file in corresponding bitmap file.
In the above-described embodiments, respectively describe based on snapshot caching reading disk process and based on the write magnetic of sparse file Disk process.Snapshot caching and sparse file can be used alone, and can also be used in combination.In embodiment below, emphasis is retouched It states storage management apparatus and is used in combination what snapshot caching was handled disk block in the first VM start-up course with sparse file Process.
With reference to Fig. 2 b, when the first VM is issued during startup reads disk requests, storage management apparatus (such as IO line Journey) requested first disk block of the first VM (the reading disk block in b referring to fig. 2 can be inquired in the disk of the first VM respectively ②).When inquiring the first disk block in the disk in the first VM, further in the corresponding sparse file of disk of the first VM Inquire the incremental data (referring to fig. 2 the reading incremental data in b 5.) of the first disk block.If first is not inquired in sparse file The incremental data of disk block then returns to the first disk block inquired to the first VM.If inquiring the first magnetic in sparse file The incremental data of disk block merges the incremental data of the first disk block and the first disk block, with the disk after being merged Block number evidence;Disk block data after merging are returned into the first VM.
When the disk of the first VM inquires the first disk block, continue to inquire the first disk block (ginseng in snapshot caching See reading disk block in Fig. 2 b 1.).When inquiring the first disk block in snapshot caches, further in the disk pair of the first VM The incremental data (referring to fig. 2 the reading incremental data in b 5.) of the first disk block is inquired in the sparse file answered.If not in sparse text The incremental data of the first disk block is inquired in part, then the first disk block inquired is returned to the first VM.If in sparse file In inquire the incremental data of the first disk block, the incremental data of the first disk block and the first disk block is merged, with Disk block data after to merging;Disk block data after merging are returned into the first VM.
When not inquiring the first disk block in snapshot caches, storage management apparatus (such as Lazyload thread) is to fast The first disk block (referring to fig. 2 the reading disk block in b 6.) is requested according to center 103, and in the corresponding sparse text of the disk of the first VM The incremental data (referring to fig. 2 the reading incremental data in b 5.) of the first disk block is inquired in part.If not inquired in sparse file The incremental data of first disk block, then the first disk block returned to snapshot center 103 are stored into the disk of the first VM, for First VM is used.If inquiring the incremental data of the first disk block in sparse file, by the first disk block and the first disk block Incremental data merge, with the disk block data after being merged;Disk block data after merging are stored to the first VM Disk in.
In addition, storage management apparatus (such as Lazyload thread) can also be loaded in a manner of Lazyload according to disk block Sequence loads disk block into the disk of the first VM.The process includes: to inquire in snapshot caching according to disk block loading sequence The disk block (referring to fig. 2 the reading disk block in b 1.) for needing to load into the disk of the first VM.When not snapshot caching in inquire When to the disk block for needing to load into the disk of the first VM, described need to the first VM's is requested at the center Xiang Kuaizhao 103 The disk block (referring to fig. 2 the reading disk block in b 6.) loaded in disk, and described need to the first VM is inquired in sparse file Disk in the incremental data (referring to fig. 2 the reading incremental data in b 5.) of disk block that loads.If not inquired in sparse file To the incremental data of the disk block for needing to load into the disk of the first VM, then the need that return to snapshot center 103 The disk block to load into the disk of the first VM stores into the disk of the first VM (referring to fig. 2 the reading incremental data in b 3.). If inquiring the incremental data of the disk block for needing to load into the disk of the first VM in sparse file, by snapshot center 103 return the needs disk blocks loaded into the disk of the first VM and inquired in sparse file it is described need to The incremental data of the disk block loaded in the disk of first VM merges, and forms new disk block data, by new disk block Data store into the disk of the first VM (referring to fig. 2 the reading incremental data in b 3.).
When inquiring the disk block for needing to load into the disk of the first VM in snapshot caches, in sparse file Middle inquiry incremental data (the reading incremental data in b referring to fig. 2 for needing the disk block loaded into the disk of the first VM ⑤).It, will if not inquiring the incremental data of the disk block for needing to load into the disk of the first VM in sparse file The disk block that the needs inquired in snapshot caching are loaded into the disk of the first VM stores in the disk to the first VM (referring to fig. 2 the reading incremental data in b 3.).It described needs to load into the disk of the first VM if inquiring in sparse file The incremental data of disk block, the disk block that the needs inquired in snapshot caches are loaded into the disk of the first VM and The incremental data for the disk block that the needs inquired in sparse file are loaded into the disk of the first VM merges, shape New disk block data are stored (the reading incremental data in b referring to fig. 2 into the disk of the first VM by the disk block data of Cheng Xin ③)。
Wherein, in the scene that snapshot caching and sparse file is used in combination, the process and front base of the first VM write magnetic disk Identical (writing incremental data 4. in b referring to fig. 2) in the process of sparse file write magnetic disk, details are not described herein.
It is worth noting that in figure 2b, it is assumed that snapshot caching include disk block d1, disk block d2 ... disk block dk, Snapshot center include disk block d1, disk block d2 ... disk block dn, VM disk include disk block d1, disk block d2 ... disk Block dj, sparse file include incremental data d1, incremental data d2 ... incremental data dm, this is only not limited to this as example. Wherein, the incremental data and disk block indicated with the same symbol has belonging relation, such as incremental data d1 is disk block d1 Incremental data, incremental data d2 are the incremental datas etc. of disk block d2.
It can be seen that snapshot caching and sparse file are combined, the efficiency for reading and writing disk can be not only guaranteed, but also can subtract The brisk concurrent pressure according to center 103.
Fig. 3 a is the flow diagram for the virtual machine snapshot processing method that one exemplary embodiment of the application provides.This method Mainly executed by storage management apparatus, as shown in Figure 3a, this method comprises:
301, the reading disk requests that issue during startup of the first virtual machine VM are received, read disk requests for requesting the The first disk block in disk snapshot needed for one VM starts.
302, the first disk block is inquired in disk and the snapshot caching of the first VM respectively;Snapshot buffer memory has disk fast Meet the disk block of sets requirement according to middle frequency of use.
303, when inquiring the first disk block in the disk of the first VM or snapshot caching, the first magnetic is returned to the first VM Disk block.
In the present embodiment, by snapshot caching (cache) storage disk, middle frequency of use meets sets requirement fastly Disk block.Optionally, the disk block that frequency of use meets sets requirement can be several highest disk blocks of frequency of use, or Person can be several disk blocks that frequency of use is greater than setpoint frequency threshold value, or can be frequency of use in some section Several disk blocks.Wherein, the frequency of use of disk block can be the frequency of use of disk block within a certain period of time, such as most Frequency of use in nearly one week or it is one month nearest in frequency of use etc..The disk block stored in snapshot caching is first It is higher that VM reads the probability being hit during disk, such as higher than setting probability threshold value.
It is cached based on snapshot, it, can be respectively the first VM's when the first VM is issued during startup reads disk requests The first requested disk block of VM is inquired in disk and snapshot caching.When inquiring the in the disk of the first VM or snapshot caching When the requested disk block of one VM, the disk block inquired is returned to the first VM, and does not have to request disk to snapshot center 103 Block.When all not inquiring the requested disk block of the first VM in the disk of the first VM and snapshot caching, the center Xiang Kuaizhao 103 Disk block is requested, and the disk block that snapshot center 103 returns is stored into the disk of the first VM, for the first VM use.
In the present embodiment, the disk block of sets requirement is met by frequency of use in snapshot buffer memory disk snapshot, The probability of disk block needed for the first VM is hit in snapshot caching can be increased to a certain extent, and then reduced to snapshot center requests The probability of disk block mitigates the concurrent pressure at snapshot center.
In an optional embodiment, a kind of implementation of step 302 are as follows: snapshot caching is first inquired, when slow in snapshot When not inquiring the first disk block in depositing, then inquire the disk of the first VM.Alternatively, the disk of the first VM can also be first inquired, when When not inquiring the first disk block in the disk of the first VM, then inquire snapshot caching.In view of the disk of the first VM is first What VM was specially enjoyed, and snapshot caching is all VM shared, therefore can first inquire the disk of the first VM, when the disk in the first VM In when inquiring the first disk block, without inquiring snapshot caching, the concurrent pressure of snapshot caching can be mitigated in this way.
It further, can be to being stored with when not inquiring the first disk block in disk and the snapshot caching of the first VM The first disk block of snapshot center requests of disk snapshot;The first disk block that snapshot center is returned is stored to the disk of the first VM In.
It, can be according to other VM during startup to disk before the first VM starting in an optional embodiment The service condition of each disk block in snapshot obtains the frequency of use of each disk block in the first disk block;It will be used in each disk block The disk block that frequency meets sets requirement is stored into snapshot caching.In this way, snapshot can be used in the first VM start-up course Disk block in caching.
In an optional embodiment, in addition to the reading disk requests according to the first VM, the first disk block is inquired for the first VM Except, it can also be in the start-up course of the first VM, in a manner of Lazyload, according to disk block loading sequence to the magnetic of the first VM The disk block in disk snapshot is loaded in disk.
Further, it is possible to which inquiry needs to add into the disk of the first VM in snapshot caching according to disk block loading sequence The disk block of load;When not inquiring the disk block for needing to load into the disk of the first VM in snapshot caching, into snapshot The disk block that heart request needs to load into the disk of the first VM, and the needs that snapshot center is returned are into the disk of the first VM The disk block of load is stored into the disk of the first VM.
Further, according to disk block loading sequence, inquiry needs to add into the disk of the first VM in snapshot caching Before the disk block of load, can be cached from snapshot or snapshot center in reading disk block preferred list, in disk block preferred list The first VM is stored with to disk block each in disk snapshot using sequence;Use sequence as magnetic each disk block the first VM Disk block loading sequence.In turn, sequence is used to disk block each in disk snapshot with the first VM, is loaded into the disk of the first VM Disk block.
It, can from snapshot caching or snapshot center before reading disk block preferred list in an optional embodiment To obtain disk block preferred list.It is a kind of obtain disk block preferred list mode include:
First VM counts the service condition of each disk block in history start-up course, to obtain the first VM to each Disk block uses sequence;
Each disk block is stored the call number of each disk block to disk block preferred list using sequence according to the first VM In;
Disk block preferred list is stored into snapshot caching or snapshot center.
In above method embodiment, the case where the first VM reads disk during startup is essentially described.Except this situation Except, the first VM during startup can also write magnetic disk.In the first VM start-up course, it may be necessary to in the disk of the first VM The disk block being not present carries out write operation.In this case, the disk block for needing to be implemented write operation first can be loaded into In the disk of one VM, write operation then is being executed to the disk block, but this efficiency is lower.It is the in this regard, in the present embodiment The disk of one VM creates a sparse file, which is mainly used to temporarily store the increasing of certain disk blocks in the first VM disk Measure data.
Based on above-mentioned sparse file, a kind of method flow such as Fig. 3 b institute carrying out snapshot processing during disk write operation Show, comprising the following steps:
304, receive the first VM issue during startup write disk requests, write disk requests for request it is fast to disk Second disk block according in carries out write operation.
305, whether judge in the disk of the first VM comprising second disk block;If judging result be it is no, then follow the steps 306;If the determination result is YES, 307 are thened follow the steps.
306, the incremental data for writing disk requests is written in the corresponding sparse file of disk of the first VM.
It 307, will be in the incremental data write-in second disk block that disk requests be write.
In the present embodiment, when the first VM needs write magnetic disk, it can be issued to storage management apparatus and write disk requests, it should Request can carry the call number for the disk block for needing to be implemented write operation.Storage management apparatus writes disk requests according to this, judges The disk block of write operation is needed in the disk of one VM with the presence or absence of the first VM.When in the disk in the first VM include the first VM need When the disk block of write operation, write operation directly is executed in the disk block;When in the disk of the first VM not comprising the first VM need When the disk block of write operation, then the incremental data for writing disk requests is written in the corresponding sparse file of disk of the first VM.? In the embodiment, in the case that the disk block being not present in needing the disk to the first VM carries out write operation, without waiting for magnetic The load of disk block completes that write operation can be completed, and is conducive to the efficiency for improving write operation.
It further, can also be using incremental data on bitmap file (bitmap file) Lai Jilu sparse file Position.A sector (sector) in bitmap file in the corresponding sparse file in each position (bit), for recording the sector Use state.If being stored with incremental data in a sector, corresponding position is effective in bitmap file, such as is set to 1.It is based on This can also be in sparse file after by the corresponding sparse file of disk of the first VM of the incremental data of write request write-in The corresponding position in respective sectors is effective by position of the recording increment data in sparse file in corresponding bitmap file.
It is worth noting that above-mentioned snapshot caching and sparse file can be used alone, can also be used in combination.In conjunction with making Process can be found in shown in Fig. 2 b, and details are not described herein.
It should be noted that the executing subject of each step of above-described embodiment institute providing method may each be same equipment, Alternatively, this method is also by distinct device as executing subject.For example, the executing subject of step 301 to step 303 can be equipment A;For another example, step 301 and 302 executing subject can be equipment A, the executing subject of step 303 can be equipment B;Etc..
In addition, containing in some processes of the description in above-described embodiment and attached drawing according to particular order appearance Multiple operations, but it should be clearly understood that these operations can not execute or parallel according to its sequence what appears in this article It executes, serial number of operation such as 201,202 etc. is only used for distinguishing each different operation, and serial number itself does not represent any Execute sequence.In addition, these processes may include more or fewer operations, and these operations can execute in order or It is parallel to execute.It should be noted that the description such as herein " first ", " second ", be for distinguish different message, equipment, Module etc. does not represent sequencing, does not also limit " first " and " second " and is different type.
Fig. 4 is a kind of structural schematic diagram for virtual machine snapshot processing unit that the another embodiment of the application provides.Such as Fig. 4 institute Show, virtual machine snapshot processing unit includes: receiving module 401, enquiry module 402 and offer module 403.
Receiving module 401, the reading disk requests issued during startup for receiving the first VM, the reading disk requests are used The first disk block in the disk snapshot needed for requesting the first VM to start.
Enquiry module 402, for inquiring the first disk block in disk and the snapshot caching of the first VM respectively;Wherein snapshot The disk block that buffer memory has frequency of use in disk snapshot to meet sets requirement.
There is provided module 403, for when the disk of the first VM or snapshot caching in inquire the first disk block when, to first VM returns to the first disk block.
In an optional embodiment, module 403 is provided and is also used to: when not the first VM disk and snapshot caching in look into When asking to the first disk block, to the first disk block of snapshot center requests for being stored with disk snapshot;That snapshot center is returned One disk block is stored into the disk of the first VM.
In an optional embodiment, virtual machine snapshot processing unit further includes statistical module, for starting in the first VM Before, it according to other VM during startup to the service condition of disk block each in disk snapshot, obtains each in the first disk block The frequency of use of disk block;The disk block that frequency of use meets sets requirement in each disk block is stored into snapshot caching.
In an optional embodiment, enquiry module 402 is also used in the start-up course of the first VM, with the side Lazyload Formula loads the disk block in disk snapshot according to disk block loading sequence into the disk of the first VM.
Further, enquiry module 402 is specifically used for when loading the disk block of disk snapshot:
According to disk block loading sequence, the disk block that inquiry needs to load into the disk of the first VM in snapshot caching;
When not inquiring the disk block for needing to load into the disk of the first VM in snapshot caching, the center Xiang Kuaizhao is asked The disk block for needing to load into the disk of the first VM is sought, and the needs that snapshot center returns are loaded into the disk of the first VM Disk block store into the disk of the first VM.
Further, enquiry module 402 is according to disk block loading sequence, and inquiry is needed to the first VM's in snapshot caching Before the disk block loaded in disk, it is also used to:
The reading disk block preferred list from snapshot caching or snapshot center, is stored with first in the disk block preferred list VM uses sequence to disk block each in disk snapshot;
Use sequence as disk block loading sequence each disk block the first VM.
Further, statistical module enquiry module 402 from snapshot cache or snapshot center in reading disk block dominated column Before table, it is also used to:
First VM counts the service condition of each disk block in history start-up course, to obtain the first VM to each Disk block uses sequence;
Each disk block is stored the call number of each disk block to disk block preferred list using sequence according to the first VM In;
Disk block preferred list is stored into snapshot caching or snapshot center.
In an optional embodiment, receiving module 401 is also used to:
Receive the disk requests of writing that the first VM issues during startup, and this write disk requests for request it is fast to disk Second disk block according in carries out write operation;
When not including the second disk block in the disk of the first VM, the incremental data write-in first of disk requests will be write In the corresponding sparse file of the disk of VM.
Further, receiving module 401 is also used to: recording increment data are sparse in the corresponding bitmap file of sparse file Position in file.
Correspondingly, enquiry module 402 is specifically used for: the incremental data of the first disk block is inquired in sparse file;When When inquiring the incremental data of the first disk block in sparse file, the incremental data of the first disk block and the first disk block is carried out Merge, with the disk block data after being merged.
Correspondingly, based on the disk block data after above-mentioned merging, module 403 is provided and is returning to the first disk block to the first VM When be specifically used for: the disk block data after merging are returned into the first VM.
Virtual machine snapshot processing unit provided in this embodiment can be used for executing the stream in above-mentioned Snapshot Method embodiment Journey, working principle repeat no more, and are detailed in the description of embodiment of the method.
Virtual machine snapshot processing unit provided by the embodiments of the present application increases snapshot caching for VM, stores VM start-up course In in required disk snapshot frequency of use meet the disk block of sets requirement, this is based on, when virtual machine snapshot processing unit receives When the reading disk requests issued during startup to VM, respectively in the disk of VM and snapshot caching inquiry VM request disk Block returns to VM when inquiring the disk block of VM request in the disk of VM or snapshot caching.Due to being stored in snapshot caching Be frequency of use meets sets requirement in disk snapshot disk block, which can increase reading disk The probability of disk block needed for request is hit, reduces the probability to snapshot center requests disk block, to mitigate the whole of snapshot center The concurrent pressure of body.
The foregoing describe the built-in function of virtual machine snapshot processing unit and structures, as shown in figure 5, in practice, the snapshot Processing unit can be realized as electronic equipment, comprising: memory 500, processor 501 and communication component 502;
Communication component 502, the reading disk requests issued during startup for receiving the first VM, the reading disk requests are used The first disk block in the disk snapshot needed for requesting the first VM to start;
Memory 500, for storing program;
Processor 501 is coupled to memory 500, for executing program to be used for:
The first disk block is inquired in disk and the snapshot caching of the first VM respectively;Wherein snapshot buffer memory has disk fast Meet the disk block of sets requirement according to middle frequency of use;
When the disk of the first VM or snapshot caching in inquire first disk block when, by communication component 502 to First VM returns to the first disk block;
Communication component 502 is also used to return to the first disk block to the first VM.
In an optional embodiment, processor 501 is also used to:
When not inquiring the first disk block in disk and the snapshot caching of the first VM, by communication component 502 to depositing Contain the first disk block of snapshot center requests of disk snapshot, and the first magnetic for snapshot center being returned to by communication component 502 Disk block is stored into the disk of the first VM.Correspondingly, communication component 502 is also used to ask to the snapshot center for being stored with disk snapshot The first disk block is sought, and the first disk block that snapshot center is returned is stored into the disk of the first VM.
In an optional embodiment, before the first VM starting, processor 501 is also used to:
According to other VM during startup to the service condition of disk block each in disk snapshot, obtain in the first disk block The frequency of use of each disk block;
The disk block that frequency of use meets sets requirement in each disk block is stored into snapshot caching.
In an optional embodiment, processor 501 is also used in the start-up course of the first VM: with the side Lazyload Formula loads the disk block in disk snapshot according to disk block loading sequence into the disk of the first VM.
Further, processor 501 is specifically used for when loading the disk block of disk snapshot:
According to disk block loading sequence, the disk block that inquiry needs to load into the disk of the first VM in snapshot caching;
When not inquiring the disk block for needing to load into the disk of the first VM in snapshot caching, pass through communication component 502 disk blocks for needing to load into the disk of the first VM to snapshot center requests, and pass through communication component 502 for snapshot center The disk block that the needs of return are loaded into the disk of the first VM is stored into the disk of the first VM.Correspondingly, communication component 502 Be also used to the disk block for needing to load into the disk of the first VM to snapshot center requests, and by needing of returning of snapshot center to The disk block loaded in the disk of first VM is stored into the disk of the first VM.
Further, processor 501 is according to disk block loading sequence, and inquiry needs the magnetic to the first VM in snapshot caching Before the disk block loaded in disk, it is also used to:
The reading disk block preferred list from snapshot caching or snapshot center, is stored with first in the disk block preferred list VM uses sequence to disk block each in disk snapshot;
Use sequence as disk block loading sequence each disk block the first VM.
Further, processor 501 is also used before reading disk block preferred list in snapshot caching or snapshot center In:
First VM counts the service condition of each disk block in history start-up course, to obtain the first VM to each Disk block uses sequence;
Each disk block is stored the call number of each disk block to disk block preferred list using sequence according to the first VM In;
Disk block preferred list is stored into snapshot caching or snapshot center.
In an optional embodiment, communication component 502 is also used to receive the write magnetic that the first VM is issued during startup Disk request, and this is write disk requests and carries out write operation to the second disk block in disk snapshot for requesting.Correspondingly, based on logical Component 502 is received writes disk requests for letter, and processor 501 is also used to: when not including the second disk in the disk of the first VM When block, the incremental data for writing disk requests is written in the corresponding sparse file of disk of the first VM.
Further, processor 501 is in the corresponding sparse file of disk that the first VM is written in the incremental data of write request Later, it is also used to: position of the recording increment data in sparse file in the corresponding bitmap file of sparse file.
Correspondingly, processor 501 is also used to: the incremental data of the first disk block is inquired in sparse file;When sparse When inquiring the incremental data of the first disk block in file, the incremental data of the first disk block and the first disk block is closed And with the disk block data after being merged;And the disk block data after merging are returned to first by communication component 502 VM.Correspondingly, communication component 502 is specifically used for the disk block data after merging returning to the first VM.
Further, as shown in figure 5, electronic equipment further include: display 503, power supply module 504 and audio component 505 Etc. other components.Members are only schematically provided in Fig. 5, are not meant to that electronic equipment only includes component shown in Fig. 5.
Communication component in Fig. 5, can be configured to convenient between communication component corresponding device and other equipment it is wired or The communication of wireless mode.Communication component corresponding device can access the wireless network based on communication standard, such as WiFi, 2G or 3G, Or their combination.In one exemplary embodiment, communication component receives via broadcast channel and comes from external broadcasting management system The broadcast singal or broadcast related information of system.In one exemplary embodiment, the communication component further includes near-field communication (NFC) module, to promote short range communication.For example, radio frequency identification (RFID) technology, Infrared Data Association can be based in NFC module (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
Display in Fig. 5, may include screen, and screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen may be implemented as touch screen, to receive input signal from the user.Touching Touching panel includes one or more touch sensors to sense the gesture on touch, slide, and touch panel.The touch sensing Device can not only sense the boundary of a touch or slide action, but also detect it is associated with the touch or slide operation continue when Between and pressure.
Power supply module in Fig. 5, the various assemblies for power supply module corresponding device provide electric power.Power supply module can wrap Include power-supply management system, one or more power supplys and other with for power supply module corresponding device generate, manage, and distribute electric power phase Associated component.
Audio component in Fig. 5, is configured as output and/or input audio signal.For example, audio component includes one Microphone (MIC), when audio component corresponding device is in operation mode, such as call mode, recording mode, and voice recognition mode When, microphone is configured as receiving external audio signal.The received audio signal can be further stored in memory or It is sent via communication component.In some embodiments, audio component further includes a loudspeaker, is used for output audio signal.
Electronic equipment provided by the embodiments of the present application, for handling virtual machine snapshot.Increase snapshot caching for VM, Frequency of use meets the disk block of sets requirement in required disk snapshot in storage VM start-up course, is based on this, works as electronic equipment When receiving the reading disk requests that VM is issued during startup, the inquiry VM request in the disk of VM and snapshot caching respectively Disk block returns to VM when inquiring the disk block of VM request in the disk of VM or snapshot caching.Due in snapshot caching What is stored is the disk block that frequency of use meets sets requirement in disk snapshot, can increase and read disk needed for disk requests are hit The probability of block reduces the probability to snapshot center requests disk block, thus the concurrent pressure of the entirety for mitigating snapshot center.
Correspondingly, the embodiment of the present application also provides a kind of computer readable storage medium for being stored with computer program, institute Stating computer program and being performed can be realized:
The reading disk requests that the first VM is issued during startup are received, the reading disk requests are for requesting the first VM starting The first disk block in required disk snapshot;
The first disk block is inquired in disk and the snapshot caching of the first VM respectively;Wherein snapshot buffer memory has disk fast Meet the disk block of sets requirement according to middle frequency of use;
When inquiring the first disk block in the disk of the first VM or snapshot caching, the first disk is returned to the first VM Block.
Above-mentioned computer program is performed, and other than above-mentioned steps may be implemented, can also realize its preceding method Other steps in embodiment, specifically repeat no more.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, commodity or equipment.
The above description is only an example of the present application, is not intended to limit this application.For those skilled in the art For, various changes and changes are possible in this application.All any modifications made within the spirit and principles of the present application are equal Replacement, improvement etc., should be included within the scope of the claims of this application.

Claims (13)

1. a kind of virtual machine snapshot processing method characterized by comprising
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are for requesting described first The first disk block in disk snapshot needed for virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot buffer memory There is frequency of use in the disk snapshot to meet the disk block of sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu first Virtual machine returns to first disk block.
2. the method according to claim 1, wherein further include:
When not inquiring first disk block in the disk of first virtual machine and snapshot caching, to being stored with First disk block described in the snapshot center requests of the disk snapshot;
First disk block that the snapshot center returns is stored into the disk of first virtual machine.
3. the method according to claim 1, wherein further include:
Before first virtual machine starting, according to other virtual machines during startup to each disk in the disk snapshot The service condition of block obtains the frequency of use of each disk block in first disk block;
The disk block that frequency of use meets sets requirement in each disk block is stored into snapshot caching.
4. the method according to claim 1, wherein further include:
It is empty to described first according to disk block loading sequence with lazy loading method in the start-up course of first virtual machine The disk block in the disk snapshot is loaded in the disk of quasi- machine.
5. according to the method described in claim 4, it is characterized in that, described virtual to described first according to disk block loading sequence The disk block in the disk snapshot is loaded in the disk of machine, comprising:
According to the disk block loading sequence, inquiry needs to add into the disk of first virtual machine in snapshot caching The disk block of load;
When not inquiring the disk block for needing to load into the disk of first virtual machine in snapshot caching, to institute The disk block that snapshot center requests need to load into the disk of first virtual machine is stated, and the snapshot center is returned The disk block loaded into the disk of first virtual machine is needed to store into the disk of first virtual machine.
6. according to the method described in claim 5, it is characterized in that, delaying according to the disk block loading sequence in the snapshot Before depositing the disk block that inquiry needs to load into the disk of first virtual machine, the method also includes:
The reading disk block preferred list from snapshot caching or the snapshot center, stores in the disk block preferred list There is first virtual machine to the use sequence of each disk block in the disk snapshot;
Use sequence as the disk block loading sequence each disk block first virtual machine.
7. according to the method described in claim 6, it is characterized in that, being read from snapshot caching or the snapshot center Before disk block preferred list, which comprises
First virtual machine counts the service condition of each disk block in history start-up course, to obtain The first virtual machine is stated to each disk block using sequence;
Each disk block is stored the call number of each disk block to institute using sequence according to first virtual machine It states in disk block preferred list;
The disk block preferred list is stored into snapshot caching or the snapshot center.
8. method according to claim 1-7, which is characterized in that further include:
Receive the disk requests of writing that first virtual machine issues during startup, it is described write disk requests for request to institute The second disk block stated in disk snapshot carries out write operation;
When not including the second disk block in the disk of first virtual machine, by the incremental data for writing disk requests It is written in the corresponding sparse file of disk of first virtual machine.
9. according to the method described in claim 8, it is characterized in that, the incremental data of the write request is written described first After in the corresponding sparse file of the disk of virtual machine, the method also includes:
Position of the incremental data in the sparse file is recorded in the corresponding bitmap file of the sparse file.
10. according to the method described in claim 8, it is characterized in that, described return to first magnetic to first virtual machine Disk block, comprising:
The incremental data of first disk block is inquired in the sparse file;
When inquiring the incremental data of first disk block in the sparse file, by first disk block with it is described The incremental data of first disk block merges, with the disk block data after being merged;
Disk block data after the merging are returned into first virtual machine.
11. a kind of virtual machine snapshot processing unit characterized by comprising
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are for requesting described first The first disk block in disk snapshot needed for virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot buffer memory There is frequency of use in the disk snapshot to meet the disk block of sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu first Virtual machine returns to first disk block.
12. a kind of electronic equipment characterized by comprising memory, processor and communication component;
The communication component, the reading disk requests issued during startup for receiving the first virtual machine, the reading disk are asked It asks for the first disk block in disk snapshot needed for requesting first virtual machine to start;
The memory, for storing program;
The processor is coupled to the memory, for executing described program to be used for:
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot buffer memory There is frequency of use in the disk snapshot to meet the disk block of sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, by described logical Believe that component returns to first disk block to first virtual machine;
The communication component is also used to return to first disk block to first virtual machine.
13. a kind of cloud computing system characterized by comprising computing cluster, storage cluster and snapshot center;
The computing cluster, for providing the computing resource of the first virtual machine, first virtual machine runs on the calculating collection In group;
The storage cluster, the disk and snapshot caching, the snapshot buffer memory for being used to provide the described the first virtual machine have Frequency of use meets the disk block of sets requirement in disk snapshot needed for first virtual machine starts;
The snapshot center, for storing the disk snapshot;
The storage cluster includes storage management apparatus, and the storage management apparatus is used for:
The reading disk requests that the first virtual machine issues during startup are received, the reading disk requests are for requesting described first The first disk block in disk snapshot needed for virtual machine starts;
First disk block is inquired in disk and the snapshot caching of first virtual machine respectively;The snapshot buffer memory There is frequency of use in the disk snapshot to meet the disk block of sets requirement;
When inquiring first disk block in the disk of first virtual machine or snapshot caching, Xiang Suoshu first Virtual machine returns to first disk block.
CN201711091731.1A 2017-11-08 2017-11-08 Virtual machine snapshot processing method, device and system Active CN109753340B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201711091731.1A CN109753340B (en) 2017-11-08 2017-11-08 Virtual machine snapshot processing method, device and system
PCT/CN2018/113335 WO2019091322A1 (en) 2017-11-08 2018-11-01 Virtual machine snapshot processing method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711091731.1A CN109753340B (en) 2017-11-08 2017-11-08 Virtual machine snapshot processing method, device and system

Publications (2)

Publication Number Publication Date
CN109753340A true CN109753340A (en) 2019-05-14
CN109753340B CN109753340B (en) 2021-07-13

Family

ID=66401985

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711091731.1A Active CN109753340B (en) 2017-11-08 2017-11-08 Virtual machine snapshot processing method, device and system

Country Status (2)

Country Link
CN (1) CN109753340B (en)
WO (1) WO2019091322A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661232A (en) * 2022-02-18 2022-06-24 阿里巴巴(中国)有限公司 Snapshot data reading method, device, system, equipment and storage medium
CN114661232B (en) * 2022-02-18 2024-06-21 阿里巴巴(中国)有限公司 Snapshot data reading method, device, system, equipment and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120210068A1 (en) * 2011-02-15 2012-08-16 Fusion-Io, Inc. Systems and methods for a multi-level cache
CN102662751A (en) * 2012-03-30 2012-09-12 浪潮电子信息产业股份有限公司 Method for improving availability of virtual machine system based on thermomigration
US20130198459A1 (en) * 2012-01-27 2013-08-01 Fusion-Io, Inc. Systems and methods for a de-duplication cache
CN103365741A (en) * 2012-03-30 2013-10-23 伊姆西公司 Method and equipment for snapshot and recovery of virtual machine cluster
CN104767643A (en) * 2015-04-09 2015-07-08 喜舟(上海)实业有限公司 Disaster recovery backup system based on virtual machine
CN105224391A (en) * 2015-10-12 2016-01-06 浪潮(北京)电子信息产业有限公司 A kind of online backup method and system of virtual machine
US20160004449A1 (en) * 2014-07-02 2016-01-07 Hedvig, Inc. Storage system with virtual disks

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106406981A (en) * 2016-09-18 2017-02-15 深圳市深信服电子科技有限公司 Disk data reading/writing method and virtual machine monitor

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120210068A1 (en) * 2011-02-15 2012-08-16 Fusion-Io, Inc. Systems and methods for a multi-level cache
US20130198459A1 (en) * 2012-01-27 2013-08-01 Fusion-Io, Inc. Systems and methods for a de-duplication cache
CN102662751A (en) * 2012-03-30 2012-09-12 浪潮电子信息产业股份有限公司 Method for improving availability of virtual machine system based on thermomigration
CN103365741A (en) * 2012-03-30 2013-10-23 伊姆西公司 Method and equipment for snapshot and recovery of virtual machine cluster
US20160004449A1 (en) * 2014-07-02 2016-01-07 Hedvig, Inc. Storage system with virtual disks
CN104767643A (en) * 2015-04-09 2015-07-08 喜舟(上海)实业有限公司 Disaster recovery backup system based on virtual machine
CN105224391A (en) * 2015-10-12 2016-01-06 浪潮(北京)电子信息产业有限公司 A kind of online backup method and system of virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114661232A (en) * 2022-02-18 2022-06-24 阿里巴巴(中国)有限公司 Snapshot data reading method, device, system, equipment and storage medium
CN114661232B (en) * 2022-02-18 2024-06-21 阿里巴巴(中国)有限公司 Snapshot data reading method, device, system, equipment and storage medium

Also Published As

Publication number Publication date
CN109753340B (en) 2021-07-13
WO2019091322A1 (en) 2019-05-16

Similar Documents

Publication Publication Date Title
US10732853B2 (en) Dynamic memory management techniques
KR102380670B1 (en) Fine-grained bandwidth provisioning in a memory controller
CN105740078B (en) Memory management method, device and terminal
CN107025225B (en) A kind of parallel execution method and apparatus of terminal database
CN109144716A (en) Operating system dispatching method and device, equipment based on machine learning
CN109144658B (en) Load balancing method and device for limited resources and electronic equipment
CN111406250A (en) Provisioning using prefetched data in a serverless computing environment
CN102023973A (en) Method, device and system for synchronizing database with application cache server
CN110008018A (en) A kind of batch tasks processing method, device and equipment
CN103544153A (en) Data updating method and system based on database
CN109241165B (en) Method, device and equipment for determining database synchronization delay
US20160306665A1 (en) Managing resources based on an application's historic information
US11797187B2 (en) Optimized I/O performance regulation for non-volatile storage
JP2018528515A (en) A method for a simplified task-based runtime for efficient parallel computing
CN106055274A (en) Data storage method, data reading method and electronic device
CN112650575A (en) Resource scheduling method and device and cloud service system
CN115858175B (en) Asynchronous I/O request priority scheduling method, device, medium and control equipment
CN112698793A (en) Data storage method and device, machine readable medium and equipment
CN114817978A (en) Data access method and system, hardware unloading equipment, electronic equipment and medium
KR20240010042A (en) Data access methods, devices, and non-transitory computer-readable storage media
CN107180051B (en) Log management method and server
CN109144715A (en) A kind of method, server and the equipment of resource optimization and update
US11593003B2 (en) Method and systems for recommending storage management actions based on capacities of storage systems
CN109753353B (en) Virtual machine resource allocation method and device and electronic equipment
CN109753340A (en) Virtual machine snapshot processing method, apparatus and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant