CN105094980A - System for dynamically adjusting memories of virtual machines - Google Patents

System for dynamically adjusting memories of virtual machines Download PDF

Info

Publication number
CN105094980A
CN105094980A CN201410221620.8A CN201410221620A CN105094980A CN 105094980 A CN105094980 A CN 105094980A CN 201410221620 A CN201410221620 A CN 201410221620A CN 105094980 A CN105094980 A CN 105094980A
Authority
CN
China
Prior art keywords
memory
virtual machine
allocation
particular
server
Prior art date
Application number
CN201410221620.8A
Other languages
Chinese (zh)
Inventor
杨耀敏
吕盛宇
庞龙
李超
向军
Original Assignee
北京云巢动脉科技有限公司
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 北京云巢动脉科技有限公司 filed Critical 北京云巢动脉科技有限公司
Priority to CN201410221620.8A priority Critical patent/CN105094980A/en
Publication of CN105094980A publication Critical patent/CN105094980A/en

Links

Abstract

The invention provides a system for dynamically adjusting memories of virtual machines. The system comprises N servers and a memory management and distribution platform; each server is communicated with the memory management and distribution platform through a respective network communication interface; N virtual machines and a memory adjusting module are constructed on each server; a memory acquisition module is established in each virtual machine and used for acquiring the practical use value of the memory belonging to the virtual machine in the present moment in a timed manner and transferring the practical use value of the memory to the memory management and distribution platform through a virtual serial interface; the memory management and distribution platform judges whether the memory distribution condition of the special virtual machine is necessary to adjust or not according to a pre-set memory management strategy; if the memory distribution condition of the special virtual machine is necessary to adjust, the numerical value of the memory to be adjusted is calculated; and a memory adjustment instruction is generated and sent to the special server where the special virtual machine is. The memory distribution conditions of all the virtual machines on the plurality of servers can be dynamically adjusted in real time in the same operation environment; and thus, the resource utilization rate of the whole system is increased.

Description

一种虚拟机内存的动态调整系统 A kind of virtual machine memory dynamically adjust system

技术领域 FIELD

[0001] 本发明属于计算机网络技术领域,具体涉及一种虚拟机内存的动态调整系统。 [0001] The present invention belongs to the technical field of computer networks, particularly, to a virtual machine memory system dynamically adjusted.

背景技术 Background technique

