CN104536905A - Memory management method and system - Google Patents
Memory management method and system Download PDFInfo
- Publication number
- CN104536905A CN104536905A CN201510018655.6A CN201510018655A CN104536905A CN 104536905 A CN104536905 A CN 104536905A CN 201510018655 A CN201510018655 A CN 201510018655A CN 104536905 A CN104536905 A CN 104536905A
- Authority
- CN
- China
- Prior art keywords
- chained list
- virtual machine
- cleaned
- memory
- internal memory
- 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
Abstract
The invention provides a memory management method and system. The method comprises the following steps that when a virtual machine is destroyed, memories in the virtual machine are marked to be in a to-be-cleared state and placed into to-be-cleared chain tables; when the virtual machine is created, according to the preset memory distribution strategy, the corresponding memory is obtained from the corresponding chain table and distributed. According to the method, traditional synchronous memory clearing operation is converted into asynchronous clearing operation, by delaying memory clearing, time consumed for creating and destroying the virtual machine is greatly shortened, the management efficiency of a hypervisor is improved, and the user experience is promoted.
Description
Technical field
The invention belongs to memory management field, particularly relate to a kind of EMS memory management process and system.
Background technology
Along with the rise of cloud computing, the Intel Virtualization Technology forming wherein one of gordian technique becomes focus outer in the industry, Intel Virtualization Technology is no longer confined to IT development field, but move towards the resource infrastructure aspect of more wide fusion broad sense, by the impact of virtual concept, IT resource is forming a kind of new system, and the calculating needed for dynamic combined adjustment, storage and Internet resources are to adapt to final business demand.
Hypervisor (virtual machine moni tor; Virtual machine monitor VMM) be used to the basic software managing and create virtual machine: such as commercial VMware ESXi and the Xen/KVM increased income is the hypervisor of current main flow.For hypervisor, CPU and internal memory are the important object of its management.In virtualized environment, internal memory may successively distribute to different virtual machines, and in order to avoid information leakage, hypervisor must clean (clearing) it before virtual machine uses internal memory.
Traditional internal memory cleaning method is as shown in Figure 1: when destroying virtual machine VM, and the internal memory reclaimed in virtual machine VM also carries out synchronous cleaning to it, and the internal memory after cleaning puts into clen chained list; When creating virtual machine, from clen chained list, apply for internal memory.This convential memory cleaning method is along with the widespread use of Intel Virtualization Technology, large gauge virtual machine constantly occurs, cause inefficiency when processing large internal memory day by day serious, therefore in the urgent need to one efficient internal memory cleaning means, reply management large gauge virtual machine produced problem.
Summary of the invention
The invention provides a kind of EMS memory management process and system, to solve the problem.
The present invention also provides a kind of EMS memory management process, comprises the following steps:
When destroying virtual machine, the memory marker in described virtual machine is state to be cleaned and puts into chained list to be cleaned;
When creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtain corresponding internal memory, carry out allocation process.
The present invention also provides a kind of internal storage management system, comprises chained list creation module, memory management module; Wherein, described chained list creation module is connected with described memory management module;
Described chained list creation module, for create chained list to be cleaned, clean chained list and by the chained list described to be cleaned created, clean chained list and be sent to described memory management module;
Described memory management module, during for destroying virtual machine, being state to be cleaned by the memory marker in described virtual machine and putting into chained list to be cleaned; Time also for creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtaining corresponding internal memory, carry out allocation process.
Compared to prior art, according to a kind of EMS memory management process provided by the invention and system, by internal memory according to the need of cleaning, be divided into two classes: " clean " and " dirty ", mark memory setting classification is only needed when needing internal memory to clean, postpone internal memory cleaning operation whereby, and complete internal memory cleaning when system idles; If system load is higher, then complete internal memory cleaning again when applying for internal memory.Thus traditional isochronous memory cleaning operation is converted into asynchronous cleaning operation, by postponing internal memory cleaning, greatly reduces the time creating and destroy virtual machine and consume, having heightened the efficiency of management of hypervisor, improved Consumer's Experience.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Figure 1 shows that the EMS memory management process process flow diagram of prior art;
Figure 2 shows that EMS memory management process process flow diagram of the present invention;
Figure 3 shows that EMS memory management process schematic diagram of the present invention;
Figure 4 shows that internal storage management system structural drawing of the present invention.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Figure 2 shows that EMS memory management process process flow diagram of the present invention, comprise the following steps:
Step 201: pre-set chained list to be cleaned, clean chained list, stores internal memory to be cleaned respectively and has cleaned internal memory;
Step 202: when destroying virtual machine, the memory marker in described virtual machine is state to be cleaned and puts into chained list to be cleaned;
When virtual machine monitor destroys virtual machine, the memory marker in described virtual machine is " dirty " and puts into dirty chained list.
Step 203: when creating virtual machine, according to default Memory Allocation Strategy, obtains corresponding internal memory, carries out allocation process from corresponding chained list.
When creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtain corresponding internal memory, the process of carrying out allocation process is:
When virtual machine monitor creates virtual machine, first searching for corresponding internal memory from cleaning chained list (clean chained list), if search, then described Memory Allocation being given the virtual machine created; Otherwise, search in chained list to be cleaned, obtain corresponding internal memory to be cleaned and after described internal memory to be cleaned is cleaned, the Memory Allocation after cleaning given the virtual machine created.
If search for the internal memory to be cleaned less than correspondence in chained list to be cleaned, then feedback creates virtual machine failure.
If when system CPU is in idle condition, captures after an internal memory to be cleaned cleans from the gauge outfit of chained list to be cleaned, put into and clean chained list table tail.
Figure 3 shows that EMS memory management process schematic diagram of the present invention, when destroying virtual machine, reclaim the internal memory in virtual machine and put into dirty chained list, during system idles, after asynchronous cleaning is carried out to the internal memory in dirty chained list, putting into clean chained list; When creating virtual machine, when obtaining corresponding internal memory or create virtual machine from clean chained list, when obtaining less than corresponding internal memory from clean chained list, from dirty chained list, obtain corresponding internal memory, carry out synchronous cleaning.
Figure 4 shows that internal storage management system structural drawing of the present invention, comprise chained list creation module, memory management module; Wherein, described chained list creation module is connected with described memory management module;
Described chained list creation module, for create chained list to be cleaned, clean chained list and by the chained list described to be cleaned created, clean chained list and be sent to described memory management module;
Described memory management module, during for destroying virtual machine, being state to be cleaned by the memory marker in described virtual machine and putting into chained list to be cleaned; Time also for creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtaining corresponding internal memory, carry out allocation process.
Compared to prior art, according to a kind of EMS memory management process provided by the invention and system, by memory pages according to the need of cleaning, be divided into two classes: " clean " and " dirty ", mark memory setting classification is only needed when needing internal memory to clean, postpone internal memory cleaning operation whereby, and complete internal memory cleaning when system idles; If system load is higher, then complete internal memory cleaning again when applying for internal memory.Thus traditional isochronous memory cleaning operation is converted into asynchronous cleaning operation, by postponing internal memory cleaning, greatly reduces the time creating and destroy virtual machine and consume, having heightened the efficiency of management of hypervisor, improved Consumer's Experience.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (7)
1. an EMS memory management process, is characterized in that, comprises the following steps:
When destroying virtual machine, the memory marker in described virtual machine is state to be cleaned and puts into chained list to be cleaned;
When creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtain corresponding internal memory, carry out allocation process.
2. method according to claim 1, is characterized in that, pre-sets chained list to be cleaned, cleans chained list, stores internal memory to be cleaned respectively and has cleaned internal memory.
3. method according to claim 1, is characterized in that, when virtual machine monitor destroys virtual machine, the memory marker in described virtual machine is " dirty " and puts into dirty chained list.
4. method according to claim 1, is characterized in that, when virtual machine monitor creates virtual machine, first searches for corresponding internal memory from cleaning chained list, if search, then described Memory Allocation is given the virtual machine created; Otherwise, search in chained list to be cleaned, obtain corresponding internal memory to be cleaned and after described internal memory to be cleaned is cleaned, the Memory Allocation after cleaning given the virtual machine created.
5. method according to claim 4, is characterized in that, if search for the internal memory to be cleaned less than correspondence in chained list to be cleaned, then feedback creates virtual machine failure.
6. method according to claim 1, is characterized in that, if when system CPU is in idle condition, captures after an internal memory to be cleaned cleans, put into and clean chained list table tail from the gauge outfit of chained list to be cleaned.
7. an internal storage management system, is characterized in that, comprises chained list creation module, memory management module; Wherein, described chained list creation module is connected with described memory management module;
Described chained list creation module, for create chained list to be cleaned, clean chained list and by the chained list described to be cleaned created, clean chained list and be sent to described memory management module;
Described memory management module, during for destroying virtual machine, being state to be cleaned by the memory marker in described virtual machine and putting into chained list to be cleaned; Time also for creating virtual machine, according to default Memory Allocation Strategy, from corresponding chained list, obtaining corresponding internal memory, carry out allocation process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510018655.6A CN104536905B (en) | 2015-01-14 | 2015-01-14 | A kind of EMS memory management process and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510018655.6A CN104536905B (en) | 2015-01-14 | 2015-01-14 | A kind of EMS memory management process and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104536905A true CN104536905A (en) | 2015-04-22 |
CN104536905B CN104536905B (en) | 2018-02-02 |
Family
ID=52852435
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510018655.6A Active CN104536905B (en) | 2015-01-14 | 2015-01-14 | A kind of EMS memory management process and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104536905B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112114961A (en) * | 2020-08-21 | 2020-12-22 | 苏州浪潮智能科技有限公司 | Memory allocation method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904589B1 (en) * | 1998-12-23 | 2005-06-07 | International Business Machines Corporation | Virtual machine memory management |
CN102236603A (en) * | 2010-04-29 | 2011-11-09 | 国际商业机器公司 | Garbage recycling method and system in virtual environment |
CN102306126A (en) * | 2011-08-24 | 2012-01-04 | 华为技术有限公司 | Memory management method, device and system |
CN103365784A (en) * | 2013-06-27 | 2013-10-23 | 华为技术有限公司 | Method and device for memory recycle and allocation |
CN104102460A (en) * | 2014-07-23 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Cloud computing-based memory management method and device |
-
2015
- 2015-01-14 CN CN201510018655.6A patent/CN104536905B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6904589B1 (en) * | 1998-12-23 | 2005-06-07 | International Business Machines Corporation | Virtual machine memory management |
CN102236603A (en) * | 2010-04-29 | 2011-11-09 | 国际商业机器公司 | Garbage recycling method and system in virtual environment |
CN102306126A (en) * | 2011-08-24 | 2012-01-04 | 华为技术有限公司 | Memory management method, device and system |
CN103365784A (en) * | 2013-06-27 | 2013-10-23 | 华为技术有限公司 | Method and device for memory recycle and allocation |
CN104102460A (en) * | 2014-07-23 | 2014-10-15 | 浪潮(北京)电子信息产业有限公司 | Cloud computing-based memory management method and device |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112114961A (en) * | 2020-08-21 | 2020-12-22 | 苏州浪潮智能科技有限公司 | Memory allocation method and device |
CN112114961B (en) * | 2020-08-21 | 2022-05-31 | 苏州浪潮智能科技有限公司 | Memory allocation method and device |
Also Published As
Publication number | Publication date |
---|---|
CN104536905B (en) | 2018-02-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10884645B2 (en) | Virtual machine hot migration method, host machine and storage medium | |
CN105159777A (en) | Process memory collection method and apparatus | |
CN102917064B (en) | Based on the double hot standby method of privately owned cloud computing platform | |
CN103248696B (en) | Dynamic configuration method for virtual resource under a kind of cloud computing environment | |
Singh | Green computing strategies & challenges | |
Lee et al. | A dynamic resource management with energy saving mechanism for supporting cloud computing | |
CN105184501A (en) | Efficient asynchronous order processing method | |
CN105516325A (en) | Cloud load balancing method for carrying out elastic expansion and traffic distribution expansion according to application load | |
CN104601664A (en) | Cloud computing platform resource management and virtual machine dispatching control system | |
CN103984602A (en) | VM (virtual machine) resource scheduling method, device and system | |
CN104123171A (en) | Virtual machine migrating method and system based on NUMA architecture | |
CN106095576A (en) | Under virtualization multi-core environment, nonuniformity I/O accesses resources of virtual machine moving method | |
CN103106147B (en) | Memory allocation method and system | |
CN105573830A (en) | Virtual machine migration method | |
CN105335309A (en) | Data transmission method and computer | |
Jena et al. | Performance evaluation of energy efficient power models for digital cloud | |
CN104156257A (en) | Quick and efficient cloud service disk mirroring management method | |
CN104461706A (en) | Method and multiprocessing unit for sharing shared global variables | |
CN104461404A (en) | Metadata storage method, device and system | |
CN104536905A (en) | Memory management method and system | |
CN105141691A (en) | System and method for automatically expanding virtual machine cluster under cloud computing | |
Ortigoza et al. | A taxonomy on dynamic environments for provider-oriented virtual machine placement | |
CN107589972A (en) | A kind of method that Pod in Kubernetes shares IPC NameSpaces | |
CN105740041A (en) | Virtual machine online migration method and device | |
CN103530239A (en) | Method for improving performance of communication server by using memory pool |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |