[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN102222014A - Dynamic memory management system based on memory hot plug for virtual machine - Google Patents

Dynamic memory management system based on memory hot plug for virtual machine Download PDF

Info

Publication number
CN102222014A
CN102222014A CN2011101626150A CN201110162615A CN102222014A CN 102222014 A CN102222014 A CN 102222014A CN 2011101626150 A CN2011101626150 A CN 2011101626150A CN 201110162615 A CN201110162615 A CN 201110162615A CN 102222014 A CN102222014 A CN 102222014A
Authority
CN
China
Prior art keywords
memory
virtual machine
internal memory
desired value
machine
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101626150A
Other languages
Chinese (zh)
Other versions
CN102222014B (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.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
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 Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN 201110162615 priority Critical patent/CN102222014B/en
Publication of CN102222014A publication Critical patent/CN102222014A/en
Application granted granted Critical
Publication of CN102222014B publication Critical patent/CN102222014B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention discloses a dynamic memory management system based on memory hot plug for a virtual machine, comprising a memory monitoring module, a memory distributing module and a memory hot plug module. The memory hot plug module adopts Linux memory hot plug mechanism to realize memory hot plug on a semi-virtual Linux virtual machine, thereby breaking through the initial memory toplimit of the virtual machine and efficiently improving the memory expandability of the virtual machine by increasing and reducing the memory randomly. On one hand, the memory distributing module dynamically predicts the memory requirement of the virtual machine and balances the memory pressure of each virtual machine, thereby being capable of satisfying the memory requirement of the virtual machine and also improving the memory utilization ratio of a physical machine; on the other hand, the memory distributing module can establish a new virtual machine by reasonably reducing the memory of the existing virtual machine when the memory of the physical machine is not enough, thereby realizing memory overuse and improving the memory utilization ratio of the physical machine.

Description

Virtual machine dynamic EMS memory management system based on the internal memory hot plug
Technical field
The invention belongs to computer application field, relate to the memory management of Xen half virtual virtual machine, be specially the dynamic EMS memory management system under a kind of multi-dummy machine environment.
Background technology
The resource extent of current computing system is constantly expanded, and processing power strengthens fast, and the resource kind becomes increasingly abundant, and application demand is versatile and flexible.Intel Virtualization Technology can the multiple computational resource of dynamic organization, realizes the scalable computing system framework of transparence, thereby makes up the computing environment that satisfies multiple application demand flexibly, improves the service efficiency of computational resource.Various virtualization solution continues to bring out, and virtualization software Xen is undoubtedly outstanding person wherein.Xen is the virtual machine project of increasing income that Cambridge University initiates, and its performance is near the performance of single-set operation system.Because its superior performance and increasing income property, thus extensively good by industry, be considered to one of the most promising virtualization solution in future.It is the critical function of Xen virutal machine memory management that balloon drives, and is used for adjusting the memory size of virtual machine.But balloon drives and to have defective, and the physical address space such as can not EVM(extended virtual machine) causes the virutal machine memory size to have the upper limit; The driving of frequent use balloon can cause physical address space discontinuous, produces memory fragmentation.The internal memory hot plug is an important technology of operating system memory management, can effectively improve the shortcoming that balloon drives, but also be unrealized on the Xen virtual machine.
Generally speaking, many virtual machines of operation use static memory to distribute on the separate unit physical machine, be that the memory size of virtual machine is constant all the time or by the administrator hand adjustment, when the virtual machine load variations, the low excessively situation of low memory or memory usage may occur.Therefore need a kind of dynamic memory management scheme, adjust the memory size of virtual machine automatically, satisfy the memory requirements of virtual machine and make full use of the physical machine internal memory according to the variation of each virtual machine load.
Summary of the invention
The object of the present invention is to provide a kind of virtual machine dynamic EMS memory management system based on the internal memory hot plug, this system can break the internal memory upper limit of virtual machine, increases or reduce virtual machine arbitrarily; Can adjust the memory size of each virtual machine dynamically according to the variation of virtual machine load, satisfy the memory requirements of virtual machine and improve the memory usage of physical machine; When the physical machine low memory, by rationally reducing the internal memory of existing virtual machine, the virtual machine that dynamic creation is new.
Virtual machine dynamic EMS memory management system based on the internal memory hot plug comprises
The internal memory monitoring module is used to obtain the memory information of each virtual machine;
Memory allocating module is used for carrying out Dram distribution and dynmaic establishing virtual machine according to the memory information of each virtual machine;
The internal memory hot plug module is used for the internal memory of virtual machine is adjusted to the internal memory desired value that memory allocating module calculates;
Described Dram distribution is carried out in the following manner:
(11) calculate the memory increase Δ M of each virtual machine l=M Used(n) l-M Used(n-1) lWith exchange partition increment Delta S l=S (n) l-S (n-1) l, M wherein Used(n) lAnd M Used(n-1) lBe respectively the use internal memory of l virtual machine, S (n) at n and n-1 time point lAnd S (n-1) lBe respectively the use exchange partition of l virtual machine at n and n-1 time point, l=1 ..., L, L are the virtual machine sum;
(12) predict the use internal memory M that the next time point of each virtual machine needs Predict(n+1) l=M Used(n) l+ Δ M l+ Δ S l
(13) the average memory usage of n+1 time point of calculating U avg ( n + 1 ) = Σ i = 1 L M predict ( n + 1 ) l / Σ l = 1 L M total ( n ) l , ;
(14) calculate the internal memory desired value M of each virtual machine at n+1 time point Target(n+1) l=M Predict(n+1) l/ U Avg(n+1);
(15) the invoke memory hot plug module is adjusted the internal memory of each virtual machine to desired value M Target(n+1) l
(16) sleep T second, return step (11) then;
Described dynmaic establishing virtual machine carries out in the following manner:
(21) if the internal memory that the free memory of physical machine is set more than or equal to new virtual machine is then directly created new virtual machine, finish; Otherwise, enter step (22);
(22) calculate the existing current average memory usage U of virtual machine Avg=∑ M Used/ (∑ M Total-M New+ M Free), wherein, ∑ M UsedBe the existing current use internal memory summation of virtual machine, ∑ M TotalBe the internal memory sum of existing virtual machine, M NewBe the internal memory that new virtual machine is set, M FreeBe the current free memory of physical machine;
(23) calculate the internal memory desired value M of each existing virtual machine Targetl=M Usedl/ U Avg, M UsedlBe l the current use internal memory of existing virtual machine;
(24) the invoke memory hot plug module is created new virtual machine after the internal memory of each existing virtual machine is adjusted to the internal memory desired value that step (23) obtains.
Further, described internal memory hot plug module is adjusted virutal machine memory in the following manner:
(31) the internal memory desired value of virtual machine and the current internal memory of virtual machine are compared, if greater than, step (32) entered; If less than, enter step (34); If equal, then finish;
(32) if the physical address space of virtual machine less than the internal memory desired value of virtual machine, then expand its physical address space to more than or equal to the internal memory desired value, remember that the memory pages in the new physics address space of expanding is an off-line page, enter step (33), otherwise, directly enter step (33);
(33) increase virutal machine memory to the internal memory desired value:
(331) if the internal memory desired value of virtual machine greater than current internal memory, is then calculated the difference DELTA of virutal machine memory desired value and current internal memory 1, enter step (332), otherwise, finish;
(332) if there is the reservation page, then is one and keeps page storage allocation, remember that this reservation page is a free Page, return step (331); Otherwise, enter step (333);
(333) if Δ 1Greater than 128M and there is the off-line application heap, then be an off-line application heap storage allocation, remember that this off-line application heap is the free memory section, return step (331), otherwise, enter step (334);
(335) according to the address sequencing one by one to the off-line page storage allocation up to the internal memory that is assigned with equal Δ 1, the off-line page that note is assigned with internal memory is a free Page;
(34) reduce virutal machine memory to the internal memory desired value:
(341) if the internal memory desired value of virtual machine less than current internal memory, is then calculated the difference DELTA of current internal memory and virutal machine memory desired value 2, enter step (342), otherwise, finish;
(342) if Δ 2More than or equal to 128M, then enter step (343), otherwise, enter step (344);
(343) whether inquiry exists deletable application heap, if exist, then the internal memory with one of them application heap discharges to virtual machine manager, remembers that this application heap is the off-line application heap, returns step (341), otherwise, enter step (344);
(344) be Δ to VME operating system application size 2Internal memory, the memory pages of applying for is discharged to virtual machine manager, and remembers that these pages are for keeping the page.
Particularly, the present invention has following characteristics:
(1) favorable expandability
Xen uses balloon to drive the memory size of adjusting virtual machine now, balloon drive can not EVM(extended virtual machine) physical address space, the internal memory upper limit in the time of promptly can not breaking through virtual machine activation, frequent in addition use balloon drives and can produce a large amount of memory fragmentations.The virutal machine memory hot plug technology that realizes among the present invention, physical address space that can EVM(extended virtual machine) makes the memory size no maximum of virtual machine, can increase or reduce virutal machine memory arbitrarily, effectively raises the extendability of virutal machine memory; Drive with balloon and to compare, the mode by the internal memory hot plug reduces the generation that internal memory can be avoided memory fragmentation.
(2) availability is good
The memory management of Xen virtual machine is static, can only manually adjust the virutal machine memory size, along with the variation of load, the situation of low memory or internal memory waste may occur.Dram distribution function among the present invention is the memory pressure of perception virtual machine dynamically, the memory requirements of prediction virtual machine, the memory pressure of balance virtual machine, can satisfy the memory requirements of virtual machine, improve the virtual machine performance, can improve the memory usage of physical machine again, strengthen the availability of virtual machine.
When the physical machine low memory, Xen can't create new virtual machine.Dynmaic establishing virtual machine function among the present invention can be when the physical machine low memory, by rationally reducing the internal memory of existing virtual machine, create new virtual machine, realize the excessive use of critical function internal memory (memory overcommit) in the Intel Virtualization Technology, strengthened the availability of virtual machine.
(3) good stability
The present invention is through test for a long time, use multiple test environment during test, comprise the various extreme cases of manual setting, and use various authoritys' benchmark to test for a long time, every function in the proof system all is stable as a result, reliably.
Description of drawings
Fig. 1 is a system construction drawing of the present invention;
Fig. 2 is system function module figure of the present invention;
Fig. 3 is physical address space constitutional diagram of the present invention;
Fig. 4 is that internal memory hot plug of the present invention drives workflow diagram;
Fig. 5 is that hot plug of the present invention increases the internal memory process flow diagram;
Fig. 6 reduces the internal memory process flow diagram for hot plug of the present invention;
Fig. 7 is Dram allocation flow figure of the present invention;
Fig. 8 is a dynmaic establishing virtual machine process flow diagram of the present invention.
Embodiment
The dynamic EMS memory management system that the present invention realizes is developed based on Xen4.0, at half virtual virtual machine.
System architecture as shown in Figure 1, this system applies is in the physical hardware of x86 framework, virtual machine manager (Virtual Machine Monitor) operates on the physical hardware, is responsible for the resource management of the bottom, such as memory management, CPU scheduling, device access etc.Domain 0 is a privileged domain, has only one, is in charge of each domain U.Domain U is the client territory, can have a plurality ofly, and the virtual machine of hereinafter mentioning all refers to domain U.Xenstore is the file system of a similar database, is set up by domain 0, shares with each domain U.Xenstore has stored the configuration and the status information of virtual machine, and every kind of information all has corresponding data item, and domain 0 and domain U carry out inter-domain communication by reading and writing same data item.Memory information monitoring process of operation among each domain U obtains memory information and sends to domain 0; Dram distribution process of operation among the domain 0, be responsible for receiving the memory information of domain U, for Dram distributes and dynmaic establishing virtual machine function is calculated the internal memory desired value of each domain U, and send to the internal memory hot plug driving among the domain U.The operating system of Domain 0 and domain U is 64 Linux (the kernel version is 2.6.31).
As shown in Figure 2, this system is made of three modules, is respectively the internal memory monitoring module, memory allocating module and internal memory hot plug module.
The effect of internal memory monitoring module is the memory information that monitors each virtual machine, and specific practice is to carry out inter-domain communication by xenstore.Process of operation obtains required memory information among the Domain U, comprises memory usage, exchange partition utilization factor etc., and write xenstore; Process of operation reads xenstore among the domain 0, obtains the memory information of domain U.The internal memory of virtual machine comprises use internal memory and free memory, and memory usage just is to use internal memory to account for the ratio of virutal machine memory.
The effect of memory allocating module is how to distribute virutal machine memory when calculating Dram distribution and dynmaic establishing virtual machine.Specific practice is to analyze the memory information that the internal memory monitoring module obtains, and uses corresponding allocation algorithm to calculate the desired value of each virutal machine memory size.
The effect of internal memory hot plug module is a memory size of adjusting each virtual machine, and specific practice is the virutal machine memory desired value that calculates according to memory allocating module, and the invoke memory hot plug drives adjusts virutal machine memory to desired value; The calling interface of user's attitude also is provided in addition, and manually the invoke memory hot plug drives and adjusts the virutal machine memory size.
The state that physical address space may occur in the internal memory hot plug driving implementation as shown in Figure 3.White portion is represented the free memory of operating system; Dash area is represented the unavailable internal memory of operating system, and comprise the off-line application heap that produces when reducing internal memory and keep the page, and the off-line page at the physical address space end that stays when increasing internal memory of fine granularity.
Dynamic EMS memory management system has the internal memory hot plug, and Dram distributes, and three kinds of basic functions of dynmaic establishing virtual machine are done detailed explanation below in conjunction with accompanying drawing and example to the present invention.
(1) as shown in Figure 4, the workflow of internal memory hot plug driving is as follows:
(1.1) load internal memory hot plug driver module, and initialization;
(1.2) receive the internal memory desired value, carry out internal memory hot plug task;
(1.3) increase internal memory processing function if the internal memory desired value greater than the virutal machine memory currency, is carried out, increase the associative operation of internal memory, enter step (1.4); Reduce internal memory processing function if desired value less than the virutal machine memory currency, is carried out, reduce the associative operation of internal memory, enter step (1.4);
(1.4), finish if desired value equals currency; Otherwise (certain step occurs wrong) enters step (1.3) behind the timeticks of dormancy (HZ), continues to carry out internal memory hot plug task.
As shown in Figure 5, the flow process of increase internal memory is as follows:
(A1) if the physical address space of virtual machine less than the internal memory desired value of virtual machine, then expand its physical address space to more than or equal to the internal memory desired value, remember that the memory pages in the new physics address space of expanding is an off-line page, enter step (2.2), otherwise, directly enter step (2.2)
(A2) if the internal memory desired value of virtual machine greater than current internal memory, is then calculated the difference DELTA of virutal machine memory desired value and current internal memory 1, enter step (A3), otherwise, finish;
(A3) if there is the reservation page, then, remember that this reservation page is that free Page has promptly increased one page internal memory, returns step (A2) for one of them keeps page storage allocation; Otherwise, enter step (A4);
(A4) if Δ 1More than or equal to 128M and there is the off-line application heap, then be one of them off-line application heap storage allocation, remember that this off-line application heap is that the free memory section has promptly increased by one section internal memory, return step (A2), otherwise, enter step (A5);
(A5) according to the address sequencing one by one to the off-line page storage allocation up to the internal memory that is assigned with equal Δ 1, the off-line page that note is assigned with internal memory is a free Page, increase internal memory operation and finish this moment.
As shown in Figure 6, it is as follows to reduce the flow process of internal memory:
(B1) if the internal memory desired value of virtual machine less than current internal memory, is then calculated the difference DELTA of current internal memory and virutal machine memory desired value 2, enter step (B2), otherwise, finish;
(B2) if Δ 2More than or equal to 128M, then enter step (B3), otherwise, enter step (B4);
(B3) whether inquiry exists deletable application heap, deletable application heap is meant and can makes all memory pages in this application heap become free page by the internal memory migrating technology, if exist, then one of them application heap physical address corresponding space is deleted from memory allocator, and the internal memory of this application heap discharged to virtual machine manager, remember that this application heap is that the off-line application heap has promptly reduced one section internal memory, returns step (B1), otherwise, enter step (B4)
(B4) be Δ to VME operating system application size 2Internal memory, the memory pages of applying for is discharged to virtual machine manager, and remembers that these pages for keeping the page, have promptly reduced size and have been Δ 2Internal memory, the operation that reduce internal memory this moment is finished.
(2) as shown in Figure 7, the Dram flow process that shares out the work is as follows:
(2.1) obtain the memory information of each virtual machine by the internal memory monitoring module;
(2.2) calculate the memory increase Δ M of each virtual machine lWith exchange partition increment Delta S l, computing method are as follows, wherein M Used(n) lAnd M Used(n-1) lBe respectively the use internal memory of l virtual machine, S (n) at n and n-1 time point lAnd S (n-1) lBe respectively the use exchange partition of l virtual machine at n and n-1 time point, l=1 ..., L, L are the virtual machine sum, n time point is current point in time;
Figure BDA0000068870340000101
(2.3) prediction memory requirements, the use internal memory that promptly next time point needs, predicted value M Predict(n+1) lEqual current use internal memory M Used(n) lAdd memory increase and exchange partition increment;
M predict(n+1) l=M used(n) l+ΔM l+ΔS l
(2.4) the average memory usage U of n+1 time point of calculating Avg(n+1), M Total(n) lBe the internal memory of l virtual machine at n time point;
Figure BDA0000068870340000102
(2.5) calculate the internal memory desired value M of each virtual machine at n+1 time point Target(n+1) l, equal the memory requirements predicted value divided by average memory usage.
M target(n+1) l=M predict(n+1) l/U avg(n+1)
(2.6) if the virutal machine memory utilization factor in average memory usage scope (1~10%), enters step (2.7); Otherwise enter step (2.8);
|M predict(n+1) l/M total(n) l-U avg(n+1) |≤average memory usage scope
(2.7) internal memory desired value assignment is the internal memory currency, does not adjust memory size, and purpose is to reduce the number of times that internal memory is adjusted;
M target(n+1) l=M total(n) l
(2.8) if the internal memory desired value less than producing the critical value (Committed_AS the among/proc/meminfo) that internal memory overflows, enters step (2.9), otherwise enters step (2.10);
(2.9) internal memory desired value assignment is Committed_AS, avoids producing internal memory and overflows;
M target(n+1) l=Committed_AS
(2.10) the invoke memory hot plug drives the internal memory of each virtual machine of adjustment to desired value M Target(n+1) l
(2.11) sleep T second, T is the cycle that Dram distributes, and returns step (2.1) then.
Wherein step (2.6) is optimization process at some special circumstances to step (2.9), uses the memory usage scope to reduce the number of times that internal memory is adjusted on the one hand, will avoid producing internal memory on the other hand and overflow.Step (2.6) is to the dispensable step of step (2.9).
(3) as shown in Figure 8, the flow process of dynmaic establishing virtual machine is as follows:
(3.1) if the internal memory that the free memory of physical machine is set more than or equal to new virtual machine is then directly created new virtual machine, finish; Otherwise, enter step (3.2);
(3.2) obtain the memory information of each virtual machine by the internal memory monitoring module;
(3.3) behind the internal memory that the new virtual machine of reservation is set, calculate average memory usage U Avg, ∑ M wherein UsedBe the use internal memory summation of existing virtual machine, ∑ M TotalBe the internal memory sum of existing virtual machine, M NewBe the internal memory that new virtual machine is set, M FreeIt is the free memory of physical machine;
U avg=∑M used/(∑M total-M new+M free)
(3.4) calculate the internal memory desired value M of each existing virtual machine Targetl, M wherein Used lBe l the current use internal memory of existing virtual machine
M target?l=M used?l/U avg
(3.5) the internal memory desired value M of invoke memory hot plug internal memory that drive to adjust each virtual machine to the step (3.4) Targetl
(3.6) create new virtual machine, this moment, physical machine had enough free memories to create new virtual machine.
Example:
Dynamic EMS memory management system set forth in the present invention can illustrate that experimental situation only needs a PC, disposes as follows by instantiation:
Figure BDA0000068870340000121
Need to install amended Xen 4.0 of the present invention and Linux 2.6.31 kernel on the physical machine, domain U and domain 0 use Linux 2.6.31 kernel, test three kinds of functions of the present invention below respectively.
(1) virutal machine memory hot plug test
(1.1) original state: save as 2G in the physical machine, domain 0 internal memory is fixed as 1G (can not be changed);
(1.2) virtual machine of a 256 MB of memory of establishment;
(1.3) coarseness increases internal memory: uses internal memory hot plug driving at user's attitude interface of domain 0 virutal machine memory to be set and be 512M, increased 256 MB of memory, promptly increased by two sections internal memories;
(1.4) fine granularity increases internal memory: it is 562M that virutal machine memory is set, and has increased by 50 internal memories;
(1.5) coarseness reduces internal memory: it is 434M that virutal machine memory is set, and has reduced the 128M internal memory, i.e. one section internal memory;
(1.6) fine granularity reduces internal memory: it is 400M that virutal machine memory is set, and has reduced the 34M internal memory.
More than test has proved that the virutal machine memory hot plug can break the initial internal memory upper limit of virtual machine, increases or reduce virutal machine memory arbitrarily.The test process of Dram distribution needs long-time frequent adjustment memory size in addition, can prove stability and reliability that the internal memory hot plug drives.
(2) dynmaic establishing virtual machine test
(2.1) original state: save as 2G in the physical machine, domain 0 internal memory is fixed as 1G, and the free memory of physical machine is about 1G;
(2.2) create two virtual machines, internal memory all is 500M, and the physical machine free time is about 20M;
(2.3) use " xm create " order directly to create the virtual machine of a 256 MB of memory, create failure, because the free memory deficiency of physical machine;
(2.4) use dynmaic establishing virtual machine function, create new virtual machine success;
(2.5) use dynmaic establishing virtual machine function, create the virtual machine success of the 4th 256 MB of memory;
(2.6) use dynmaic establishing virtual machine function, create the virtual machine success of the 5th 256 MB of memory.More than test has proved that dynmaic establishing virtual machine function can be under the situation of physical machine low memory, by rationally reducing the internal memory of existing virtual machine, create new virtual machine, has realized the excessive use of internal memory.
(3) Dram allocation for test
(3.1) original state: save as 2G in the physical machine, the domain0 internal memory is fixed as 1G, and the free memory of physical machine is about 1G;
(3.2) create two virtual machines, internal memory all is 512M;
(3.3) static memory allocation for test: a virtual machine operation benchmark Spec CPU 2006, another virtual machine idle running;
(3.4) after the static memory allocation for test finishes, two virtual machines are closed, create two virtual machines again according to identical configuration then;
(3.5) Dram allocation for test: a virtual machine operation benchmark Spec CPU 2006, another virtual machine idle running.
In Dram allocation for test process, along with the variation of virtual machine load, the dynamic change of two virutal machine memory sizes makes the virtual machine of high capacity have bigger internal memory, and the virtual machine of low load has less internal memory.
The test result of benchmark Spec CPU 2006 is as shown in the table, and Dram distributes the intensive test event perlbench of internal memory, and the performance of bzip2 and gcc has tangible lifting, and other test events are less demanding to internal memory, and performance change is little.The benchmark of operation high capacity has also proved high stability and the reliability that Dram distributes for a long time.

Claims (2)

1. based on the virtual machine dynamic EMS memory management system of internal memory hot plug, comprise
The internal memory monitoring module is used to obtain the memory information of each virtual machine;
Memory allocating module is used for carrying out Dram distribution and dynmaic establishing virtual machine according to the memory information of each virtual machine;
The internal memory hot plug module is used for the internal memory of virtual machine is adjusted to the internal memory desired value that memory allocating module calculates;
Described Dram distribution is carried out in the following manner:
(11) calculate the memory increase Δ M of each virtual machine l=M Used(n) l-M Used(n-1) lWith exchange partition increment Delta S l=S (n) l-S (n-1) l, M wherein Used(n) lAnd M Used(n-1) lBe respectively the use internal memory of l virtual machine, S (n) at n and n-1 time point lAnd S (n-1) lBe respectively the use exchange partition of l virtual machine at n and n-1 time point, l=1 ..., L, L are the virtual machine sum;
(12) predict the use internal memory M that the next time point of each virtual machine needs Predict(n+1) l=M Used(n) l+ Δ M l+ Δ S l
(13) the average memory usage of n+1 time point of calculating U avg ( n + 1 ) = Σ i = 1 L M predict ( n + 1 ) l / Σ l = 1 L M total ( n ) l , ;
(14) calculate the internal memory desired value M of each virtual machine at n+1 time point Target(n+1) l=M Predict(n+1) l/ U Avg(n+1);
(15) the invoke memory hot plug module is adjusted the internal memory of each virtual machine to desired value M Target(n+1) l
(16) sleep T second, return step (11) then;
Described dynmaic establishing virtual machine carries out in the following manner:
(21) if the internal memory that the free memory of physical machine is set more than or equal to new virtual machine is then directly created new virtual machine, finish; Otherwise, enter step (22);
(22) calculate the existing current average memory usage U of virtual machine Avg=∑ M Used/ (∑ M Total-M New+ M Free), wherein, ∑ M UsedBe the existing current use internal memory summation of virtual machine, ∑ M TotalBe the internal memory sum of existing virtual machine, M NewBe the internal memory that new virtual machine is set, M FreeBe the current free memory of physical machine;
(23) calculate the internal memory desired value M of each existing virtual machine Targetl=M Usedl/ U Avg, M UsedlBe l the current use internal memory of existing virtual machine;
(24) the invoke memory hot plug module is created new virtual machine after the internal memory of each existing virtual machine is adjusted to the internal memory desired value that step (23) obtains.
2. the virtual machine dynamic EMS memory management system based on the internal memory hot plug according to claim 1 is characterized in that, described internal memory hot plug module is adjusted virutal machine memory in the following manner:
(31) the internal memory desired value of virtual machine and the current internal memory of virtual machine are compared, if greater than, step (32) entered; If less than, enter step (34); If equal, then finish;
(32) if the physical address space of virtual machine less than the internal memory desired value of virtual machine, then expand its physical address space to more than or equal to the internal memory desired value, remember that the memory pages in the new physics address space of expanding is an off-line page, enter step (33), otherwise, directly enter step (33);
(33) increase virutal machine memory to the internal memory desired value:
(331) if the internal memory desired value of virtual machine greater than current internal memory, is then calculated the difference DELTA of virutal machine memory desired value and current internal memory 1, enter step (332), otherwise, finish;
(332) if there is the reservation page, then is one and keeps page storage allocation, remember that this reservation page is a free Page, return step (331); Otherwise, enter step (333);
(333) if Δ 1Greater than 128M and there is the off-line application heap, then be an off-line application heap storage allocation, remember that this off-line application heap is the free memory section, return step (331), otherwise, enter step (334);
(335) according to the address sequencing one by one to the off-line page storage allocation up to the internal memory that is assigned with equal Δ 1, the off-line page that note is assigned with internal memory is a free Page;
(34) reduce virutal machine memory to the internal memory desired value:
(341) if the internal memory desired value of virtual machine less than current internal memory, is then calculated the difference DELTA of current internal memory and virutal machine memory desired value 2, enter step (342), otherwise, finish;
(342) if Δ 2More than or equal to 128M, then enter step (343), otherwise, enter step (344);
(343) whether inquiry exists deletable application heap, if exist, then the internal memory with one of them application heap discharges to virtual machine manager, remembers that this application heap is the off-line application heap, returns step (341), otherwise, enter step (344);
(344) be Δ to VME operating system application size 2Internal memory, the memory pages of applying for is discharged to virtual machine manager, and remembers that these pages are for keeping the page.
CN 201110162615 2011-06-16 2011-06-16 Dynamic memory management method based on memory hot plug for virtual machine Expired - Fee Related CN102222014B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201110162615 CN102222014B (en) 2011-06-16 2011-06-16 Dynamic memory management method based on memory hot plug for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201110162615 CN102222014B (en) 2011-06-16 2011-06-16 Dynamic memory management method based on memory hot plug for virtual machine

Publications (2)

Publication Number Publication Date
CN102222014A true CN102222014A (en) 2011-10-19
CN102222014B CN102222014B (en) 2013-05-22

Family

ID=44778574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201110162615 Expired - Fee Related CN102222014B (en) 2011-06-16 2011-06-16 Dynamic memory management method based on memory hot plug for virtual machine

Country Status (1)

Country Link
CN (1) CN102222014B (en)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102681792A (en) * 2012-04-16 2012-09-19 华中科技大学 Solid-state disk memory partition method
CN103092678A (en) * 2013-01-22 2013-05-08 华中科技大学 Multi-increment virtual machine memory management system and method
CN103309698A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Virtual machine memory managing system and method
CN103324516A (en) * 2013-07-04 2013-09-25 曙光信息产业(北京)有限公司 Virtualization-driven hardware management method and device
CN103365700A (en) * 2013-06-28 2013-10-23 福建师范大学 Cloud computing virtualization environment-oriented resource monitoring and adjustment system
CN103605613A (en) * 2013-11-21 2014-02-26 中标软件有限公司 Method and system for dynamically adjusting virtual-machine memory in cloud computing environment
CN104978233A (en) * 2014-04-11 2015-10-14 郑建锋 Method and device for dynamically using memory
CN105162667A (en) * 2015-09-10 2015-12-16 华为技术有限公司 Method and device for configuration of virtual machine
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN105511940A (en) * 2015-11-30 2016-04-20 广州云宏信息科技股份有限公司 Method and system authorizing virtual machine to access Xenstore in Xen virtualization
CN103176832B (en) * 2013-02-07 2016-04-27 宝龙计算机系统(湖南)有限公司 One kind UNIX operating system runs method and the device of virtual opetrating system
CN105740050A (en) * 2016-01-28 2016-07-06 华中科技大学 Trust transferring method in virtualization environment
CN106708596A (en) * 2015-11-13 2017-05-24 华为技术有限公司 Input/output virtual resource adjustment method and processor
CN107391227A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 A kind of EMS memory management process and device
CN107506286A (en) * 2017-09-26 2017-12-22 郑州云海信息技术有限公司 CPU and memory block automatically upper inserting method and system
CN107783812A (en) * 2016-08-24 2018-03-09 阿里巴巴集团控股有限公司 Virutal machine memory management method and device
CN110580194A (en) * 2019-08-29 2019-12-17 上海仪电(集团)有限公司中央研究院 Container scheduling method based on memory hot plug technology and management node scheduler
CN110580195A (en) * 2019-08-29 2019-12-17 上海仪电(集团)有限公司中央研究院 Memory allocation method and device based on memory hot plug
CN110633130A (en) * 2019-08-29 2019-12-31 上海仪电(集团)有限公司中央研究院 Virtual memory management method and device based on memory hot plug technology
US10719342B2 (en) 2015-11-25 2020-07-21 International Business Machines Corporation Provisioning based on workload displacement
CN111752674A (en) * 2020-05-20 2020-10-09 上海仪电(集团)有限公司中央研究院 Technical architecture, memory allocation method, device and medium in Linux system environment
CN112114935A (en) * 2020-09-18 2020-12-22 北京金山云网络技术有限公司 Hot plug method and related equipment
CN114237831A (en) * 2022-02-25 2022-03-25 阿里巴巴(中国)有限公司 Hot plug method for virtual central processing unit, physical host and storage medium
CN115543862A (en) * 2022-09-27 2022-12-30 超聚变数字技术有限公司 Memory management method and related device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504620A (en) * 2009-03-03 2009-08-12 华为技术有限公司 Load balancing method, apparatus and system of virtual cluster system
CN101620573A (en) * 2009-07-03 2010-01-06 中国人民解放军国防科学技术大学 Virtualization method of memory management unit of X86 system structure
CN101706742A (en) * 2009-11-20 2010-05-12 北京航空航天大学 Method for dispatching I/O of asymmetry virtual machine based on multi-core dynamic partitioning
US20100312982A1 (en) * 2009-06-04 2010-12-09 Hitachi, Ltd. Storage management command control in virtualized environment
CN101916207A (en) * 2010-08-28 2010-12-15 华为技术有限公司 Energy saving method, device and system under desktop virtual environment
CN101986285A (en) * 2010-11-03 2011-03-16 华为技术有限公司 Virtual machine storage space management method, system and physical host
US20110083132A1 (en) * 2009-10-02 2011-04-07 Dor Laor Mechanism for Prioritized Scheduling of Virtual Machines
CN102053858A (en) * 2010-12-28 2011-05-11 华中科技大学 Virtual CPU dispatching method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101504620A (en) * 2009-03-03 2009-08-12 华为技术有限公司 Load balancing method, apparatus and system of virtual cluster system
US20100312982A1 (en) * 2009-06-04 2010-12-09 Hitachi, Ltd. Storage management command control in virtualized environment
CN101620573A (en) * 2009-07-03 2010-01-06 中国人民解放军国防科学技术大学 Virtualization method of memory management unit of X86 system structure
US20110083132A1 (en) * 2009-10-02 2011-04-07 Dor Laor Mechanism for Prioritized Scheduling of Virtual Machines
CN101706742A (en) * 2009-11-20 2010-05-12 北京航空航天大学 Method for dispatching I/O of asymmetry virtual machine based on multi-core dynamic partitioning
CN101916207A (en) * 2010-08-28 2010-12-15 华为技术有限公司 Energy saving method, device and system under desktop virtual environment
CN101986285A (en) * 2010-11-03 2011-03-16 华为技术有限公司 Virtual machine storage space management method, system and physical host
CN102053858A (en) * 2010-12-28 2011-05-11 华中科技大学 Virtual CPU dispatching method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
HAI JIN等: "ChinaV: Building Virtualized Computing System", 《PROCEEDING OF 10TH IEEE INTERNATIONAL CONFERENCE ON HIGH PERFORMANCE COMPUTING AND COMMUNICATIONS》, 3 October 2008 (2008-10-03) *
王凌飞等: "Java虚拟机内存管理分析", 《现代电子技术》, 31 May 2007 (2007-05-31) *
郭晓琼: "虚拟机Xen及其内存管理研究", 《中国优秀硕士学位论文全文数据库》, 15 July 2008 (2008-07-15) *

Cited By (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309698A (en) * 2012-03-16 2013-09-18 鸿富锦精密工业(深圳)有限公司 Virtual machine memory managing system and method
CN102681792B (en) * 2012-04-16 2015-03-04 华中科技大学 Solid-state disk memory partition method
CN102681792A (en) * 2012-04-16 2012-09-19 华中科技大学 Solid-state disk memory partition method
CN103092678A (en) * 2013-01-22 2013-05-08 华中科技大学 Multi-increment virtual machine memory management system and method
CN103092678B (en) * 2013-01-22 2016-01-13 华中科技大学 A kind of many incremental virtual machine internal storage management system and method
CN103176832B (en) * 2013-02-07 2016-04-27 宝龙计算机系统(湖南)有限公司 One kind UNIX operating system runs method and the device of virtual opetrating system
CN103365700A (en) * 2013-06-28 2013-10-23 福建师范大学 Cloud computing virtualization environment-oriented resource monitoring and adjustment system
CN103365700B (en) * 2013-06-28 2016-01-06 福建师范大学 A kind of facing cloud calculates monitoring resource and the adjustment System of virtualized environment
CN103324516A (en) * 2013-07-04 2013-09-25 曙光信息产业(北京)有限公司 Virtualization-driven hardware management method and device
CN103324516B (en) * 2013-07-04 2017-02-08 曙光信息产业(北京)有限公司 Virtualization-driven hardware management method and device
CN103605613A (en) * 2013-11-21 2014-02-26 中标软件有限公司 Method and system for dynamically adjusting virtual-machine memory in cloud computing environment
CN103605613B (en) * 2013-11-21 2016-09-21 中标软件有限公司 Cloud computing environment dynamically adjusts the method and system of virutal machine memory
CN104978233A (en) * 2014-04-11 2015-10-14 郑建锋 Method and device for dynamically using memory
CN105320559A (en) * 2014-07-30 2016-02-10 中国移动通信集团广东有限公司 Scheduling method and device of cloud computing system
CN105320559B (en) * 2014-07-30 2019-02-19 中国移动通信集团广东有限公司 A kind of dispatching method and device of cloud computing system
CN105162667A (en) * 2015-09-10 2015-12-16 华为技术有限公司 Method and device for configuration of virtual machine
CN105162667B (en) * 2015-09-10 2018-08-14 华为技术有限公司 Virtual machine configuration method and apparatus
CN106708596B (en) * 2015-11-13 2020-02-14 华为技术有限公司 Method for adjusting input and output virtualized resources and processor
CN106708596A (en) * 2015-11-13 2017-05-24 华为技术有限公司 Input/output virtual resource adjustment method and processor
US10725805B2 (en) 2015-11-25 2020-07-28 International Business Machines Corporation Provisioning based on workload displacement
US10719342B2 (en) 2015-11-25 2020-07-21 International Business Machines Corporation Provisioning based on workload displacement
CN105511940B (en) * 2015-11-30 2019-02-01 云宏信息科技股份有限公司 The method and system of authorization virtual machine access Xenstore in a kind of Xen virtualization
CN105511940A (en) * 2015-11-30 2016-04-20 广州云宏信息科技股份有限公司 Method and system authorizing virtual machine to access Xenstore in Xen virtualization
CN105740050B (en) * 2016-01-28 2019-03-05 华中科技大学 A kind of Trust transitivity method under virtualized environment
CN105740050A (en) * 2016-01-28 2016-07-06 华中科技大学 Trust transferring method in virtualization environment
CN107783812A (en) * 2016-08-24 2018-03-09 阿里巴巴集团控股有限公司 Virutal machine memory management method and device
CN107783812B (en) * 2016-08-24 2022-03-08 阿里巴巴集团控股有限公司 Virtual machine memory management method and device
CN107391227A (en) * 2017-07-20 2017-11-24 郑州云海信息技术有限公司 A kind of EMS memory management process and device
CN107506286A (en) * 2017-09-26 2017-12-22 郑州云海信息技术有限公司 CPU and memory block automatically upper inserting method and system
CN110580194A (en) * 2019-08-29 2019-12-17 上海仪电(集团)有限公司中央研究院 Container scheduling method based on memory hot plug technology and management node scheduler
CN110633130A (en) * 2019-08-29 2019-12-31 上海仪电(集团)有限公司中央研究院 Virtual memory management method and device based on memory hot plug technology
CN110580195A (en) * 2019-08-29 2019-12-17 上海仪电(集团)有限公司中央研究院 Memory allocation method and device based on memory hot plug
CN110633130B (en) * 2019-08-29 2023-10-31 上海仪电(集团)有限公司中央研究院 Virtual memory management method and device based on memory hot plug technology
CN110580195B (en) * 2019-08-29 2023-11-07 上海仪电(集团)有限公司中央研究院 Memory allocation method and device based on memory hot plug
CN111752674A (en) * 2020-05-20 2020-10-09 上海仪电(集团)有限公司中央研究院 Technical architecture, memory allocation method, device and medium in Linux system environment
CN111752674B (en) * 2020-05-20 2023-08-01 上海仪电(集团)有限公司中央研究院 Technical architecture, memory allocation method, equipment and medium in Linux system environment
CN112114935A (en) * 2020-09-18 2020-12-22 北京金山云网络技术有限公司 Hot plug method and related equipment
CN112114935B (en) * 2020-09-18 2024-09-06 北京金山云网络技术有限公司 Hot plug method and related equipment
CN114237831A (en) * 2022-02-25 2022-03-25 阿里巴巴(中国)有限公司 Hot plug method for virtual central processing unit, physical host and storage medium
CN115543862A (en) * 2022-09-27 2022-12-30 超聚变数字技术有限公司 Memory management method and related device
CN115543862B (en) * 2022-09-27 2023-09-01 超聚变数字技术有限公司 Memory management method and related device

Also Published As

Publication number Publication date
CN102222014B (en) 2013-05-22

Similar Documents

Publication Publication Date Title
CN102222014B (en) Dynamic memory management method based on memory hot plug for virtual machine
US20080320203A1 (en) Memory Management in a Computing Device
US7996690B2 (en) System and method for dynamic utilization-based power allocation in a modular information handling system
US7721052B2 (en) System and method of reducing power consumption of a main memory
CN101346701A (en) Reducing number of memory bodies under power supply
CN103365700A (en) Cloud computing virtualization environment-oriented resource monitoring and adjustment system
CN112825042A (en) Resource management method and device, electronic equipment and storage medium
TW202145010A (en) Methods of storing data, electronic devices and storage media
US10185384B2 (en) Reducing power by vacating subsets of CPUs and memory
CN103218305A (en) Distribution method of memory space
ITRM20110433A1 (en) ENERGY SAVING SYSTEM IN THE COMPANY DATE CENTERS.
CN104978233A (en) Method and device for dynamically using memory
CN107479949A (en) Low energy consumption cloud computing method for scheduling task
US8341638B2 (en) Delegated virtualization across physical partitions of a multi-core processor (MCP)
Xilong et al. An energy-efficient virtual machine scheduler based on CPU share-reclaiming policy
CN110175075A (en) Android system Memory Optimize Method and device
CN111078407B (en) Memory management method and device, storage medium and electronic equipment
US20240086086A1 (en) Ssd performance per power state improvement by deterministic utilization control
Ro Modeling and analysis of memory virtualization in cloud computing
US8775840B2 (en) Virtualization in a multi-core processor (MCP)
US8438404B2 (en) Main processing element for delegating virtualized control threads controlling clock speed and power consumption to groups of sub-processing elements in a system such that a group of sub-processing elements can be designated as pseudo main processing element
CN115640098A (en) Virtual machine heterogeneous memory pooling method and system
CN113742059A (en) Task allocation method and device, computer equipment and storage medium
Ding et al. Review of virtual memory optimization in cloud environment
Mubin et al. Energy Aware Scheduling and Resource Allocation for Virtual Machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20130522

Termination date: 20200616