[0002] 虚拟化技术通常是指在单个主机上虚拟化出多个独立的虚拟机,每一台虚拟机((Virtual Machine)为具有完整硬件系统功能、运行在一个完全隔离环境中的完整计算机系统。由于虚拟化技术可极大提高资源利用率,还具有方便管理和升级系统资源的优点,以及能够提供相互隔离、安全、高效的应用执行环境,目前已广泛应用于各个技术领域。 [0002] Virtualization technology generally refers to a single-host virtualization a plurality of independent virtual machines, each virtual machine ((Virtual Machine) is a function of a complete hardware system, a computer running a full completely isolated environment system. Because virtualization technology can greatly improve resource utilization, but also has the advantage of ease of management and upgrade system resources, and the ability to provide mutual isolation, safe and efficient application execution environment, has been widely used in various technical fields.

[0003] 但是,现有技术中,在主机上创建虚拟机时,需要在创建时为虚拟机分配固定内存,并且,各个虚拟机在运行时也占有该固定内存,该种固定内存分配方式具有以下不足:由于虚拟机在运行时对内存资源的需求是动态变化的,例如,在某一时刻,如果该虚拟机需要使用的内存资源小于初始分配的内存资源,则该种情况导致主机内存资源浪费,降低了主机可支持的虚拟机数量;在另一时刻,如果该虚拟机需要使用的内存资源大于初始分配的内存资源时,则将降低该虚拟机运行性能,甚至导致该虚拟机出现卡顿现象。 [0003] However, the prior art, when creating a virtual machine on the host, need to allocate memory for the virtual machine is fixed at the time of creation, and the respective virtual machine at runtime also has the fixed memory, the kind having a fixed memory allocation the following deficiencies: Because virtual machines at runtime demand for memory resources are dynamically changing, for example, at some point, if memory resources to the virtual machine you want to use less than the initial allocation of memory resources, the case led to the host memory resources waste and reduce the number of virtual machine host can support; at another time, if memory resources used by the virtual machine needs to be greater than the initial allocation of memory resources, the operating performance of the virtual machine will be reduced, or even cause the virtual machine to card Dayton phenomenon.

发明内容 SUMMARY

[0004] 针对现有技术存在的缺陷,本发明提供一种虚拟机内存的动态调整系统,在同一运行环境中,可动态实时调整多台服务器上所有虚拟机的内存分配情况,提高整个系统的资源利用率。 [0004] for the drawbacks of the prior art, the present invention provides a dynamic adjustment of virtual machine memory system, in the same operating environment, memory allocation can be dynamically adjusted in real time for all virtual machines on multiple servers, improve overall system resource utilization.

[0005] 本发明采用的技术方案如下: [0005] The present invention employs the following technical solutions:

[0006] 本发明提供一种虚拟机内存的动态调整系统,包括N台服务器和I个内存管理分配平台;每一台服务器均设置有网络通信接口;各台服务器通过各自的网络通信接口与所述内存管理分配平台通信;其中,N为自然数; [0006] The present invention provides a dynamic adjustment of virtual machine memory system, including N servers and a memory management allocation platform I; each server is provided with a network communication interface; through their respective servers and the network communication interface said memory allocation management platform communication; wherein, N is a natural number;

[0007] 其中,每一台服务器上均构建有η个虚拟机和一个内存调节模块;其中,η为自然数;每一个所述虚拟机内部均创建一个内存采集模块;所述内存采集模块用于定时采集其所属虚拟机在当前时刻的内存实际使用值,并将所述内存实际使用值及对应的虚拟机标识通过虚拟串口传递给所述网络通信接口; [0007] wherein, each built on each server has [eta] and a virtual machine memory adjustment module; wherein [eta] is a natural number; each of the virtual machines are created inside a memory acquisition module; said memory means for collecting timing acquisition memory in actual use of their respective virtual machine at the current time, and the actual value of the memory and the corresponding virtual machine identifier is transmitted to the network by virtual serial communication interface;

[0008] 所述网络通信接口用于将本台服务器中各个虚拟机上传的内存实际使用值及对应的虚拟机标识通过网络传输给所述内存管理分配平台; [0008] The network communication interface for this station in each of the virtual machine server memory upload actual values ​​and the corresponding virtual machine identifier to the network transmission allocation memory management platform;

[0009] 所述内存管理分配平台用于按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整,如果需要,则计算出需要调整的数值,生成内存调整指令,并将所述内存调整指令发送给所述特定虚拟机所在的特定服务器; [0009] The memory management platform for dispensing the need to adjust the memory allocation of a particular virtual machine according to a preset memory management scheme is determined, if needed, to calculate the value to be adjusted, the adjustment instruction generate a memory, and the adjustment command is sent to the memory of the particular server where the particular virtual machine;

[0010] 所述特定服务器在接收到对所述特定虚拟机的内存调整指令后,通过所述内存调节模块调整对所述特定虚拟机的内存分配情况。 [0010] The particular server after receiving the adjustment instruction memory for the particular virtual machine, by adjusting the memory allocation to the memory module to adjust the particular virtual machine.

[0011] 优选的,所述内存管理分配平台按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整,具体为: [0011] Preferably, the memory allocation management platform is necessary to adjust the memory allocation of a particular virtual machine according to a preset memory management scheme is determined, in particular:

[0012] 所述内存管理分配平台预先设定与特定虚拟机对应的初始参数值,包括:内存分配最大值mem_max ;内存最低变化值lowerLimit、内存最高变化值upperLimit ; [0012] The memory allocation management platform preset initial parameter values ​​corresponding to the specific virtual machine, comprising: a maximum memory allocation mem_max; LowerLimit minimum change value memory, the maximum value UpperLimit change memory;

[0013] 在T调整周期,设分配给特定虚拟机的内存值为mem_old ; [0013] In the adjustment period T, provided allocated to a particular virtual machine's memory is mem_old;

[0014] 在T+1调整周期,设内存采集模块上报的特定虚拟机当前时刻的内存实际使用值为mem_average ; [0014] in actual use in adjustment cycle T + 1, the memory acquisition module set reported by the particular virtual machine at the current time is mem_average;

[0015]则:计算 mem_old 与mem_average 的差值M: [0015] then: calculating a difference mem_average mem_old and M:

[0016] (I)如果M = O,则得出所述特定虚拟机的分配内存需要增加1werLimit的控制指令; [0016] (I), if M = O, the specific virtual machine to allocate memory is necessary to increase the draw of the control instruction 1werLimit;

[0017] (2)如果M > 0,则执行以下步骤: [0017] (2) If M> 0, performing the following steps:

[0018] 如果M〈 = lowerLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令; [0018] If M <= lowerLimit, it follows that the particular virtual memory machines require adjustment control instruction;

[0019] 如果lowerLimit〈M〈 = upperLimit,则得出所述特定虚拟机的分配内存需要回收lowerLimit的控制指令; [0019] If lowerLimit <M <= upperLimit, memory is allocated the particular virtual machine instruction LowerLimit stars need the recovery control;

[0020] 如果M>upperLimit,则得出所述特定虚拟机的分配内存需要回收(lowerLimit+upperLimit) /2 的控制指令; [0020] If M> upperLimit, the specific virtual machine to allocate memory is obtained needs to be recovered (lowerLimit + upperLimit) control command / 2;

[0021] (3)如果M < 0,则执行以下步骤: [0021] (3) If M <0, then perform the following steps:

[0022] 如果|M|〈 = lowerLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令; [0022] If | M | <= lowerLimit, it follows that the particular virtual memory machines require adjustment control instruction;

[0023] 如果lowerLimit〈 |M|〈 = upperLimit,则得出所述特定虚拟机的分配内存需要增加lowerLimit的控制指令; [0023] If lowerLimit <| M | <= upperLimit, memory is allocated the particular virtual machine control instructions necessary to increase the draw of LowerLimit;

[0024] 如果|M| >upperLimit,则得出所述特定虚拟机的分配内存需要增加(lowerLimit+upperLimit)/2 的控制指令。 [0024] If | M |> upperLimit, the memory is allocated a particular need to increase the derived virtual machine (lowerLimit + upperLimit) control command / 2.

[0025] 优选的,所述内存采集模块上报的特定虚拟机当前时刻的内存实际使用值mem_average具体为:预设定采样次数number,所述内存实际使用值mem_average为所述内存采集模块连续number次采样得到的内存实际使用值的平均值。 [0025] Preferably mem_average in actual use value of the acquisition memory module reports the current time to a particular virtual machine is specifically: the pre-set number of sampling times, the actual value memory to the memory acquisition module mem_average number of times sampling average value obtained in actual use of.

[0026] 优选的,所述虚拟机为基于QEMU之上的全虚拟化虚拟机。 [0026] Preferably, the virtual machine based on a virtual machine QEMU full virtualization.

[0027] 本发明的有益效果如下: [0027] Advantageous effects of the present invention are as follows:

[0028] 本发明提供的虚拟机内存的动态调整系统,通过外部程序即内存管理分配平台统一管理各服务器上虚拟机的动态分配决策,然后由每台服务器上的执行程序即内存调节模块对虚拟机内存进行独立调整,在保证各服务器上虚拟机使用性能的前提下,实现资源利用的最大化;而对于服务器,通过及时释放虚拟机的空闲内存资源,能够提高服务器支持的虚拟机数量。 [0028] The virtual machine memory system of the present invention provides dynamic adjustment by external program memory that is allocated internet management decisions unified management of dynamically allocated to each virtual machine server, and then executing the program by the server that is on each virtual memory adjustment module memory to be independently adjusted, to ensure each server virtual machine performance of the premise, to maximize the use of resources; and for the server, through the timely release of free memory resources to virtual machines, can increase the number of virtual machines supported by the server.

附图说明 BRIEF DESCRIPTION

[0029] 图1为本发明提供的虚拟机内存的动态调整系统的结构示意图。 Dynamic adjustment system structural diagram of virtual machine memory [0029] Figure 1 is provided herein.

具体实施方式 Detailed ways

[0030] 以下结合附图对本发明进行详细说明: [0030] conjunction with the drawings of the present invention in detail:

[0031] 本发明提供一种虚拟机内存的动态调整系统,需要强调的是,本发明涉及到的虚拟机为基于QEMU之上的全虚拟化虚拟机。 [0031] The present invention provides a dynamic adjustment of virtual machine memory system, it is emphasized that the present invention relates to a virtual machine based on virtual machines full virtualization of QEMU. QEMU是一套由Fabrice Bellard所编写的模拟处理器的自由软件,是基于GPL协议的开放源代码并且跨平台的虚拟机软件。 QEMU is a set of free software written by Fabrice Bellard analog processor, virtual machine software is based on open source GPL license and cross-platform. 其与Bochs,PearPC近似,但其具有某些后两者所不具备的特性,如高速度及跨平台的特性。 With Bochs, PearPC similar, but having both do not have some of the properties, characteristics such as high speed and the cross-platform. 经由kqemu这个开源的加速器,QEMU能模拟至接近真实电脑的速度。 Kqemu via this open source accelerator, QEMU able to simulate realistic computer speed. 全虚拟化是指虚拟机模拟了完整的底层硬件,包括处理器、物理内存、时钟、外设等,使得为原始硬件设计的操作系统或其它系统软件完全不做任何修改就可以在虚拟机中运行。 Full virtual machine is a virtual simulation of the complete underlying hardware, including a processor, physical memory, clocks, and other peripherals, such as the hardware design of the original operating system or other software systems can be completely without any modification in the virtual machine run.

[0032] 如图1所示,虚拟机内存的动态调整系统包括N台服务器和I个内存管理分配平台;每一台服务器均设置有网络通信接口;各台服务器通过各自的网络通信接口与所述内存管理分配平台通信;例如,基于TCP协议进行信息交互;其中,N为自然数; [0032] 1, the virtual machine memory system comprising dynamically adjusting the I and N servers memory allocation management platform; each server is provided with a network communication interface; through their respective servers and the network communication interface said memory allocation management internet communications; e.g., TCP-based protocol to exchange information; wherein, N is a natural number;

[0033] 其中,每一台服务器上均构建有η个虚拟机和一个内存调节模块;其中,η为自然数;每一个所述虚拟机内部均创建一个内存采集模块,所述内存采集模块用于定时采集其所属虚拟机在当前时刻的内存实际使用值,并将所述内存实际使用值及对应的虚拟机标识通过虚拟串口传递给所述网络通信接口;其中,内存采集模块是基于特定虚拟机系统的程序,可以基于windows系统,也可以基于Iinux系统;内存采集模块运行在虚拟机内部,需要根据操作系统不同做适配。 [0033] wherein, each built on each server has [eta] and a virtual machine memory adjustment module; wherein [eta] is a natural number; each of the virtual machines are created inside a memory acquisition module, the memory module is configured to capture timing acquisition their respective virtual machines in actual use value of the current time, and the actual value of the memory and the corresponding virtual machine identified by the network communications interface to the virtual serial transmission; wherein the acquisition memory module is based on a particular virtual machine program the system, it can be based on windows system, also based on Iinux system; acquisition memory modules running inside the virtual machine, the adapter needs to be done, depending on the operating system. 例如在windows虚拟机内,使用windows系统API函数GlobalMemoryStatusEx获取当前内存实际使用值;在Iinux虚拟机内,使用其他方式获取。 Windows in a virtual machine, for example, the use of windows system API function GlobalMemoryStatusEx obtain the current value in actual use; Iinux within the virtual machine, other ways acquired.

[0034] 所述网络通信接口用于将本台服务器中各个虚拟机上传的内存实际使用值及对应的虚拟机标识通过网络传输给所述内存管理分配平台; [0034] The network communication interface for this station in each of the virtual machine server memory upload actual values ​​and the corresponding virtual machine identifier to the network transmission allocation memory management platform;

[0035] 所述内存管理分配平台用于按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整,如果需要,则计算出需要调整的数值,生成内存调整指令,并将所述内存调整指令发送给所述特定虚拟机所在的特定服务器; [0035] The memory management platform for dispensing the need to adjust the memory allocation of a particular virtual machine according to a preset memory management scheme is determined, if needed, to calculate the value to be adjusted, the adjustment instruction generate a memory, and the adjustment command is sent to the memory of the particular server where the particular virtual machine;

[0036] 所述特定服务器在接收到对所述特定虚拟机的内存调整指令后,通过所述内存调节模块调整对所述特定虚拟机的内存分配情况。 The [0036] specific server after receiving the adjustment instruction memory for the particular virtual machine, the memory by adjusting module adjusts the memory allocation for said particular virtual machine.

[0037] 其中,内存管理分配平台按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整,具体为: [0037] where memory allocation management platform is necessary to adjust the memory allocation according to preset a particular virtual machine memory management policy decisions, in particular:

[0038] 所述内存管理分配平台预先设定与特定虚拟机对应的初始参数值,包括:内存分配最大值mem_max ;内存最低变化值lowerLimit、内存最高变化值upperLimit ;作为一种实现方式,可以设置lowerLimit和upperLimit为mem_max的一个分数值,例如,如果设置mem—max = 4G ; [0038] The memory allocation management platform and the preset initial parameter values ​​corresponding to the specific virtual machine, comprising: a maximum memory allocation mem_max; LowerLimit memory minimum change value, the highest change value memory UpperLimit; as an implementation may be provided lowerLimit upperLimit and a fractional value mem_max, e.g., if provided mem-max = 4G;

[0039]则 lowerLimit = mem—max/16 = 4G/16 = 0.25G ; [0039] the lowerLimit = mem-max / 16 = 4G / 16 = 0.25G;

[0040] upperLimit = mem—max*4/16 = 4*4G/16 = 1G。 [0040] upperLimit = mem-max * 4/16 = 4 * 4G / 16 = 1G.

[0041] 在T调整周期,设分配给特定虚拟机的内存值为mem_old ; [0041] In the adjustment period T, provided allocated to a particular virtual machine's memory is mem_old;

[0042] 在T+1调整周期,设内存采集模块上报的特定虚拟机当前时刻的内存实际使用值为mem_average ;其中,内存实际使用值mem_average为所述内存采集模块按预设定采样次数number连续number次采样得到的内存实际使用值的平均值。 [0042] in actual use in adjustment cycle T + 1, the memory acquisition module set reported by the particular virtual machine mem_average current time value; wherein, in actual use value of the memory mem_average acquisition module according to a preset sampling frequency and number of continuous in actual use of the average value of number of samples obtained. 例如,预设定采样次数number = 5次,则mem_average值为内存采集模块连续5次采集得到的内存使用值的平均值。 For example, the sampling frequency and the preset number = 5 times, the average value of the memory using the values ​​mem_average memory acquisition module obtained by collecting five consecutive times.

[0043]则:计算 mem_old 与mem_average 的差值M: [0043] then: calculating a difference mem_average mem_old and M:

[0044] (I)如果M = O,则得出所述特定虚拟机的分配内存需要增加lowerLimit的控制指令; [0044] (I), if M = O, the specific virtual machine to allocate memory is necessary to increase the draw of the control instruction lowerLimit;

[0045] 例如,如果mem_old = 4G, mem_average = 4G,即:特定虚拟机当前时刻的内存实际使用值与内存管理分配平台为其分配的内存值相等,则为了保证特定虚拟机的运行性能,需要增加分配给该特征虚拟机的内存值。 [0045] For example, if mem_old = 4G, mem_average = 4G, namely: the value equal to the actual memory allocation and memory management platform specific virtual machine assigned to the current time value memory, in order to ensure the running performance of a particular virtual machine, it is necessary increasing the memory allocated to the feature value of the virtual machine.

[0046] (2)如果M > 0,则执行以下步骤: [0046] (2) If M> 0, performing the following steps:

[0047] 如果M〈 = lowerLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令; [0047] If M <= lowerLimit, it follows that the particular virtual memory machines require adjustment control instruction;

[0048] 如果lowerLimit〈M〈 = upperLimit,则得出所述特定虚拟机的分配内存需要回收lowerLimit的控制指令; [0048] If lowerLimit <M <= upperLimit, memory is allocated the particular virtual machine instruction LowerLimit stars need the recovery control;

[0049] 如果M>upperLimit,则得出所述特定虚拟机的分配内存需要回收(lowerLimit+upperLimit) /2 的控制指令; [0049] If M> upperLimit, the specific virtual machine to allocate memory is obtained needs to be recovered (lowerLimit + upperLimit) control command / 2;

[0050] (3)如果M < 0,则执行以下步骤: [0050] (3) If M <0, then perform the following steps:

[0051] 如果|M|〈 = lowerLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令; [0051] If | M | <= lowerLimit, it follows that the particular virtual memory machines require adjustment control instruction;

[0052] 如果lowerLimit〈 |M|〈 = upperLimit,则得出所述特定虚拟机的分配内存需要增加lowerLimit的控制指令; [0052] If lowerLimit <| M | <= upperLimit, memory is allocated the particular virtual machine control instructions necessary to increase the draw of LowerLimit;

[0053] 如果|M| >upperLimit,则得出所述特定虚拟机的分配内存需要增加(lowerLimit+upperLimit)/2 的控制指令。 [0053] If | M |> upperLimit, the memory is allocated a particular need to increase the derived virtual machine (lowerLimit + upperLimit) control command / 2.

[0054] 通过上述内存调整策略,可以有效保证对各个服务器内存分配情况进行平缓调整,防止服务器分配内存变化幅度过大。 [0054] By the above-described memory adjustment strategy, can effectively guarantee to each server memory allocation for flatter, the server allocates memory to prevent excessive variation width.

[0055] 通过上述描述可以看出,本发明中,内存管理分配平台用于负责当前环境中一台或多台服务器的内存统一决策,而非仅仅是针对特定某一台服务器进行内存决策的。 [0055] As can be seen from the above description, the present invention, the memory allocation management platform is responsible for the current environment, a memory or a unified decision servers, not only is a memory for a particular decision servers.

[0056] 另外,采用本发明提供的虚拟机内存的动态调整系统进行内存动态调整时,仅是对虚拟机内存进行调整,不会影响到虚拟机的创建过程,因此,具有易于推广、对现有系统修改较小等优点。 [0056] In addition, the present invention provides dynamic adjustment of virtual machine memory system to adjust the dynamic memory, the virtual machine memory is only adjusted without affecting the creation of a virtual machine, therefore, have easy to spread, on the existing The system has advantages of a small modification. 此外,每台虚拟机均通过自身配置的单独QEMU管理维护资源,因此,各台虚拟机之间的资源是不共享的,提高了虚拟机使用的安全性。 In addition, each virtual machine resources are maintained by a separate QEMU manage their configuration, therefore, each virtual machine resources between is not shared, improve the safety of virtual machines.

[0057] 本方法是通过对虚拟机实际使用内存进行监控,通过调节QEMU虚拟出的内存大小进行动态调节的。 [0057] The present process is monitored by the virtual machine to the actual memory, dynamically adjusted by adjusting the QEMU virtual memory size. 其处理方式是通过每台虚拟机实际使用内存的情况进行控制的,各虚拟机之间并没有关联,内存调节只与服务器上整体资源有关。 Its approach is practical by each virtual machine memory usage controls, and between the virtual machine and is not associated with memory adjustment only on the overall resources on the server.

[0058] 综上所述,本发明提供的虚拟机内存的动态调整系统,通过外部程序即内存管理分配平台统一管理各服务器上虚拟机的动态分配决策,然后由每台服务器上的执行程序即内存调节模块对虚拟机内存进行独立调整,在保证各服务器上虚拟机使用性能的前提下,实现资源利用的最大化;而对于服务器,通过及时释放虚拟机的空闲内存资源,能够提高服务器支持的虚拟机数量。 [0058] In summary, the dynamic adjustment of virtual machine memory system provided by the present invention, i.e., by external program memory allocation management platform unified management decisions dynamically allocated to each virtual machine server, and a program that is executed by the server on each memory module adjust virtual machine memory for independent adjustment, under the premise of ensuring the use of virtual machines on each server performance, and maximize the use of resources; and for the server, through the timely release of free memory resources to virtual machines, improve server can support the number of virtual machines.

[0059] 以上所述仅是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视本发明的保护范围。 [0059] The above are only preferred embodiments of the present invention, it should be noted that those of ordinary skill in the art, in the present invention without departing from the principles of the premise, can make various improvements and modifications, such modifications and modifications should also depend on the scope of the present invention.

Claims (4)

1.一种虚拟机内存的动态调整系统,其特征在于,包括N台服务器和I个内存管理分配平台;每一台服务器均设置有网络通信接口;各台服务器通过各自的网络通信接口与所述内存管理分配平台通信;其中,N为自然数; 其中,每一台服务器上均构建有η个虚拟机和一个内存调节模块;其中,η为自然数;每一个所述虚拟机内部均创建一个内存采集模块;所述内存采集模块用于定时采集其所属虚拟机在当前时刻的内存实际使用值,并将所述内存实际使用值及对应的虚拟机标识通过虚拟串口传递给所述网络通信接口; 所述网络通信接口用于将本台服务器中各个虚拟机上传的内存实际使用值及对应的虚拟机标识通过网络传输给所述内存管理分配平台; 所述内存管理分配平台用于按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整, A virtual machine memory dynamically adjust system comprising N servers and a memory management allocation platform I; each server is provided with a network communication interface; through their respective servers and the network communication interface said memory management allocation internet communication; wherein, N is a natural number; wherein each server are constructed with [eta] virtual machine and a memory adjustment module; wherein [eta] is a natural number; each of said internal virtual machines are created a memory acquisition module; the memory module is used for timing acquisition memory acquisition in actual use of their respective virtual machine at the current time, and the actual value of the memory and the corresponding virtual machine identifier is transmitted to the network by virtual serial communication interface; the network communication interface for this station in each of the virtual machine server memory upload actual values ​​and the corresponding virtual machine identifier assigned to the memory management platform through the network transmission; the memory management platform for allocation according to a preset a memory management scheme to determine whether to adjust the memory allocation of a specific virtual machine, 果需要,则计算出需要调整的数值,生成内存调整指令,并将所述内存调整指令发送给所述特定虚拟机所在的特定服务器; 所述特定服务器在接收到对所述特定虚拟机的内存调整指令后,通过所述内存调节模块调整对所述特定虚拟机的内存分配情况。 If desired, the calculated value to be adjusted, the adjustment instruction generate a memory, the memory and the instruction to adjust a particular server where the particular virtual machine; server receives the specific memory for the particular virtual machine after adjustment command, to the memory by adjusting the memory allocation module to adjust the particular virtual machine.
2.根据权利要求1所述的虚拟机内存的动态调整系统,其特征在于,所述内存管理分配平台按照预设的内存管理策略判断是否需要对特定虚拟机的内存分配情况进行调整,具体为: 所述内存管理分配平台预先设定与特定虚拟机对应的初始参数值,包括:内存分配最大值mem_max ;内存最低变化值lowerLimit、内存最高变化值upperLimit ; 在T调整周期,设分配给特定虚拟机的内存值为mem_old ; 在T+1调整周期,设内存采集模块上报的特定虚拟机当前时刻的内存实际使用值为mem_average ; 则:计算mem_old与mem_average的差值M: (1)如果M = O,则得出所述特定虚拟机的分配内存需要增加1werLimit的控制指令; (2)如果M > 0,则执行以下步骤: 如果M〈 = lowerLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令;如果lowerLimit〈M〈 = upperLimit,则得出所述特定虚拟机的分配内存需要回收 The virtual machine memory dynamically adjusting system according to claim 1, characterized in that, if the memory allocation management platform needs to adjust the memory allocation of a particular virtual machine according to a preset memory management scheme is determined, in particular : the allocation memory management platform and the preset initial parameter values ​​corresponding to the specific virtual machine, comprising: a maximum memory allocation mem_max; LowerLimit memory minimum change value, the maximum variation value UpperLimit memory; the adjustment period T, provided allocated to a particular virtual memory value mem_old machine; in actual use in the adjustment period T + 1, the memory acquisition module set reported by the particular virtual machine mem_average current time value; is: and calculating the difference M mem_old mem_average of: (1) if M = O, it follows that the need to allocate memory for a particular virtual machine instruction 1werLimit increase control; and (2) if M> 0, perform the following steps: If M <= lowerLimit, it follows that the memory is not the particular virtual machine We need to adjust the control command; if lowerLimit <M <= upperLimit, it follows that the allocation of memory to be recovered specific virtual machine 1werLimit的控制指令; 如果M>upperLimit,则得出所述特定虚拟机的分配内存需要回收(lowerLimit+upperLimit) /2 的控制指令; (3)如果M < 0,则执行以下步骤: 如果|M|〈 = 1werLimit,则得出所述特定虚拟机的内存不需要进行调整的控制指令;如果lowerLimit〈 |M|〈 = upperLimit,则得出所述特定虚拟机的分配内存需要增加1werLimit的控制指令; 如果|M| >upperLimit,则得出所述特定虚拟机的分配内存需要增加(lowerLimit+upperLimit)/2 的控制指令。 1werLimit the control command; if M> upperLimit, it follows that the allocation of memory to be recovered particular virtual machine (lowerLimit + upperLimit) control command / 2; (3) If M <0, perform the following steps: If | M | <= 1werLimit, it follows that the particular virtual memory machines require adjustment control instruction; if lowerLimit <| M | <= upperLimit, allocating memory needs of the particular virtual machine instruction 1werLimit increase control of stars ; If | M |> upperLimit, the memory is allocated a particular need to increase the derived virtual machine (lowerLimit + upperLimit) control command / 2.
3.根据权利要求2所述的虚拟机内存的动态调整系统,其特征在于,所述内存采集模块上报的特定虚拟机当前时刻的内存实际使用值menuaverage具体为:预设定采样次数number,所述内存实际使用值mem_average为所述内存采集模块连续number次采样得到的内存实际使用值的平均值。 The virtual machine memory dynamically adjusting system according to claim 2, wherein the memory module to the memory acquisition reported by the particular virtual machine at the current time in actual use menuaverage specifically: Number preset number of samples, the said memory mem_average actual value of the average value of the actual memory acquisition memory module number of consecutive samples obtained.
4.根据权利要求1-3任一项所述的虚拟机内存的动态调整系统,其特征在于,所述虚拟机为基于QEMU之上的全虚拟化虚拟机。 The virtual machine memory dynamically adjusting system according to any one of claims 1-3, wherein the virtual machine based on virtual QEMU full virtual machine.
CN201410221620.8A 2014-05-23 2014-05-23 System for dynamically adjusting memories of virtual machines CN105094980A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410221620.8A CN105094980A (en) 2014-05-23 2014-05-23 System for dynamically adjusting memories of virtual machines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410221620.8A CN105094980A (en) 2014-05-23 2014-05-23 System for dynamically adjusting memories of virtual machines

Publications (1)

Publication Number Publication Date
CN105094980A true CN105094980A (en) 2015-11-25

Family

ID=54575488

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410221620.8A CN105094980A (en) 2014-05-23 2014-05-23 System for dynamically adjusting memories of virtual machines

Country Status (1)

Country Link
CN (1) CN105094980A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050262505A1 (en) * 2004-05-21 2005-11-24 Esfahany Kouros H Method and apparatus for dynamic memory resource management
WO2011041615A1 (en) * 2009-09-30 2011-04-07 Citrix Systems, Inc. Dynamic reallocation of physical memory responsive to virtual machine events
GB2493812A (en) * 2011-08-16 2013-02-20 Esds Software Solution Pvt Ltd Scaling resources for virtual machines, using comparison with established threshold values
WO2013078588A1 (en) * 2011-11-28 2013-06-06 华为技术有限公司 Method and device for adjusting memories of virtual machines
CN103430159A (en) * 2011-03-13 2013-12-04 国际商业机器公司 Dynamic memory management in a virtualized computing environment
CN103605613A (en) * 2013-11-21 2014-02-26 中标软件有限公司 Method and system for dynamically adjusting virtual-machine memory in cloud computing environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050262505A1 (en) * 2004-05-21 2005-11-24 Esfahany Kouros H Method and apparatus for dynamic memory resource management
WO2011041615A1 (en) * 2009-09-30 2011-04-07 Citrix Systems, Inc. Dynamic reallocation of physical memory responsive to virtual machine events
CN103430159A (en) * 2011-03-13 2013-12-04 国际商业机器公司 Dynamic memory management in a virtualized computing environment
GB2493812A (en) * 2011-08-16 2013-02-20 Esds Software Solution Pvt Ltd Scaling resources for virtual machines, using comparison with established threshold values
WO2013078588A1 (en) * 2011-11-28 2013-06-06 华为技术有限公司 Method and device for adjusting memories of virtual machines
CN103605613A (en) * 2013-11-21 2014-02-26 中标软件有限公司 Method and system for dynamically adjusting virtual-machine memory in cloud computing environment

Similar Documents

Publication Publication Date Title
Baccarelli et al. Energy-efficient dynamic traffic offloading and reconfiguration of networked data centers for big data stream mobile computing: review, challenges, and a case study
Wood et al. CloudNet: dynamic pooling of cloud resources by live WAN migration of virtual machines
Dixit et al. ElastiCon; an elastic distributed SDN controller
CN101557420B (en) Realization method of high-efficiency network communication of a virtual machine monitor
CN104025549A (en) Techniques associated with server transaction latency information
CN102427475A (en) Load balance scheduling system in cloud computing environment
CN102307133B (en) Virtual machine scheduling method for public cloud platform
CN102170474A (en) Method and system for dynamic scheduling of virtual resources in cloud computing network
WO2015024368A1 (en) Component oriented hybrid cloud operating system architecture and communication method thereof
CN100511151C (en) Multiple-path multiple-core server and CPU virtualization processing method thereof
CN103870341A (en) Method and system of adjusting resources of virtual machine
CN101951411A (en) Cloud scheduling system and method and multistage cloud scheduling system
WO2014063463A1 (en) Method, device and physical host for managing physical network card
CN102053873B (en) Method for ensuring fault isolation of virtual machines of cache-aware multi-core processor
CN103605567B (en) Cloud computing task scheduling method for real-time changes in demand
US9176767B2 (en) Network interface card device pass-through with multiple nested hypervisors
US8949847B2 (en) Apparatus and method for managing resources in cluster computing environment
Graubner et al. Energy-efficient management of virtual machines in eucalyptus
CN102662750A (en) Virtual machine resource optimal control method and control system based on elastic virtual machine pool
CN101256550B (en) Parallelization estimation system for complex electric network phase synchronization
CN102650950B (en) Platform architecture supporting multi-GPU (Graphics Processing Unit) virtualization and work method of platform architecture
US9727386B2 (en) Method and apparatus for network resource virtual partitioning
Goyal et al. Cloudsim: simulator for cloud computing infrastructure and modeling
CN103916396B (en) An example based on the automatic telescoping method adaptive load application cloud platform
CN103810023B (en) Intelligent deployment method and system for distributed applications in cloud platform

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination
AD01 Patent right deemed abandoned