CN103927215B - Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks - Google Patents

Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks Download PDF

Info

Publication number
CN103927215B
CN103927215B CN201310690970.4A CN201310690970A CN103927215B CN 103927215 B CN103927215 B CN 103927215B CN 201310690970 A CN201310690970 A CN 201310690970A CN 103927215 B CN103927215 B CN 103927215B
Authority
CN
China
Prior art keywords
increment
shm
dev
catalogues
hard disks
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.)
Active
Application number
CN201310690970.4A
Other languages
Chinese (zh)
Other versions
CN103927215A (en
Inventor
马建伟
王维
张栗伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Antiy Technology Group Co Ltd
Original Assignee
Harbin Antiy Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Antiy Technology Co Ltd filed Critical Harbin Antiy Technology Co Ltd
Priority to CN201310690970.4A priority Critical patent/CN103927215B/en
Publication of CN103927215A publication Critical patent/CN103927215A/en
Application granted granted Critical
Publication of CN103927215B publication Critical patent/CN103927215B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses the optimization method based on ram disk and the kvm scheduling virtual machines of SSD hard disks and system, first, foundation image, installation operation system are generated, and configure system environments;Judge in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, if, then by under foundation image storage to/dev/shm catalogues, and increment mirror image is generated based on foundation image, by under increment mirrored storage to/dev/shm catalogues, otherwise by foundation image storage into SSD hard disks, and increment mirror image is generated based on foundation image, by increment mirrored storage into SSD hard disks.Method and system of the present invention, the advantage for making full use of ram disk IO read or write speeds fast, and the utilization of SSD disks is combined, optimize the scheduling of kvm virtual machines.

Description

Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks
Technical field
The present invention relates to technical field of virtualization, more particularly to based on ram disk and the kvm scheduling virtual machines of SSD hard disks Optimization method and system.
Background technology
With the fast development of virtualization, virtual machine plays vital effect as key factor therein, each Secondary node is calculated, and is all the quick calculating by many virtual machines and output result, most at last result output to user.Virtually Change has been that one kind of current cloud computing is widely used, and supports the product of virtualization to have much at present, such as Virtual Pc, How VmWare, VirtualBox, Kvm etc., efficiently use virtualization product, realizes the maximum using then of each dummy node It is particularly important.
For the use of virtualization, it is desirable to improve utilization ratio, it is necessary to which large-scale concurrent is disposed, and at this point for virtual machine Scheduling use, it appears very crucial, the disk read-write of virtual machine is all a bottleneck of virtualization all the time, most at present The use of virtualization product is all based on the read-write of ordinary magnetic disc, and speed is not very high.Now universal improvement way is by void The mirrored storage of plan machine is in disk or SSD solid state hard disc, but the reading speed of disk is far below internal memory IO read-write, It is still not high that it reads and writes speed.
The content of the invention
For above-mentioned technical problem, the invention provides the optimization based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks Method and system, this method realizes a kind of new virtual machine mirror by using storage medium of the ram disk as image file As using model, virtual machine reading speed is substantially increased.
The present invention adopts with the following method to realize:Optimization side based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks Method, including:
Foundation image, installation operation system are generated, and configures system environments;
Judge in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, if so, then by basis Mirrored storage generates increment mirror image to under/dev/shm catalogues based on foundation image, by increment mirrored storage to/dev/shm Under catalogue, otherwise by foundation image storage into SSD hard disks, and increment mirror image is generated based on foundation image, increment mirror image is deposited Store up in SSD hard disks;The preset value is to be set according to experience or the size of foundation image;
Run the virtual machine based on increment mirror image;
The snapshot document produced during virtual machine operation is preserved, and by snapshot document storage into SSD hard disks.
Wherein, foundation image is backing file, also referred to as base-image.
Further, it is described to be under increment mirrored storage to/dev/shm catalogues:Judge described/dev/shm catalogues Whether remaining space stores increment mirror image enough, if so, then by under increment mirrored storage to/dev/shm catalogues, otherwise by increment Mirrored storage is into SSD hard disks.
Wherein, increment mirror image is much smaller for foundation image, so can not before storage increment mirror image The remaining space gone in judgement/dev/shm, but as the method more optimized, by increment mirrored storage to/dev/shm Before, it should judge whether its remaining space is enough.
The present invention is realized using following system:Optimization system based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks System, including:
Foundation image generation module, for generating foundation image, installation operation system, and configures system environments;
Determination module, for judging in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, If so, then by under foundation image storage to/dev/shm catalogues, and increment mirror image is generated based on foundation image, increment mirror image is deposited Store up/dev/shm catalogues under, otherwise by foundation image storage into SSD hard disks, and based on foundation image generate increment mirror image, By increment mirrored storage into SSD hard disks;
Performing module, for running the virtual machine based on increment mirror image, preserves the snapshot text produced during virtual machine operation Part, and by snapshot document storage into SSD hard disks.
Wherein, foundation image is backing file, also referred to as base-image.
Further, it is described to be under increment mirrored storage to/dev/shm catalogues:Judge described/dev/shm catalogues Whether remaining space stores increment mirror image enough, if so, then by under increment mirrored storage to/dev/shm catalogues, otherwise by increment Mirrored storage is into SSD hard disks.
Wherein, increment mirror image is much smaller for foundation image, so can not before storage increment mirror image The remaining space gone in judgement/dev/shm, but as the method more optimized, by increment mirrored storage to/dev/shm Before, it should judge whether its remaining space is enough.
In summary, the invention provides the optimization method based on ram disk and the kvm scheduling virtual machines of SSD hard disks and it is System, if check tmpfs systems /remaining spaces of dev/shm catalogues is sufficiently large, the foundation image of generation is stored in/ Under dev/shm catalogues, and by the increment mirror image generated based on the foundation image also as far as possible be stored in/dev/shm catalogues under, such as The remaining space of fruit tmpfs systems is not enough, by foundation image and increment mirrored storage under SSD disks.So as in making full use of The fast advantage of read or write speed of depositing, improves the opening speed and resume speed of virtual machine, optimizes virtualization scheduling process.
Brief description of the drawings
In order to illustrate more clearly of technical scheme, letter will be made to the required accompanying drawing used in embodiment below Singly introduce, it should be apparent that, drawings in the following description are only some embodiments described in the present invention, for this area For those of ordinary skill, on the premise of not paying creative work, other accompanying drawings can also be obtained according to these accompanying drawings.
The optimization method flow chart based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks that Fig. 1 provides for the present invention;
The optimization system construction drawing based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks that Fig. 2 provides for the present invention.
Embodiment
The present invention gives the optimization method based on ram disk and the kvm scheduling virtual machines of SSD hard disks and system, in order that Those skilled in the art more fully understand the technical scheme in the embodiment of the present invention, and make the above-mentioned purpose of the present invention, feature Can be more obvious understandable with advantage, technical scheme in the present invention is described in further detail below in conjunction with the accompanying drawings:
Present invention firstly provides the optimization method based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks, such as Fig. 1 institutes Show, including:
S101 generates foundation image, installation operation system, and configures system environments;
For example, generating foundation image by qemu-img orders, form is qcow2, and size is 16G, then passes through iso mirrors As file, installation operation system configures the system environments of foundation image;
S102 judged in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, if so, then holding Row S103, otherwise performs S104;
S103 generates increment mirror image by under foundation image storage to/dev/shm catalogues based on foundation image, by increment Mirrored storage continues executing with S105 to under/dev/shm catalogues;Take full advantage of the quick IO literacies of ram disk so that Virtual machine can be opened quickly;
S104 stores foundation image into SSD hard disks, and generates increment mirror image based on foundation image, and increment mirror image is deposited Store up in SSD hard disks, and continue executing with S105;
If tmpfs file system /remaining spaces of dev/shm catalogues is not enough, will foundation image or increment mirror image Be copied to/dev/shm catalogues under, then may cause the loss of image file data;
S105 runs the virtual machine based on increment mirror image;
S106 preserves the snapshot document produced during virtual machine operation, and by snapshot document storage into SSD hard disks.
Open after virtual machine, run certain time, preserve the snapshot document of virtual machine, because snapshot document is all larger, So being saved in SSD disks, the utilization rate of SSD disks is improved.
Preferably, it is described can with the following method to be replaced under increment mirrored storage to/dev/shm catalogues:Described in judging/ Whether the remaining space of dev/shm catalogues stores increment mirror image enough, if so, then by increment mirrored storage to/dev/shm catalogues Under, otherwise by increment mirrored storage into SSD hard disks.
If the remaining space of/dev/shm catalogues is sufficient, based on foundation image, increment is created by qemu-img orders Mirror image, and by increment mirrored storage to tmpfs file system /dev/shm catalogues under, take full advantage of the High-speed I/O of ram disk Literacy, and the less advantage of increment mirror image, can quickly open the virtual machine of increment mirror image.
Present invention also offers the optimization system based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks, as shown in Fig. 2 Including:
Foundation image generation module 201, for generating foundation image, installation operation system, and configures system environments;
Determination module 202, for judging in tmpfs file system/that whether the remaining spaces of dev/shm catalogues is more than is default Value, if so, then by under foundation image storage to/dev/shm catalogues, and increment mirror image is generated based on foundation image, by increment mirror As under storage to/dev/shm catalogues, otherwise by foundation image storage into SSD hard disks, and increment mirror is generated based on foundation image Picture, by increment mirrored storage into SSD hard disks;
Performing module 203, for running the virtual machine based on increment mirror image, preserves the snapshot produced during virtual machine operation File, and by snapshot document storage into SSD hard disks.
Preferably, it is described to be under increment mirrored storage to/dev/shm catalogues:Judge the surplus of described/dev/shm catalogues Whether complementary space stores increment mirror image enough, if so, then by under increment mirrored storage to/dev/shm catalogues, otherwise by increment mirror As storage is into SSD hard disks
As described above, The present invention gives the optimization method based on ram disk and the kvm scheduling virtual machines of SSD hard disks and being The specific embodiment of system, the difference of itself and conventional method is that most virtualization products is all based on ordinary magnetic disc at present Read-write, speed is not very high, there is also the situation that virtual machine image is stored in disk or SSD solid state hard discs, but is read Speed is not still high.Method and system given by the present invention is by for tmpfs file system/dev/shm catalogues The judgement of remaining space, in the case that remaining space is sufficient, as far as possible by under image file storage to/dev/shm catalogues, so that Using the literacy of ram disk high speed, the scheduling of virtual machine is optimized, the opening speed and resume speed of virtual machine is improved.
Above example is used to illustrative and not limiting technical scheme.Appointing for spirit and scope of the invention is not departed from What modification or local replacement, all should cover among scope of the presently claimed invention.

Claims (4)

1. the optimization method based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks, it is characterised in that including:
Foundation image, installation operation system are generated, and configures system environments;
Judge in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, if so, then by foundation image Store/dev/shm catalogues under, and based on foundation image generate increment mirror image, by increment mirrored storage to/dev/shm catalogues Under, otherwise by foundation image storage into SSD hard disks, and increment mirror image is generated based on foundation image, increment mirrored storage is arrived In SSD hard disks;
Run the virtual machine based on increment mirror image;
The snapshot document produced during virtual machine operation is preserved, and by snapshot document storage into SSD hard disks.
2. the method as described in claim 1, it is characterised in that described to be under increment mirrored storage to/dev/shm catalogues: Judge whether the remaining space of described/dev/shm catalogues stores increment mirror image enough, if so, then by increment mirrored storage to/ Under dev/shm catalogues, otherwise by increment mirrored storage into SSD hard disks.
3. the optimization system based on ram disk Yu the kvm scheduling virtual machines of SSD hard disks, it is characterised in that including:
Foundation image generation module, for generating foundation image, installation operation system, and configures system environments;
Determination module, for judging in tmpfs file system/whether the remaining spaces of dev/shm catalogues be more than preset value, if It is then by under foundation image storage to/dev/shm catalogues, and increment mirror image to be generated based on foundation image, by increment mirrored storage Under to/dev/shm catalogues, otherwise by foundation image storage into SSD hard disks, and increment mirror image is generated based on foundation image, will Increment mirrored storage is into SSD hard disks;
Performing module, for running the virtual machine based on increment mirror image, preserves the snapshot document produced during virtual machine operation, and By snapshot document storage into SSD hard disks.
4. system as claimed in claim 3, it is characterised in that described to be under increment mirrored storage to/dev/shm catalogues: Judge whether the remaining space of described/dev/shm catalogues stores increment mirror image enough, if so, then by increment mirrored storage to/ Under dev/shm catalogues, otherwise by increment mirrored storage into SSD hard disks.
CN201310690970.4A 2013-12-17 2013-12-17 Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks Active CN103927215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310690970.4A CN103927215B (en) 2013-12-17 2013-12-17 Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310690970.4A CN103927215B (en) 2013-12-17 2013-12-17 Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks

Publications (2)

Publication Number Publication Date
CN103927215A CN103927215A (en) 2014-07-16
CN103927215B true CN103927215B (en) 2017-09-01

Family

ID=51145444

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310690970.4A Active CN103927215B (en) 2013-12-17 2013-12-17 Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks

Country Status (1)

Country Link
CN (1) CN103927215B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105487898A (en) * 2015-11-27 2016-04-13 国云科技股份有限公司 Method for improving batch power-on/power off speed of virtual machines
CN106325944A (en) * 2016-08-26 2017-01-11 浪潮电子信息产业股份有限公司 Method for using KVM (Keyboard Video Mouse) to mount and install system
CN107608760A (en) * 2017-09-14 2018-01-19 郑州云海信息技术有限公司 A kind of kvm virtual machine deployment methods, system and computer-readable recording medium
CN108319524A (en) * 2018-02-02 2018-07-24 郑州云海信息技术有限公司 A kind of method and device that baseboard management controller passes through KVM carry files
CN111104129B (en) * 2019-12-11 2023-02-28 秒针信息技术有限公司 Memory operating system manufacturing method and device, electronic equipment and storage medium
CN113127430B (en) * 2019-12-30 2024-05-03 北京懿医云科技有限公司 Mirror image information processing method, mirror image information processing device, computer readable medium and electronic equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399783A (en) * 2013-08-07 2013-11-20 曙光信息产业(北京)有限公司 Storage method and device of mirror image documents of virtual machines

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2733617A4 (en) * 2012-06-30 2014-10-08 Huawei Tech Co Ltd Data buffer device, data storage system and method
CN103019804B (en) * 2012-12-28 2016-05-11 中国人民解放军国防科学技术大学 The virtualized VPS quick migration method of OpenVZ
CN103176832B (en) * 2013-02-07 2016-04-27 宝龙计算机系统(湖南)有限公司 One kind UNIX operating system runs method and the device of virtual opetrating system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103399783A (en) * 2013-08-07 2013-11-20 曙光信息产业(北京)有限公司 Storage method and device of mirror image documents of virtual machines

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
使用qmeu-img创建虚拟机(创建虚拟机,虚拟机快照);佚名;《http://blog.csdn.net/gtt116/article/details/7742257/》;20120712;第1-6页 *

Also Published As

Publication number Publication date
CN103927215A (en) 2014-07-16

Similar Documents

Publication Publication Date Title
CN103927215B (en) Optimization method and system based on ram disk and the kvm scheduling virtual machines of SSD hard disks
CN102629258B (en) Repeating data deleting method and device
CN105022656B (en) virtual machine snapshot management method and device
CN104111897A (en) Data processing method, data processing device and computer system
CN102841759A (en) Memory system for ultra-large virtual machine cluster
CN102810050A (en) Log data writing method and log system
CN104407933A (en) Data backup method and device
CN104572248B (en) The method of virtual machine dynamical save snapshot
CN102521114B (en) File system log storage system under virtualization environment
CN103838676B (en) Data-storage system, date storage method and PCM bridges
CN110941395B (en) Dynamic random access memory, memory management method, system and storage medium
CN103713941B (en) Virtual machine image cloning process and system based on qcow2 forms
CN108509355A (en) A kind of method and apparatus of SLC Cache for SSD
CN106709025A (en) Method and device for updating aggregation objects
CN104199784A (en) Data migration method and device based on hierarchical storage
CN104040512A (en) Method and device for processing storage space and non-volatile computer readable storage medium
CN106681659A (en) Data compression method and device
CN109144419A (en) A kind of solid state hard disk memory read-write method and system
CN102486751A (en) Method for realizing virtual big page through small page NANDFLASH on micro memory system
CN104808953A (en) Device and method for controlling data storage and mobile terminal
CN104102552A (en) Message processing method and device
CN105589912B (en) A kind of method and storage organization using MRAM processing frequency written document
CN108932112A (en) A kind of data read-write method of solid granulates, device, equipment and medium
CN109766179A (en) A kind of video memory distribution method and device
CN104699414B (en) A kind of data read-write method and storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: 150010 Heilongjiang science and technology innovation city, Harbin new and high tech Industrial Development Zone, No. 7 building, innovation and entrepreneurship Plaza, 838

Patentee after: Harbin antiy Technology Group Limited by Share Ltd

Address before: 150090 room 506, Hongqi Street, Nangang District, Harbin Development Zone, Heilongjiang, China, 162

Patentee before: Harbin Antiy Technology Co., Ltd.

CP03 Change of name, title or address
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: kvm virtual machine scheduling optimization method and system based on memory disk and SSD disk

Effective date of registration: 20190718

Granted publication date: 20170901

Pledgee: Bank of Longjiang, Limited by Share Ltd, Harbin Limin branch

Pledgor: Harbin antiy Technology Group Limited by Share Ltd

Registration number: 2019230000007

CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 150010 Heilongjiang science and technology innovation city, Harbin new and high tech Industrial Development Zone, No. 7 building, innovation and entrepreneurship Plaza, 838

Patentee after: Antan Technology Group Co.,Ltd.

Address before: 150010 Heilongjiang science and technology innovation city, Harbin new and high tech Industrial Development Zone, No. 7 building, innovation and entrepreneurship Plaza, 838

Patentee before: Harbin Antian Science and Technology Group Co.,Ltd.

PC01 Cancellation of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20211119

Granted publication date: 20170901

Pledgee: Bank of Longjiang Limited by Share Ltd. Harbin Limin branch

Pledgor: Harbin Antian Science and Technology Group Co.,Ltd.

Registration number: 2019230000007