CN110147266A - Virtual machine starts method and apparatus, storage medium and electronic device - Google Patents
Virtual machine starts method and apparatus, storage medium and electronic device Download PDFInfo
- Publication number
- CN110147266A CN110147266A CN201910356688.XA CN201910356688A CN110147266A CN 110147266 A CN110147266 A CN 110147266A CN 201910356688 A CN201910356688 A CN 201910356688A CN 110147266 A CN110147266 A CN 110147266A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- pdi
- information
- data information
- primary data
- 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
Links
- 238000003860 storage Methods 0.000 title claims abstract description 253
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000015654 memory Effects 0.000 claims abstract description 150
- 238000004590 computer program Methods 0.000 claims description 11
- 239000007858 starting material Substances 0.000 claims description 7
- 238000012546 transfer Methods 0.000 claims description 5
- 239000011800 void material Substances 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 6
- 238000010801 machine learning Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 238000012545 processing Methods 0.000 description 10
- 238000009415 formwork Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000000151 deposition Methods 0.000 description 7
- 238000013500 data storage Methods 0.000 description 6
- 230000009471 action Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000007787 solid Substances 0.000 description 3
- 210000000352 storage cell Anatomy 0.000 description 3
- 241000208340 Araliaceae Species 0.000 description 2
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 2
- 235000003140 Panax quinquefolius Nutrition 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000007423 decrease Effects 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 235000008434 ginseng Nutrition 0.000 description 2
- 230000000977 initiatory effect Effects 0.000 description 2
- 230000014759 maintenance of location Effects 0.000 description 2
- 230000005012 migration Effects 0.000 description 2
- 238000013508 migration Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45575—Starting, stopping, suspending or resuming virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45595—Network integration; Enabling network access in virtual machine instances
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a kind of virtual machine starting method and apparatus, storage medium and electronic devices.Wherein, this method comprises: before starting the first virtual machine, obtain data transferring templates, wherein, the storage information of primary data information (pdi) is stored in data transferring templates, according to the storage information in data transferring templates, primary data information (pdi) used information when being the second virtual machine of starting, second virtual machine was activated before the starting of the first virtual machine, second virtual machine is virtual machine identical with the first type of virtual machine or the second virtual machine is the first virtual machine, obtain primary data information (pdi), by primary data information (pdi) storage into memory, when starting the first virtual machine, the primary data information (pdi) in memory is called to start the first virtual machine.The present invention solves the technical problem that virtual machine starting efficiency is low in the related technology.
Description
Technical field
The present invention relates to virtual machine field, in particular to a kind of virtual machine starting method and apparatus, storage medium and
Electronic device.
Background technique
In the related technology, during starting virtual machine, it usually needs virtual machine is repeatedly accessed memory, and from depositing
Data are read in reservoir, then by data call into memory, then the data in memory could be used to start virtual machine.
If however, using the above method, then due to starting virtual machine when, it is too big to read data time-consuming from memory,
And if data needed for starting virtual machine in advance are saved in memory, then due to the difference of virtual machine, can not determine starting
Data needed for virtual machine.
For above-mentioned problem, currently no effective solution has been proposed.
Summary of the invention
The embodiment of the invention provides a kind of virtual machine starting method and apparatus, storage medium and electronic devices, at least
Solve the low technical problem of virtual machine starting efficiency in the related technology.
According to an aspect of an embodiment of the present invention, a kind of virtual machine starting method is provided, comprising: empty in starting first
Before quasi- machine, data transferring templates are obtained, wherein the storage letter of primary data information (pdi) is stored in above-mentioned data transferring templates
Breath, above-mentioned primary data information (pdi) used information when being the second virtual machine of starting, above-mentioned second virtual machine is in above-mentioned first void
It was activated before quasi- machine starting, above-mentioned second virtual machine is virtual machine identical with above-mentioned first type of virtual machine or above-mentioned the
Two virtual machines are above-mentioned first virtual machine;According to the above-mentioned storage information in above-mentioned data transferring templates, above-mentioned original number is obtained
It is believed that breath;By the storage of above-mentioned primary data information (pdi) into memory;When starting above-mentioned first virtual machine, call in above-mentioned memory
Above-mentioned primary data information (pdi) starts above-mentioned first virtual machine.
According to another aspect of an embodiment of the present invention, a kind of virtual machine starter is additionally provided, comprising: first obtains list
Member, for obtaining data transferring templates, wherein be stored with original in above-mentioned data transferring templates before starting the first virtual machine
The storage information of beginning data information, above-mentioned primary data information (pdi) used information when being the second virtual machine of starting, above-mentioned second
Virtual machine was activated before the starting of above-mentioned first virtual machine, and above-mentioned second virtual machine is identical as above-mentioned first type of virtual machine
Virtual machine or above-mentioned second virtual machine be above-mentioned first virtual machine;Second acquisition unit, for being shifted according to above-mentioned data
Above-mentioned storage information in template, obtains above-mentioned primary data information (pdi);Storage unit, for storing above-mentioned primary data information (pdi)
Into memory;Call unit, for calling the above-mentioned primary data information (pdi) in above-mentioned memory when starting above-mentioned first virtual machine
Start above-mentioned first virtual machine.
As a kind of optional example, above-mentioned second acquisition unit includes: the first acquisition module, for according to above-mentioned storage
Information obtains a plurality of information in above-mentioned primary data information (pdi) parallel.
As a kind of optional example, above-mentioned apparatus further include: configuration unit, for start above-mentioned first virtual machine it
Before, for the above-mentioned storage information configuration reference value stored in above-mentioned data transferring templates;Unit is deleted, for starting above-mentioned the
After one virtual machine, in the case where above-mentioned reference value is less than first threshold, the above-mentioned reference value of above-mentioned first threshold will be less than
Corresponding storage information is deleted from above-mentioned data transferring templates.
As a kind of optional example, above-mentioned apparatus further include: the first adjustment unit, if virtual for starting above-mentioned first
When machine, the above-mentioned primary data information (pdi) stored into memory is used, then after starting above-mentioned first virtual machine, increase and quilt
The above-mentioned reference value of the corresponding storage information of the above-mentioned primary data information (pdi) used;Second adjustment unit, if above-mentioned for starting
When the first virtual machine, store above-mentioned primary data information (pdi) into memory and be not used by, then start above-mentioned first virtual machine it
Afterwards, the above-mentioned reference value of storage information corresponding with the above-mentioned primary data information (pdi) being not used by is reduced.
Another aspect according to an embodiment of the present invention, additionally provides a kind of storage medium, and meter is stored in the storage medium
Calculation machine program, wherein the computer program is arranged to execute above-mentioned virtual machine starting method when operation.
Another aspect according to an embodiment of the present invention, additionally provides a kind of electronic device, including memory, processor and deposits
Store up the computer program that can be run on a memory and on a processor, wherein above-mentioned processor passes through computer program and executes
Above-mentioned virtual machine starts method.
In embodiments of the present invention, it uses before starting the first virtual machine, obtains data transferring templates, wherein on
The storage information that primary data information (pdi) is stored in data transferring templates is stated, above-mentioned primary data information (pdi) is the second virtual machine of starting
When used information above-mentioned primary data information (pdi) obtained according to the above-mentioned storage information in above-mentioned data transferring templates, will be upper
Primary data information (pdi) storage is stated into memory, when starting above-mentioned first virtual machine, calls the above-mentioned original number in above-mentioned memory
It is believed that breath starts the method for above-mentioned first virtual machine.Due in the above-mentioned methods, having got the first virtual machine of last starting
Or therefore the storage information of starting and data needed for the second virtual machine of the first virtual machine same type is being again started up the
Before one virtual machine, memory is write data into according to above-mentioned storage information in advance, to start the first virtual machine, is opened to save
When dynamic first virtual machine, the time of data is read, improves the efficiency of the first virtual machine of starting, and then is solved in the related technology
The low technical problem of virtual machine starting efficiency.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair
Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of schematic diagram of the application environment of optional virtual machine starting method according to an embodiment of the present invention;
Fig. 2 is the schematic diagram of the application environment of another optional virtual machine starting method according to an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of optional virtual machine starting method according to an embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of optional virtual machine starting method according to an embodiment of the present invention;
Fig. 5 is the schematic diagram of another optional virtual machine starting method according to an embodiment of the present invention;
Fig. 6 is the flow diagram of another optional virtual machine starting method according to an embodiment of the present invention;
Fig. 7 is the schematic diagram of another optional virtual machine starting method according to an embodiment of the present invention;
Fig. 8 is the schematic diagram of another optional virtual machine starting method according to an embodiment of the present invention;
Fig. 9 is the schematic diagram of another optional virtual machine starting method according to an embodiment of the present invention;
Figure 10 is a kind of structural schematic diagram of optional virtual machine starter according to an embodiment of the present invention;
Figure 11 is a kind of structural schematic diagram of optional electronic device according to an embodiment of the present invention.
Specific embodiment
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The model that the present invention protects all should belong in member's every other embodiment obtained without making creative work
It encloses.
It should be noted that description and claims of this specification and term " first " in above-mentioned attached drawing, "
Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way
Data be interchangeable under appropriate circumstances, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that cover
Cover it is non-exclusive include, for example, the process, method, system, product or equipment for containing a series of steps or units are not necessarily limited to
Step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, product
Or other step or units that equipment is intrinsic.
According to an aspect of an embodiment of the present invention, providing a kind of virtual machine starting method optionally can as one kind
The embodiment of choosing, above-mentioned virtual machine starting method can be, but not limited to be applied in environment as shown in Figure 1.
As shown in Figure 1, being interacted between virtual machine 102 and server 106 by network 104.Virtual machine 102 includes depositing
Reservoir 102-1, for storing data, processor 102-2, for handling data.Server 106 includes database 106-1, is used for
Storing data, processing engine 106-2, for handling data.During being activated 102 first time of virtual machine, starting is obtained
Primary data information (pdi) used in virtual machine, and the storage information of primary data information (pdi) is obtained, by storage information storage to service
In device 106.Before second starting virtual machine 102, virtual machine 102 obtains data transferring templates from server 106, and from storage
Primary data information (pdi) used in starting virtual machine 102 for the first time is obtained in device 102-1, and in primary data information (pdi) is saved in
In depositing.In second of starting virtual machine 102, primary data information (pdi) is obtained directly from memory and starts virtual machine 102.
Alternatively, above-mentioned virtual machine starting method can be, but not limited to be applied in environment as shown in Figure 2.
Virtual machine 202 is interacted by network 204 with server 208, and virtual machine 206 is handed over by network 204 and server 208
Mutually.Virtual machine 202 includes memory 202-1, for storing data, processor 202-2, for handling data.Virtual machine 204 includes
Memory 204-1, for storing data, processor 204-2, for handling data.Server 208 includes database 208-1, is used for
Storing data, processing engine 208-2, for handling data.Virtual machine 202 is identical as 206 type of virtual machine.In virtual machine 204
During starting, primary data information (pdi) required when virtual machine 204 starts is obtained, and saves the storage letter of primary data information (pdi)
It ceases in server 208.Before the starting of virtual machine 202, according to the storage information saved in server 208 in memory 102-1
In used primary data information (pdi) when getting starting virtual machine 204, and above-mentioned primary data information (pdi) is saved in virtual machine
In 202 memory.Virtual machine 202 start when, directly from memory call starting virtual machine 204 used in original number it is believed that
Breath, and start virtual machine 202.
It should be noted that in the related technology, during starting virtual machine, it usually needs virtual machine is repeatedly accessed
Memory, and data are read from memory, then by data call into memory, then the data in memory could be used to open
Dynamic virtual machine, to cause the starting efficiency of virtual machine low.And in the present embodiment, when starting virtual machine, get upper one
The first virtual machine of secondary starting or the storage information of starting and data needed for the second virtual machine of the first virtual machine same type, because
This writes data into memory according to above-mentioned storage information before being again started up the first virtual machine in advance, virtual with starting first
Machine improves the efficiency of the first virtual machine of starting to read the time of data when saving the first virtual machine of starting.
Optionally, above-mentioned network can include but is not limited to wireless network or cable network.Wherein, the wireless network packet
It includes: the network of WIFI and other realization wireless communications.Above-mentioned cable network can include but is not limited to: wide area network, Metropolitan Area Network (MAN), office
Domain net.Above-mentioned server can include but is not limited to any hardware device that can be calculated.
Optionally, as an alternative embodiment, as shown in figure 3, above-mentioned virtual machine starting method includes:
S302 obtains data transferring templates, wherein deposit in the data transferring templates before starting the first virtual machine
Contain the storage information of primary data information (pdi), the primary data information (pdi) used information, institute when being the second virtual machine of starting
It states the second virtual machine to be activated before first virtual machine starting, second virtual machine is and the first virtual machine class
The identical virtual machine of type or second virtual machine are first virtual machine;
S304 obtains the primary data information (pdi) according to the storage information in the data transferring templates;
S306, by primary data information (pdi) storage into memory;
S308 is called described in the primary data information (pdi) starting in the memory when starting first virtual machine
First virtual machine.
Optionally, above-mentioned virtual machine starting method can be, but not limited to during being applied to starting virtual machine.Starting
Before first virtual machine, the second void of the first virtual machine of last starting or starting with the first virtual machine same type has been got
Therefore the storage information of data needed for quasi- machine before being again started up the first virtual machine, in advance will according to above-mentioned storage information
Memory is written in data, to start the first virtual machine, to read the time of data when saving the first virtual machine of starting, improves
The efficiency of first virtual machine of starting.
Optionally, the second virtual machine in the present embodiment can be the first virtual machine or be and the first type of virtual machine phase
Same virtual machine.That is, the storage information stored in data transferring templates can obtain for the first virtual machine of last starting
It takes, or obtained to start the second virtual machine identical with the first type of virtual machine.
Optionally, before starting the first virtual machine, when obtaining primary data information (pdi), can from memory such as hard disk,
Primary data information (pdi) is obtained according to data transferring templates in CD, array SAN storage-block device or distributed storage-block device.
It may include a plurality of information in primary data information (pdi), it, can be according to data when obtaining a plurality of information in primary data information (pdi)
Transferring templates obtain a plurality of information in primary data information (pdi) parallel, to improve the speed for obtaining primary data information (pdi).
Optionally, due to having got data transferring templates when starting the second virtual machine, and remember in data transferring templates
Record has the storage information of primary data information (pdi) used in the second virtual machine of starting.And due to the first virtual machine and the second virtual machine
For the identical virtual machine of type, therefore, can according to the storage acquisition of information recorded in data transferring templates to original number it is believed that
Breath, and by primary data information (pdi) storage into the memory of the first virtual machine, to be used when starting the first virtual machine.
Optionally, the storage information recorded in data transferring templates includes the storage location and original number of primary data information (pdi)
It is believed that the data length of breath.For example, data length is 8, the used original number when getting the second virtual machine of starting it is believed that
It, can be directly from the storage position of primary data information (pdi) when obtaining primary data information (pdi) after the storage location and data length of breath
Set the data for starting to obtain the data length that length is primary data information (pdi).For example, as shown in figure 4, showing original number in Fig. 4
It is believed that breath 402, primary data information (pdi) 402 is saved in memory.Box 404 in Fig. 4 can be the storage cell of memory.
At storage location 406 (position of 8 black box in Fig. 4) for the data for getting primary data information (pdi), directly from depositing
Storage space sets the primary data information (pdi) for starting to obtain 8 length.
Optionally, primary data information (pdi) may have multiple, be respectively stored in different positions.Obtaining multiple initial data
When information, primary data information (pdi) can be obtained parallel.As shown in figure 5, primary data information (pdi) includes data 502 and data 504, number
It is 5 according to 502 length, 504 length of data is 3, and data 502 have been stored in the different positions of memory from data 504.It is obtaining
When primary data information (pdi), according to storage location 502-1 (5 in Fig. 5 of the primary data information (pdi) recorded in data transferring templates
Continuous black box) with 504-1 (3 continuous black box in Fig. 5), it is parallel obtain original number that length is 5 it is believed that
The primary data information (pdi) 504 that breath 502 is 3 with length.
Optionally, the storage location of primary data information (pdi) may be discontinuous, if primary data information (pdi) length is 2, but two
The storage location of the primary data information (pdi) of a unit is not continuous.At this point, getting the original number of the 1st unit it is believed that
After breath, the primary data information (pdi) of the 2nd unit is searched according to the primary data information (pdi) of the 1st unit, and obtain the 2nd unit
Primary data information (pdi).
Optionally, after it will start the storage of primary data information (pdi) used in the second virtual machine into memory, starting
When the first virtual machine, since the first virtual machine and the second virtual machine are the identical virtual machine of type, at this point, the first virtual machine can be with
It calls directly the primary data information (pdi) being saved in memory and starts the first virtual machine, to improve the effect of the first virtual machine of starting
Rate.
It should be noted that the primary data information (pdi) of the first virtual machine of last starting can also be obtained in the present embodiment,
The storage location and data length for saving primary data information (pdi) are being again started up the first virtual machine into data transferring templates
Before, primary data information (pdi) is saved in memory according to data transferring templates, and start the first virtual machine.
Optionally, when starting the first virtual machine using the primary data information (pdi) in memory, first can also be obtained
The data acquisition of virtual machine instructs, and data acquisition instruction is for data needed for obtaining the first virtual machine of starting.It is obtained according to data
Instruction fetch can determine target data information.Then primary data information (pdi) and target data information are compared, and to original number it is believed that
Breath is updated.
It optionally, can be by target data information when being updated according to target data information to primary data information (pdi)
The storage location and data length of the information different from primary data information (pdi) are written in data transferring templates.Start next time
When the first virtual machine, data are shifted to memory using updated data transferring templates, and start the first virtual machine.
Optionally, the present embodiment can also be the storage information configuration reference value in data transferring templates.Above-mentioned reference value
For indicating the accuracy of storage information.Reference value is higher, illustrates the first virtual machine on startup, corresponding using storage information
A possibility that primary data information (pdi), is higher.Reference value can be changed with each starting virtual machine, if after starting virtual machine,
Primary data information (pdi) is not used, then the corresponding reference value of storage information of primary data information (pdi) can decline.When under reference value
When dropping to a threshold value, storage information can be deleted from data transferring templates.
For example, record has two storage information in data transferring templates, first storage information and Article 2 store information
Corresponding reference value is all 100.If when starting the first virtual machine, using to first storage, information is corresponding is saved in
The primary data information (pdi) of memory, then increase the reference value of first storage information, such as increases by 20, and when the first virtual machine of starting
And the corresponding primary data information (pdi) for being saved in memory of Article 2 storage information is not used, at this point, reducing by the second storage information pair
The reference value answered, such as reduce 20.After data transferring templates are used for multiple times, the corresponding reference value of the second storage information is zero,
The second storage information is then deleted from data transferring templates, to mitigate burden when primary data information (pdi) to be transferred to memory.
It should be noted that above-mentioned reference value may include the upper limit and/or lower limit.After reaching 100 such as reference value, then no longer
It continues growing.
Below using the first virtual machine and the second virtual machine as the virtual machine instance of same type, to above-mentioned virtual machine starting side
Method is illustrated.
In the prior art, if to start a virtual machine, starting the VM process of virtual machine and started by Loop each
When program, there are a large amount of operations read disk processing, add up to read storage medium more than 1,000 times in each step, be commonly stored
Medium is common hard disc or storage system, thousands of times slow with respect to memory of time delay for reading data, as solid state hard disk access when
Prolong generally 50-100 microsecond, when server hard disc, array SAN storage-block device and Ceph distributed storage-block device access
It is even longer to prolong generally 2-30 milliseconds, and this has dragged slowly the overall startup speed of VME operating system.
The present embodiment in virtual machine starting logic, in computing module (providing virtual machine CPU, the computing resources such as memory) and
Other than memory module (data storage resource of virtual machine, such as independent disk or distributed memory system etc. are provided), machine is increased newly
Device study module.It is illustrated in conjunction with S602 to the S624 of Fig. 6.When user 602 creates the first virtual machine 604, in machine
Data transferring templates are imported in study module 608.Record has used original when starting the second virtual machine in data transferring templates
The storage information of beginning data information, storage information includes storage location and data length.Machine learning module 608 saves data and turns
Shifting formwork plate.When starting the first virtual machine 604, VM process initiation in the first virtual machine 604, VM process notifies machine by parameter
Device study module 608 loads the type of data transferring templates, and machine learning module 608 loads corresponding data migration module and obtains
Access is sent to memory module 606 according to transferring templates and by data transferring templates, and notice memory module 606 turns according to data
Storage location and memory length in shifting formwork plate, load data into memory.In addition, can also be stored in data transferring templates
When having starting virtual machine, the sequence of data is called.Due to having got the data transferring templates of all data, it is possible to
Before the starting of first virtual machine 604, just concurrently executes and read all data to memory.1,000 data are usually read one by one to ask
The time-consuming asked is single request time delay multiplied by 1,000.But the time that parallel mode executes 1,000 request consumption is single request
Time delay is multiplied by 1,000 divided by concurrency.Such as concurrency value is 100, then wastage in bulk or weight time delay is original 1/100.Data save
In the biggish storage of time delay, such as distributed memory system (single request time delay is larger, but supports to request more concurrent processing), sheet
The acceleration effect that scheme generates becomes apparent.In addition, the first virtual machine 604 is on startup, obtained from the memory of memory module 606
Access according to when, it is also necessary to machine learning module 608 send starting the first virtual machine 604 data read request.Machine learning
Target data information required for module 608 determines the first virtual machine 604 of starting according to the request received, and according to number of targets
According to information update data transferring templates.Machine learning module 608 identifies that the first virtual machine 604 reads the difference (data of data
Reading position, length, timing change, newly-increased request of data, reduce request of data), and update into data time sequence template,
New data template is formed, to be provided when the starting of next virtual machine.After the first virtual machine start completion, it can notify
Machine learning module 608 stops updating data template (being not shown in Fig. 6).
It should be noted that the step S618 and step S622 in Fig. 6 can be carried out simultaneously, or successively be carried out, successively
The sequence of progress is without limitation.
When being updated to data transferring templates, the storage information in data transferring templates can be updated.Example
Such as, information configuration reference value is stored for each in data transferring templates.As shown in Figure 7.Storing information includes initial data
Operation order, storage location, data length, action type and the reference value of information.Reference value initially can be set to 100.
When being updated to data transferring templates, if target data information used in the first virtual machine of starting is former
Do not have in beginning data information, that is, used new data, then the storage information of the data of new data is added to data and turned
In shifting formwork plate, and corresponding reference value is set.In order to avoid accidental situation, reference value can be set to 10.And if target
Data information be it is already existing in primary data information (pdi), then illustrate start the first virtual machine used in primary data information (pdi)
Data, the reference value of the storage information of the primary data information (pdi) used is increased at this time, such as increases by 1.And if original number
It is believed that comprising the data not included in target data information in breath, then illustrates to contain in primary data information (pdi) and be not used by
Information.At this point, the reference value of the corresponding storage information of the primary data information (pdi) being not used by is reduced.At this point, in order to accelerate to wash in a pan
The primary data information (pdi) being of little use is eliminated, reference value can reduce 3.When reference value is 0, the storage information that reference value is 0 is eliminated.
Such as shown in Fig. 8 and Fig. 9, Fig. 8 is data transferring templates, and hit, which refers to storage information is corresponding, to be loaded into memory
Primary data information (pdi) used when the first virtual machine starts, miss refers to the corresponding original loaded into memory of storage information
Beginning data information is not used by or there are mistakes.The 8 information some shown in Fig. 8 hit the miss having, and illustrate starting
When the first virtual machine, primary data information (pdi) some loaded into memory is used to, and some is not used by, and some there are data
Mistake.More new data transferring templates are needed at this time.As shown in figure 9, the reference value of the storage location of hit is added 1, by miss
The reference value of storage information of primary data information (pdi) subtract 1, and increase newly in primary data information (pdi) miss original number it is believed that
The storage information of breath.
The present embodiment by one virtual machine of starting up to a hundred time and can be updated data transferring templates, to obtain
Normal data transferring templates used in the virtual machine of one type of starting are got, and normal data transferring templates investment is made
With.
Through this embodiment, turned by before starting the first virtual machine, obtaining data transferring templates according to above-mentioned data
Above-mentioned storage information in shifting formwork plate, obtains above-mentioned primary data information (pdi), by the storage of above-mentioned primary data information (pdi) into memory,
When starting above-mentioned first virtual machine, the above-mentioned primary data information (pdi) in above-mentioned memory is called to start above-mentioned first virtual machine, thus
Before being again started up the first virtual machine, memory is write data into according to above-mentioned storage information in advance, to start the first virtual machine,
When to save the first virtual machine of starting, the time of data is read, improves the efficiency of the first virtual machine of starting.
As a kind of optional embodiment, according to the storage information in the data transferring templates, described in acquisition
Primary data information (pdi) includes:
S1 obtains a plurality of information in the primary data information (pdi) according to the storage information parallel.
It optionally, may include the data (initial data used when starting the second virtual machine in above-mentioned storage information
Information) reading order, storage location and data length, each reading order, storage location and data length form one
Store information.When obtaining a plurality of storage information, if obtained according to reading order single, elapsed time is more.Therefore, it is obtaining
Data transferring templates are got, after determining the data for needing to be transferred in memory, above-mentioned a plurality of storage information can be obtained parallel.?
In the case where parallel acquisition storage information, the speed for obtaining storage information is greatly increased.For example, usually reading 1,000 one by one
The time-consuming of a request of data is single request time delay multiplied by 1,000.But the time that parallel mode executes 1,000 request consumption is
Single request time delay is multiplied by 1,000 divided by concurrency.If concurrency is set as 100, wastage in bulk or weight time delay will be reduced to original hundred
/ mono-.
Through this embodiment, by obtaining a plurality of information of primary data information (pdi) parallel when obtaining primary data information (pdi),
The efficiency for obtaining primary data information (pdi) is improved to allow, further improves the efficiency of starting virtual machine.
As a kind of optional embodiment, the storage information according in the data transferring templates is obtained
The primary data information (pdi) includes:
S1 obtains storage location, the original number of the primary data information (pdi) stored in the data transferring templates
It is believed that the data length of breath, wherein the storage information includes the storage location of the primary data information (pdi), the initial data
The data length of information;
S2, according to the acquisition of the data length of the storage location of the primary data information (pdi) and the primary data information (pdi)
Primary data information (pdi).
Optionally, as shown in fig. 7, can recorde the operation order of primary data information (pdi) in data transferring templates, storage
Position, data length, action type and reference value.Reference value is for indicating a possibility that primary data information (pdi) is used.Ginseng
It is bigger to examine value, then a possibility that primary data information (pdi) is used is higher.After obtaining data transferring templates, since data shift mould
The storage location and data length of data have been described in plate, therefore, can directly have been obtained according to data transferring templates original
Data information.
Through this embodiment, by obtaining original number according to the storage location of primary data information (pdi) and data length it is believed that
Breath improves the accuracy for obtaining primary data information (pdi), further so as to accurately and efficiently get primary data information (pdi)
Improve the efficiency of starting virtual machine.
As a kind of optional embodiment, the storage location according to the primary data information (pdi) and the original number
It is believed that the data length acquisition primary data information (pdi) of breath includes:
S1 obtains the data that length is the data length, obtains since the storage location of the primary data information (pdi)
The primary data information (pdi).
Optionally, above-mentioned storage location can be the position of primary data information (pdi) in memory.Getting original number
It is believed that navigating to the position in memory after the position of breath in memory, the 200th storage for such as navigating to memory is single
Position, is, for example, then 8 according to data length, then starts the data of 8 units of acquisition in the 200th storage cell of memory,
And the data that will acquire are as primary data information (pdi).
Through this embodiment, primary data information (pdi) is obtained by the above method, so as to accurately and efficiently get original
Beginning data information improves the accuracy for obtaining primary data information (pdi), further improves the efficiency of starting virtual machine.
As a kind of optional embodiment, when starting first virtual machine, the original in the memory is called
Beginning data information starts after first virtual machine, further includes:
S1 is obtained and is started target data information used in first virtual machine, wherein the target data information is
Start information required when first virtual machine;
S2 updates the data transferring templates according to the target data information.
Optionally, when starting the first virtual machine, it is also necessary to target data information needed for obtaining the first virtual machine of starting.
Target data information can be identical or different with primary data information (pdi).If there are primary data information (pdi)s not to wrap for target data information
The content included, then when illustrating the starting of the first virtual machine, in addition to being pre-reserved to the primary data information (pdi) in memory, it is also necessary to portion
Divided data.The partial data can be obtained from memory.If primary data information (pdi) includes that target data information is not to be covered
Content then illustrates not needing when the partial data in primary data information (pdi) starts the first virtual machine.The contents of the section can
Not to be saved in memory, to reduce the workload of central processing unit.
Through this embodiment, by shifting mould to data according to target data information after getting target data information
Plate is updated, and so as to be trained by multiple starting virtual machine to data transferring templates, improves data transfer
The accuracy of template further improves the efficiency of starting virtual machine.
It is described that the data transferring templates packet is updated according to the target data information as a kind of optional embodiment
It includes:
S1, by the storage location and number of data information different from the primary data information (pdi) in the target data information
According to length storage into the data transferring templates.
For example, including primary data information (pdi) 1 and primary data information (pdi) 2 with primary data information (pdi), target data information includes
Target data information 1 and target data information 2, primary data information (pdi) 1 is identical with target data information 1, primary data information (pdi) 2 and
For 2 difference of target data information, primary data information (pdi) 1 and primary data information (pdi) 2 are saved in memory, empty in starting first
When quasi- machine, primary data information (pdi) 1 (target data information 1) has been used, and primary data information (pdi) 2 is not used, but has been used
Target data information 2.At this time, it may be necessary to which the storage location of target data information 2 and data length are saved in data transfer mould
In plate, when restarting virtual machine next time using data transferring templates, so that it may by primary data information (pdi) 1, primary data information (pdi) 2 with
Target data information 2 is all saved in memory.Alternatively, the storage location of target data information 2 is saved in data length
After in data transferring templates, the storage location and number of the primary data information (pdi) 2 stored in data transferring templates can also be deleted
According to length.When then starting next time virtual machine uses data transferring templates, it is only necessary to by primary data information (pdi) 1 and target data information
2 are saved in memory.
Through this embodiment, data transferring templates are updated by the above method, so as to be opened by multiple
Dynamic virtual machine is trained data transferring templates, improves the accuracy of data transferring templates, and it is empty to further improve starting
The efficiency of quasi- machine.
As a kind of optional embodiment,
S1, before starting first virtual machine, further includes: for the storage stored in the data transferring templates
Information configuration reference value;
S2, after starting first virtual machine, further includes: in the case where the reference value is less than first threshold,
The corresponding storage information of the reference value for being less than the first threshold is deleted from the data transferring templates.
Optionally, above-mentioned reference value is for indicating a possibility that corresponding primary data information (pdi) of storage information is used.Ginseng
It is bigger to examine value, possibility is higher.And reference value is too small, then when illustrating to start virtual machine, a possibility that using primary data information (pdi)
Very little.If reference value is zero, then the storage information for being zero by reference value is needed to delete from data transferring templates, is protected with reducing
It is stored to the quantity of the data in memory.
For example, can be when calling data transferring templates every time, the reference of the storage information in detection data transferring templates
Value.If reference value is zero, then the storage information that reference value is zero is deleted.
Through this embodiment, by the way that reference value is arranged for the storage information in data transferring templates, so as to data
Storage information in transferring templates is monitored, and improves the accuracy of data transferring templates, further increases starting virtual machine
Efficiency.
As a kind of optional embodiment, after starting first virtual machine, further includes:
S1, when starting first virtual machine, in the feelings that the primary data information (pdi) stored into memory is used
Under condition, increase the reference value of storage information corresponding with the primary data information (pdi) used;
S2 is not used by when starting first virtual machine in the primary data information (pdi) stored into memory
In the case of, reduce the reference value of storage information corresponding with the primary data information (pdi) being not used by.
Optionally, after starting the first virtual machine, reference value can be adjusted.Or a data are called every time
Transferring templates after starting a virtual machine, require to be adjusted the reference value in data transferring templates.
Adjustable strategies are as follows: if call data transferring templates and start virtual machine, according to depositing in data transferring templates
The data that storage information is shifted are used, then increase the reference value of the corresponding storage information of the data used, if according to number
It is not used by according to the data that the storage information in transferring templates is shifted, then reduces the corresponding storage information of the data being not used by
Reference value.The data except the data according to the transfer of data transferring templates are also used when if starting virtual machine, then are needed
The storage location of the data additionally used and data length are saved in data transferring templates.
Such as shown in figs. 7 to 9.2000 storage information, when starting the first virtual machine, Ke Yigen are saved in Fig. 7
2000 primary data information (pdi)s are saved in memory according to the 2000 storage information saved in Fig. 7.Fig. 8 is empty in starting first
When quasi- machine, used 900 storages information gets 900 target data informations.900 storage information some are included in
In 2000 storage information of Fig. 7, some is not comprised in 2000 storage information of Fig. 7.At this time, it may be necessary to the number of Fig. 7
It is updated according to transferring templates.Such as, preceding two storages information of Fig. 8 is already existing in Fig. 7, therefore, by first two in Fig. 7
The reference value of storage information adds 1.And the 3rd article of storage information in Fig. 8 be it is not to be covered in 2000 articles of storage information in Fig. 7, say
New data are used when the first virtual machine of bright starting, therefore, it is necessary to add the storage location and data of the new data used
Length, as added the 4th article of storage information in Fig. 9.Although and the 3rd article of storage information in Fig. 7 is when starting the first virtual machine
Corresponding primary data information (pdi) is saved to memory, but starts the first virtual machine and is not used.Therefore, it is necessary to reduce correspondence
Reference value.Such as the 3rd article of storage information in Fig. 9, reference value subtracts 1.
Through this embodiment, by above method tune reference value, can according to the result of starting virtual machine to reference value into
Row adjustment, improves the accuracy of data transferring templates, further increases the efficiency of starting virtual machine.
It should be noted that for the various method embodiments described above, for simple description, therefore, it is stated as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the sequence of acts described because
According to the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art should also know
It knows, the embodiments described in the specification are all preferred embodiments, and related actions and modules is not necessarily of the invention
It is necessary.
Other side according to an embodiment of the present invention additionally provides a kind of for implementing above-mentioned virtual machine starting method
Virtual machine starter.As shown in Figure 10, which includes:
(1) first acquisition unit 1002, for obtaining data transferring templates, wherein institute before starting the first virtual machine
The storage information that primary data information (pdi) is stored in data transferring templates is stated, the primary data information (pdi) is the second virtual machine of starting
When used information, second virtual machine was activated before first virtual machine starting, and second virtual machine is
Virtual machine identical with first type of virtual machine or second virtual machine are first virtual machine;
(2) second acquisition unit 1004, for according to the storage information in the data transferring templates, described in acquisition
Primary data information (pdi);
(3) storage unit 1006, for storing the primary data information (pdi) into memory;
(4) call unit 1008, for calling the original number in the memory when starting first virtual machine
It is believed that breath starts first virtual machine.
Optionally, above-mentioned virtual machine starter can be, but not limited to during being applied to starting virtual machine.Starting
Before first virtual machine, the second void of the first virtual machine of last starting or starting with the first virtual machine same type has been got
Therefore the storage information of data needed for quasi- machine before being again started up the first virtual machine, in advance will according to above-mentioned storage information
Memory is written in data, to start the first virtual machine, to read the time of data when saving the first virtual machine of starting, improves
The efficiency of first virtual machine of starting.
Optionally, the second virtual machine in the present embodiment can be the first virtual machine or be and the first type of virtual machine phase
Same virtual machine.That is, the storage information stored in data transferring templates can obtain for the first virtual machine of last starting
It takes, or obtained to start the second virtual machine identical with the first type of virtual machine.
Optionally, before starting the first virtual machine, when obtaining primary data information (pdi), can from memory such as hard disk,
Primary data information (pdi) is obtained according to data transferring templates in CD, array SAN storage-block device or distributed storage-block device.
It may include a plurality of information in primary data information (pdi), it, can be according to data when obtaining a plurality of information in primary data information (pdi)
Transferring templates obtain a plurality of information in primary data information (pdi) parallel, to improve the speed for obtaining primary data information (pdi).
Optionally, due to having got data transferring templates when starting the second virtual machine, and remember in data transferring templates
Record has the storage information of primary data information (pdi) used in the second virtual machine of starting.And due to the first virtual machine and the second virtual machine
For the identical virtual machine of type, therefore, can according to the storage acquisition of information recorded in data transferring templates to original number it is believed that
Breath, and by primary data information (pdi) storage into the memory of the first virtual machine, to be used when starting the first virtual machine.
Optionally, the storage information recorded in data transferring templates includes the storage location and original number of primary data information (pdi)
It is believed that the data length of breath.For example, data length is 8, the used original number when getting the second virtual machine of starting it is believed that
It, can be directly from the storage position of primary data information (pdi) when obtaining primary data information (pdi) after the storage location and data length of breath
Set the data for starting to obtain the data length that length is primary data information (pdi).For example, as shown in figure 4, showing original number in Fig. 4
It is believed that breath 402, primary data information (pdi) 402 is saved in memory.Box 404 in Fig. 4 can be the storage cell of memory.
At storage location 406 (position of 8 black box in Fig. 4) for the data for getting primary data information (pdi), directly from depositing
Storage space sets the primary data information (pdi) for starting to obtain 8 length.
Optionally, primary data information (pdi) may have multiple, be respectively stored in different positions.Obtaining multiple initial data
When information, primary data information (pdi) can be obtained parallel.As shown in figure 5, primary data information (pdi) includes data 502 and data 504, number
It is 5 according to 502 length, 504 length of data is 3, and data 502 have been stored in the different positions of memory from data 504.It is obtaining
When primary data information (pdi), according to storage location 502-1 (5 in Fig. 5 of the primary data information (pdi) recorded in data transferring templates
Continuous black box) with 504-1 (3 continuous black box in Fig. 5), it is parallel obtain original number that length is 5 it is believed that
The primary data information (pdi) 504 that breath 502 is 3 with length.
Optionally, the storage location of primary data information (pdi) may be discontinuous, if primary data information (pdi) length is 2, but two
The storage location of the primary data information (pdi) of a unit is not continuous.At this point, getting the original number of the 1st unit it is believed that
After breath, the primary data information (pdi) of the 2nd unit is searched according to the primary data information (pdi) of the 1st unit, and obtain the 2nd unit
Primary data information (pdi).
Optionally, after it will start the storage of primary data information (pdi) used in the second virtual machine into memory, starting
When the first virtual machine, since the first virtual machine and the second virtual machine are the identical virtual machine of type, at this point, the first virtual machine can be with
It calls directly the primary data information (pdi) being saved in memory and starts the first virtual machine, to improve the effect of the first virtual machine of starting
Rate.
It should be noted that the primary data information (pdi) of the first virtual machine of last starting can also be obtained in the present embodiment,
The storage location and data length for saving primary data information (pdi) are being again started up the first virtual machine into data transferring templates
Before, primary data information (pdi) is saved in memory according to data transferring templates, and start the first virtual machine.
It optionally, can also be to memory when starting the first virtual machine using the primary data information (pdi) in memory
Send the instruction for obtaining data.After starting the first virtual machine, the number of targets that the first virtual machine of starting uses is got
It is believed that breath.Then primary data information (pdi) and target data information are compared, and primary data information (pdi) is updated.
It optionally, can be by target data information when being updated according to target data information to primary data information (pdi)
The storage location and data length of the information different from primary data information (pdi) are written in data transferring templates.Start next time
When the first virtual machine, data are shifted to memory using updated data transferring templates, and start the first virtual machine.
Optionally, the present embodiment can also be the storage information configuration reference value in data transferring templates.Above-mentioned reference value
For indicating the accuracy of storage information.Reference value is higher, illustrates the first virtual machine on startup, corresponding using storage information
A possibility that primary data information (pdi), is higher.Reference value can be changed with each starting virtual machine, if after starting virtual machine,
Primary data information (pdi) is not used, then the corresponding reference value of storage information of primary data information (pdi) can decline.When under reference value
When dropping to a threshold value, storage information can be deleted from data transferring templates.
For example, record has two storage information in data transferring templates, first storage information and Article 2 store information
Corresponding reference value is all 100.If when starting the first virtual machine, using to first storage, information is corresponding is saved in
The primary data information (pdi) of memory, then increase the reference value of first storage information, such as increases by 20, and when the first virtual machine of starting
And the corresponding primary data information (pdi) for being saved in memory of Article 2 storage information is not used, at this point, reducing by the second storage information pair
The reference value answered, such as reduce 20.After data transferring templates are used for multiple times, the corresponding reference value of the second storage information is zero,
The second storage information is then deleted from data transferring templates, to mitigate burden when primary data information (pdi) to be transferred to memory.
It should be noted that above-mentioned reference value may include the upper limit and/or lower limit.After reaching 100 such as reference value, then no longer
It continues growing.
Below using the first virtual machine and the second virtual machine as the virtual machine instance of same type, to above-mentioned virtual machine starting side
Method is illustrated.
In the prior art, if to start a virtual machine, starting the VM process of virtual machine and started by Loop each
When program, there are a large amount of operations read disk processing, add up to read storage medium more than 1,000 times in each step, be commonly stored
Medium is common hard disc or storage system, thousands of times slow with respect to memory of time delay for reading data, as solid state hard disk access when
Prolong generally 50-100 microsecond, when server hard disc, array SAN storage-block device and Ceph distributed storage-block device access
It is even longer to prolong generally 2-30 milliseconds, and this has dragged slowly the overall startup speed of VME operating system.
The present embodiment in virtual machine starting logic, in computing module (providing virtual machine CPU, the computing resources such as memory) and
Other than memory module (data storage resource of virtual machine, such as independent disk or distributed memory system etc. are provided), machine is increased newly
Device study module.It is illustrated in conjunction with S602 to the S624 of Fig. 6.When user 602 creates the first virtual machine 604, in machine
Data transferring templates are imported in study module 608.Record has used original when starting the second virtual machine in data transferring templates
The storage information of beginning data information, storage information includes storage location and data length.Machine learning module 608 saves data and turns
Shifting formwork plate.When starting the first virtual machine 604, VM process initiation in the first virtual machine 604, VM process notifies machine by parameter
Device study module 608 loads the type of data transferring templates, and machine learning module 608 loads corresponding data migration module and obtains
Access is sent to memory module 606 according to transferring templates and by data transferring templates, and notice memory module 606 turns according to data
Storage location and memory length in shifting formwork plate, load data into memory.In addition, can also be stored in data transferring templates
When having starting virtual machine, the sequence of data is called.Due to having got the data transferring templates of all data, it is possible to
Before the starting of first virtual machine 604, just concurrently executes and read all data to memory.1,000 data are usually read one by one to ask
The time-consuming asked is single request time delay multiplied by 1,000.But the time that parallel mode executes 1,000 request consumption is single request
Time delay is multiplied by 1,000 divided by concurrency.Such as concurrency value is 100, then wastage in bulk or weight time delay is original 1/100.Data save
In the biggish storage of time delay, such as distributed memory system (single request time delay is larger, but supports to request more concurrent processing), sheet
The acceleration effect that scheme generates becomes apparent.In addition, the first virtual machine 604 is on startup, obtained from the memory of memory module 606
Access according to when, it is also necessary to machine learning module 608 send starting the first virtual machine 604 data read request.Machine learning
Target data information required for module 608 determines the first virtual machine 604 of starting according to the request received, and according to number of targets
According to information update data transferring templates.Machine learning module 608 identifies that the first virtual machine 604 reads the difference (data of data
Reading position, length, timing change, newly-increased request of data, reduce request of data), and update into data time sequence template,
New data template is formed, to be provided when the starting of next virtual machine.After the first virtual machine start completion, it can notify
Machine learning module 608 stops updating data template (being not shown in Fig. 6).
It should be noted that the step S618 and step S622 in Fig. 6 can be carried out simultaneously, or successively be carried out, successively
The sequence of progress is without limitation.
When being updated to data transferring templates, the storage information in data transferring templates can be updated.Example
Such as, information configuration reference value is stored for each in data transferring templates.As shown in Figure 7.Storing information includes initial data
Operation order, storage location, data length, action type and the reference value of information.Reference value initially can be set to 100.
When being updated to data transferring templates, if target data information used in the first virtual machine of starting is former
Do not have in beginning data information, that is, used new data, then the storage information of the data of new data is added to data and turned
In shifting formwork plate, and corresponding reference value is set.In order to avoid accidental situation, reference value can be set to 10.And if target
Data information be it is already existing in primary data information (pdi), then illustrate start the first virtual machine used in primary data information (pdi)
Data, the reference value of the storage information of the primary data information (pdi) used is increased at this time, such as increases by 1.And if original number
It is believed that comprising the data not included in target data information in breath, then illustrates to contain in primary data information (pdi) and be not used by
Information.At this point, the reference value of the corresponding storage information of the primary data information (pdi) being not used by is reduced.At this point, in order to accelerate to wash in a pan
The primary data information (pdi) being of little use is eliminated, reference value can reduce 3.When reference value is 0, the storage information that reference value is 0 is eliminated.
Such as shown in Fig. 8 and Fig. 9, Fig. 8 is data transferring templates, and hit, which refers to storage information is corresponding, to be loaded into memory
Primary data information (pdi) used when the first virtual machine starts, miss refers to the corresponding original loaded into memory of storage information
Beginning data information is not used by or there are mistakes.The 8 information some shown in Fig. 8 hit the miss having, and illustrate starting
When the first virtual machine, primary data information (pdi) some loaded into memory is used to, and some is not used by, and some there are data
Mistake.More new data transferring templates are needed at this time.As shown in figure 9, the reference value of the storage location of hit is added 1, by miss
The reference value of storage information of primary data information (pdi) subtract 1, and increase newly in primary data information (pdi) miss original number it is believed that
The storage information of breath.
The present embodiment by one virtual machine of starting up to a hundred time and can be updated data transferring templates, to obtain
Normal data transferring templates used in the virtual machine of one type of starting are got, and normal data transferring templates investment is made
With.
Through this embodiment, turned by before starting the first virtual machine, obtaining data transferring templates according to above-mentioned data
Above-mentioned storage information in shifting formwork plate, obtains above-mentioned primary data information (pdi), by the storage of above-mentioned primary data information (pdi) into memory,
When starting above-mentioned first virtual machine, the above-mentioned primary data information (pdi) in above-mentioned memory is called to start above-mentioned first virtual machine, thus
Before being again started up the first virtual machine, memory is write data into according to above-mentioned storage information in advance, to start the first virtual machine,
When to save the first virtual machine of starting, the time of data is read, improves the efficiency of the first virtual machine of starting.
As a kind of optional embodiment, above-mentioned second acquisition unit 1004 includes:
First obtains module, for obtaining a plurality of letter in the primary data information (pdi) parallel according to the storage information
Breath.
Through this embodiment, by obtaining a plurality of information of primary data information (pdi) parallel when obtaining primary data information (pdi),
The efficiency for obtaining primary data information (pdi) is improved to allow, further improves the efficiency of starting virtual machine.
As a kind of optional embodiment, above-mentioned second acquisition unit 1004 further include:
Second obtains module, for obtaining the storage position of the primary data information (pdi) stored in the data transferring templates
It sets, the data length of the primary data information (pdi), wherein the storage information includes the storage position of the primary data information (pdi)
It sets, the data length of the primary data information (pdi);
Third obtains module, for according to the storage location of the primary data information (pdi) and the number of the primary data information (pdi)
The primary data information (pdi) is obtained according to length.
Through this embodiment, by obtaining original number according to the storage location of primary data information (pdi) and data length it is believed that
Breath improves the accuracy for obtaining primary data information (pdi), further so as to accurately and efficiently get primary data information (pdi)
Improve the efficiency of starting virtual machine.
As a kind of optional embodiment, above-mentioned second acquisition module includes:
Acquisition submodule is that the data are long for since the storage location of the primary data information (pdi), obtaining length
The data of degree obtain the primary data information (pdi).
Through this embodiment, primary data information (pdi) is obtained by the above method, so as to accurately and efficiently get original
Beginning data information improves the accuracy for obtaining primary data information (pdi), further improves the efficiency of starting virtual machine.
As a kind of optional embodiment, above-mentioned apparatus further include:
Third acquiring unit, for calling the initial data in the memory when starting first virtual machine
After information starts first virtual machine, obtains and start target data information used in first virtual machine, wherein institute
Stating target data information is information required when starting first virtual machine;
Updating unit, for updating the data transferring templates according to the target data information.
Through this embodiment, by shifting mould to data according to target data information after getting target data information
Plate is updated, and so as to be trained by multiple starting virtual machine to data transferring templates, improves data transfer
The accuracy of template further improves the efficiency of starting virtual machine.
As a kind of optional embodiment, above-mentioned updating unit includes:
Memory module, for depositing data information different from the primary data information (pdi) in the target data information
Storage space is set with data length storage into the data transferring templates.
Through this embodiment, data transferring templates are updated by the above method, so as to be opened by multiple
Dynamic virtual machine is trained data transferring templates, improves the accuracy of data transferring templates, and it is empty to further improve starting
The efficiency of quasi- machine.
As a kind of optional embodiment, above-mentioned apparatus further include:
Configuration unit is used for before starting first virtual machine, described to store in the data transferring templates
Store information configuration reference value;
Unit is deleted, is used for after starting first virtual machine, the case where the reference value is less than first threshold
Under, the corresponding storage information of the reference value for being less than the first threshold is deleted from the data transferring templates.
Through this embodiment, by the way that reference value is arranged for the storage information in data transferring templates, so as to data
Storage information in transferring templates is monitored, and improves the accuracy of data transferring templates, further increases starting virtual machine
Efficiency.
As a kind of optional embodiment, above-mentioned apparatus further include:
The first adjustment unit, if when for starting first virtual machine, store the original number into memory it is believed that
Breath is used, then after starting first virtual machine, increases storage corresponding with the primary data information (pdi) used
The reference value of information;
Second adjustment unit, if when for starting first virtual machine, store the original number into memory it is believed that
Breath is not used by, then after starting first virtual machine, is reduced corresponding with the primary data information (pdi) being not used by
Store the reference value of information.
Through this embodiment, by above method tune reference value, can according to the result of starting virtual machine to reference value into
Row adjustment, improves the accuracy of data transferring templates, further increases the efficiency of starting virtual machine.
Another aspect according to an embodiment of the present invention additionally provides a kind of for implementing above-mentioned virtual machine starting method
Electronic device, as shown in figure 11, the electronic device include memory 1102 and processor 1104, are stored in the memory 1102
Computer program, the processor 1104 are arranged to execute the step in any of the above-described embodiment of the method by computer program
Suddenly.
Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network
At least one network equipment.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 obtains data transferring templates, wherein store in the data transferring templates before starting the first virtual machine
There is the storage information of primary data information (pdi), the primary data information (pdi) used information when being the second virtual machine of starting is described
Second virtual machine was activated before first virtual machine starting, and second virtual machine is and first type of virtual machine
Identical virtual machine or second virtual machine are first virtual machine;
S2 obtains the primary data information (pdi) according to the storage information in the data transferring templates;
S3, by primary data information (pdi) storage into memory;
S4 calls the primary data information (pdi) in the memory to start described the when starting first virtual machine
One virtual machine.
Optionally, it will appreciated by the skilled person that structure shown in Figure 11 is only to illustrate, electronic device can also
To be smart phone (such as Android phone, iOS mobile phone), tablet computer, palm PC and mobile internet device
The terminal devices such as (Mobile Internet Devices, MID), PAD.Figure 11 it does not make to the structure of above-mentioned electronic device
At restriction.For example, electronic device may also include than shown in Figure 11 more perhaps less component (such as network interface) or
With the configuration different from shown in Figure 11.
Wherein, memory 1102 can be used for storing software program and module, as the virtual machine in the embodiment of the present invention opens
The dynamic corresponding program instruction/module of method and apparatus, the software journey that processor 1104 is stored in memory 1102 by operation
Sequence and module realize above-mentioned virtual machine starting method thereby executing various function application and data processing.Memory
1102 may include high speed random access memory, can also include nonvolatile memory, as one or more magnetic storage device,
Flash memory or other non-volatile solid state memories.In some instances, memory 1102 can further comprise relative to processing
The remotely located memory of device 1104, these remote memories can pass through network connection to terminal.The example packet of above-mentioned network
Include but be not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.Wherein, memory 1102 specifically can be with
But it is not limited to use in the information such as storage primary data information (pdi).It as an example, as shown in figure 11, can in above-mentioned memory 1102
With but be not limited to include that first acquisition unit 1002 in above-mentioned virtual machine starter, second acquisition unit 1004, storage are single
Member 1006 and call unit 1008.In addition, it can include but other module lists for being not limited in above-mentioned virtual machine starter
Member repeats no more in this example.
Optionally, above-mentioned transmitting device 1106 is used to that data to be received or sent via a network.Above-mentioned network
Specific example may include cable network and wireless network.In an example, transmitting device 1106 includes a network adapter
(Network Interface Controller, NIC), can be connected by cable with other network equipments with router to
It can be communicated with internet or local area network.In an example, transmitting device 1106 be radio frequency (Radio Frequency,
RF) module is used to wirelessly be communicated with internet.
In addition, above-mentioned electronic device further include: display 1108, the picture of the first virtual machine for showing above-mentioned starting
Face;With connection bus 1110, for connecting the modules component in above-mentioned electronic device.
The another aspect of embodiment according to the present invention, additionally provides a kind of storage medium, is stored in the storage medium
Computer program, wherein the computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1 obtains data transferring templates, wherein store in the data transferring templates before starting the first virtual machine
There is the storage information of primary data information (pdi), the primary data information (pdi) used information when being the second virtual machine of starting is described
Second virtual machine was activated before first virtual machine starting, and second virtual machine is and first type of virtual machine
Identical virtual machine or second virtual machine are first virtual machine;
S2 obtains the primary data information (pdi) according to the storage information in the data transferring templates;
S3, by primary data information (pdi) storage into memory;
S4 calls the primary data information (pdi) in the memory to start described the when starting first virtual machine
One virtual machine.
Optionally, in the present embodiment, those of ordinary skill in the art will appreciate that in the various methods of above-described embodiment
All or part of the steps be that the relevant hardware of terminal device can be instructed to complete by program, the program can store in
In one computer readable storage medium, storage medium may include: flash disk, read-only memory (Read-Only Memory,
ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
When selling or using, it can store in above-mentioned computer-readable storage medium.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one
Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention
State all or part of the steps of method.
In the above embodiment of the invention, it all emphasizes particularly on different fields to the description of each embodiment, does not have in some embodiment
The part of detailed description, reference can be made to the related descriptions of other embodiments.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, such as the division of the unit, and only one
Kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING or communication link of unit or module
It connects, can be electrical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list
Member both can take the form of hardware realization, can also realize in the form of software functional units.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (15)
1. a kind of virtual machine starts method characterized by comprising
Before starting the first virtual machine, data transferring templates are obtained, wherein be stored with original number in the data transferring templates
It is believed that the storage information of breath, the primary data information (pdi) used information when being the second virtual machine of starting, described second is virtual
Machine was activated before first virtual machine starting, and second virtual machine is void identical with first type of virtual machine
Quasi- machine or second virtual machine are first virtual machine;
According to the storage information in the data transferring templates, the primary data information (pdi) is obtained;
By primary data information (pdi) storage into memory;
When starting first virtual machine, the primary data information (pdi) in the memory is called to start described first virtual
Machine.
2. the method according to claim 1, wherein being believed according to the storage in the data transferring templates
Breath, obtaining the primary data information (pdi) includes:
According to the storage information, a plurality of information in the primary data information (pdi) is obtained parallel.
3. the method according to claim 1, wherein the storage according in the data transferring templates
Information, obtaining the primary data information (pdi) includes:
Obtain the storage location of the primary data information (pdi) stored in the data transferring templates, the primary data information (pdi)
Data length, wherein the storage information includes the number of the storage location of the primary data information (pdi), the primary data information (pdi)
According to length;
The original number is obtained according to the data length of the storage location of the primary data information (pdi) and the primary data information (pdi)
It is believed that breath.
4. according to the method described in claim 3, it is characterized in that, the storage location according to the primary data information (pdi) with
The data length of the primary data information (pdi) obtains the primary data information (pdi)
Since the storage location of the primary data information (pdi), the data that length is the data length are obtained, the original is obtained
Beginning data information.
5. the method according to claim 1, wherein calling the memory when starting first virtual machine
In the primary data information (pdi) start first virtual machine after, further includes:
It obtains and starts target data information used in first virtual machine, wherein the target data information is starting institute
State information required when the first virtual machine;
The data transferring templates are updated according to the target data information.
6. according to the method described in claim 5, it is characterized in that, described update the data according to the target data information
Transferring templates include:
By the storage location and data length of data information different from the primary data information (pdi) in the target data information
It stores in the data transferring templates.
7. the method according to claim 1, wherein
Before starting first virtual machine, further includes: the storage information to store in the data transferring templates is matched
Set reference value;
After starting first virtual machine, further includes: in the case where the reference value is less than first threshold, institute will be less than
The corresponding storage information of the reference value for stating first threshold is deleted from the data transferring templates.
8. the method according to the description of claim 7 is characterized in that after starting first virtual machine, further includes:
When starting first virtual machine, in the case where storing the primary data information (pdi) into memory by use, increase
Add the reference value of storage information corresponding with the primary data information (pdi) used;
When starting first virtual machine, in the case where the primary data information (pdi) stored into memory is not used by,
Reduce the reference value of storage information corresponding with the primary data information (pdi) being not used by.
9. a kind of virtual machine starter characterized by comprising
First acquisition unit, for obtaining data transferring templates before starting the first virtual machine, wherein the data transfer
The storage information of primary data information (pdi) is stored in template, the primary data information (pdi) is used when being the second virtual machine of starting
Information, second virtual machine were activated before first virtual machine starting, and second virtual machine is and described first
The identical virtual machine of type of virtual machine or second virtual machine are first virtual machine;
Second acquisition unit, for obtaining the original number according to the storage information in the data transferring templates it is believed that
Breath;
Storage unit, for storing the primary data information (pdi) into memory;
Call unit, for calling the primary data information (pdi) in the memory to start when starting first virtual machine
First virtual machine.
10. device according to claim 9, which is characterized in that the second acquisition unit includes:
Second obtain module, for obtain the primary data information (pdi) stored in the data transferring templates storage location,
The data length of the primary data information (pdi), wherein the storage information includes the storage location of the primary data information (pdi), institute
State the data length of primary data information (pdi);
Third obtains module, for long according to the storage location of the primary data information (pdi) and the data of the primary data information (pdi)
Degree obtains the primary data information (pdi).
11. device according to claim 10, which is characterized in that described second, which obtains module, includes:
Acquisition submodule is the data length for since the storage location of the primary data information (pdi), obtaining length
Data obtain the primary data information (pdi).
12. device according to claim 9, which is characterized in that described device further include:
Third acquiring unit, for calling the primary data information (pdi) in the memory when starting first virtual machine
After starting first virtual machine, obtains and start target data information used in first virtual machine, wherein the mesh
Mark data information is information required when starting first virtual machine;
Updating unit, for updating the data transferring templates according to the target data information.
13. device according to claim 12, which is characterized in that the updating unit includes:
Memory module, for by the storage position of data information different from the primary data information (pdi) in the target data information
It sets with data length storage into the data transferring templates.
14. a kind of storage medium, the storage medium is stored with computer program, which is characterized in that the computer program fortune
Method described in any one of claim 1 to 8 is executed when row.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to execute side described in any one of claim 1 to 8 by the computer program
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910356688.XA CN110147266B (en) | 2019-04-29 | 2019-04-29 | Virtual machine starting method and device, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910356688.XA CN110147266B (en) | 2019-04-29 | 2019-04-29 | Virtual machine starting method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110147266A true CN110147266A (en) | 2019-08-20 |
CN110147266B CN110147266B (en) | 2024-03-15 |
Family
ID=67593904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910356688.XA Active CN110147266B (en) | 2019-04-29 | 2019-04-29 | Virtual machine starting method and device, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110147266B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008033392A (en) * | 2006-07-26 | 2008-02-14 | Nec Corp | Virtual computer system and operation method thereof |
US20130232303A1 (en) * | 2010-11-12 | 2013-09-05 | Alibaba Group Holding Limited | Method and Apparatus of Accessing Data of Virtual Machine |
CN104281486A (en) * | 2014-09-26 | 2015-01-14 | 华为技术有限公司 | Processing method and device of VM (virtual machine) |
CN106339254A (en) * | 2015-07-15 | 2017-01-18 | 中兴通讯股份有限公司 | Quick starting method and device, and management node for virtual machine |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
US20170249180A1 (en) * | 2016-02-25 | 2017-08-31 | Huawei Technologies Co., Ltd. | Virtual Machine Start Method and Apparatus |
US20180232175A1 (en) * | 2016-07-12 | 2018-08-16 | Tecent Technology (Shenzhen) Company Limited | Virtual machine hot migration method, host and storage medium |
CN109491757A (en) * | 2018-10-11 | 2019-03-19 | 广东微云科技股份有限公司 | The Acceleration of starting method of local computing mode virtual machine |
-
2019
- 2019-04-29 CN CN201910356688.XA patent/CN110147266B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008033392A (en) * | 2006-07-26 | 2008-02-14 | Nec Corp | Virtual computer system and operation method thereof |
US20130232303A1 (en) * | 2010-11-12 | 2013-09-05 | Alibaba Group Holding Limited | Method and Apparatus of Accessing Data of Virtual Machine |
CN104281486A (en) * | 2014-09-26 | 2015-01-14 | 华为技术有限公司 | Processing method and device of VM (virtual machine) |
CN106339254A (en) * | 2015-07-15 | 2017-01-18 | 中兴通讯股份有限公司 | Quick starting method and device, and management node for virtual machine |
US20170249180A1 (en) * | 2016-02-25 | 2017-08-31 | Huawei Technologies Co., Ltd. | Virtual Machine Start Method and Apparatus |
US20180232175A1 (en) * | 2016-07-12 | 2018-08-16 | Tecent Technology (Shenzhen) Company Limited | Virtual machine hot migration method, host and storage medium |
CN106598653A (en) * | 2016-11-24 | 2017-04-26 | 合肥中科云巢科技有限公司 | Method and device used for solving boot storm of virtual machine |
CN109491757A (en) * | 2018-10-11 | 2019-03-19 | 广东微云科技股份有限公司 | The Acceleration of starting method of local computing mode virtual machine |
Also Published As
Publication number | Publication date |
---|---|
CN110147266B (en) | 2024-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113641457B (en) | Container creation method, device, apparatus, medium, and program product | |
CN109144679A (en) | Processing method, device and the virtual equipment of interrupt requests | |
CN105468450B (en) | Method for scheduling task and system | |
CN109597818A (en) | Data-updating method, device, storage medium and equipment | |
CN108388599A (en) | Electronic device, Data Migration and call method and storage medium | |
CN104978261B (en) | The test method of application program, apparatus and system | |
CN104618155B (en) | A kind of virtual machine fault-tolerant method, apparatus and system | |
US20200219028A1 (en) | Systems, methods, and media for distributing database queries across a metered virtual network | |
CN108924187A (en) | Task processing method, device and terminal device based on machine learning | |
CN103701653B (en) | The processing method of a kind of interface hot plug configuration data and network configuration server | |
CN107169513A (en) | Control data uses the distributed machines learning system and its method of order | |
WO2024119823A1 (en) | Gpu computing resource management method and apparatus, electronic device and readable storage medium | |
CN115033352A (en) | Task scheduling method, device and equipment for multi-core processor and storage medium | |
CN107562851A (en) | A kind of update method of data, device and electronic equipment | |
CN113269488A (en) | Storage state information synchronization method and device of intelligent cabinet | |
CN112181748A (en) | Concurrent test method, device, equipment and storage medium based on ring queue | |
CN111352896A (en) | Artificial intelligence accelerator, equipment, chip and data processing method | |
CN110147266A (en) | Virtual machine starts method and apparatus, storage medium and electronic device | |
CN116089477B (en) | Distributed training method and system | |
CN101833585A (en) | Database server operation control system, method and device | |
CN103136043B (en) | The moving method of a kind of asynchronous IO, System and Network node | |
CN110321204A (en) | Computing system, hardware accelerator management method and device and storage medium | |
CN108287761A (en) | Method for recovering internal storage and device, terminal device and computer readable storage medium | |
CN115809126A (en) | Job scheduling method and device in mixed deployment scene and electronic equipment | |
CN106648895A (en) | Data processing method and device, and terminal |
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 |