[go: up one dir, main page]

CN104102460A - Cloud computing-based memory management method and device - Google Patents

Cloud computing-based memory management method and device Download PDF

Info

Publication number
CN104102460A
CN104102460A CN201410352763.2A CN201410352763A CN104102460A CN 104102460 A CN104102460 A CN 104102460A CN 201410352763 A CN201410352763 A CN 201410352763A CN 104102460 A CN104102460 A CN 104102460A
Authority
CN
China
Prior art keywords
address space
remote
free memory
extended address
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.)
Pending
Application number
CN201410352763.2A
Other languages
Chinese (zh)
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201410352763.2A priority Critical patent/CN104102460A/en
Publication of CN104102460A publication Critical patent/CN104102460A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

本发明提供了一种基于云计算的内存管理方法及装置,应用于云计算平台中;方法包括:采用逻辑扩展地址空间扩展本地的物理地址空间;采用全局扩展地址空间记录被本地使用的远程空闲内存;根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。本发明能够优化云计算中内存资源的利用。

The present invention provides a cloud computing-based memory management method and device, which are applied to a cloud computing platform; the method includes: expanding the local physical address space by using a logically extended address space; memory; performing bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules. The invention can optimize the utilization of memory resources in cloud computing.

Description

一种基于云计算的内存管理方法及装置A memory management method and device based on cloud computing

技术领域technical field

本发明涉及计算机领域,具体涉及种基于云计算的内存管理方法及装置。The present invention relates to the field of computers, in particular to a memory management method and device based on cloud computing.

背景技术Background technique

云计算的兴起正在逐渐地改变整个计算机产业界和学术界,这种把计算机作为一种效能(utility)工具、把软件作为一种服务来使用计算机的方式为计算机软件和硬件设计都带来了巨大的挑战。在软件的构建和分发方式上,SOA(面向服务的软件结构)和SaaS(软件即服务)正越来越多地成为云计算模式下的软件构建和分发的核心方式。而对于支撑服务运行的底层计算基础设施,挑战主要集中在两个方面:系统软件和硬件。其中,自适应性资源配置是系统软件面临的最大挑战,如何分配资源又是这个挑战的最核心问题。根据峰值负载来静态分配资源,会带来资源的严重浪费。据统计,在当前的数据中心中,CPU资源的利用率平均在5%~20%之间,而内存资源的利用率也不超过60%。很明显,当前的资源分配模式具有很高的资源浪费度,增加了用户的总体拥有成本(TCO)。而以平均负载为基准来静态分配资源则会使得在峰值负载的情况下服务质量下降,并最终影响云用户的潜在利润。The rise of cloud computing is gradually changing the entire computer industry and academia. This way of using computers as a utility tool and software as a service has brought new challenges to both computer software and hardware design. huge challenge. In terms of software construction and distribution methods, SOA (Service-Oriented Software Architecture) and SaaS (Software as a Service) are increasingly becoming the core methods of software construction and distribution under the cloud computing model. As for the underlying computing infrastructure that supports the operation of services, the challenges mainly focus on two aspects: system software and hardware. Among them, adaptive resource allocation is the biggest challenge faced by system software, and how to allocate resources is the core issue of this challenge. Static allocation of resources based on peak loads will result in serious waste of resources. According to statistics, in current data centers, the utilization rate of CPU resources is between 5% and 20% on average, and the utilization rate of memory resources does not exceed 60%. Obviously, the current resource allocation mode has a high degree of resource waste, which increases the user's total cost of ownership (TCO). Statically allocating resources based on the average load will degrade the service quality under peak load conditions, and ultimately affect the potential profit of cloud users.

发明内容Contents of the invention

本发明要解决的技术问题是如何优化云计算中内存资源的利用。The technical problem to be solved by the present invention is how to optimize the utilization of memory resources in cloud computing.

为了解决上述问题,本发明提供了一种基于云计算的内存管理方法,应用于云计算平台中,包括:In order to solve the above problems, the present invention provides a memory management method based on cloud computing, which is applied in a cloud computing platform, including:

采用逻辑扩展地址空间扩展本地的物理地址空间;Expand the local physical address space by using the logical extension address space;

采用全局扩展地址空间记录被本地使用的远程空闲内存;Use the global extended address space to record the remote free memory used locally;

根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The bidirectional mapping between the global extended address space and the logical extended address space is performed according to a predetermined rule.

可选地,所述全局扩展地址空间包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。Optionally, the global extended address space includes an identifier of a remote server where the remote free memory is located and an address segment of the remote free memory in the remote server.

可选地,根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间。Optionally, when the bidirectional mapping between the global extended address space and the logical extended address space is performed according to predetermined rules, the remote free memory of multiple remote servers is mapped to one logical extended address space.

可选地,所述的方法还包括:Optionally, the method also includes:

当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。When the remote free memory exits, copy the data in the remote free memory to the remote free memory provided by another remote server page by page, add the remote free memory provided by the other remote server into the global extended address space, And mapped to the same segment of logical extended address space originally mapped by the exited remote free memory.

可选地,所述的方法还包括:Optionally, the method also includes:

对所述远程空闲内存进行读写的命令通过Xen和Domain0之间的共享缓冲区由Xen发出,由Domain0中的Sw ap守护进程进行处理。The command that reads and writes to the remote free memory is sent by Xen through the shared buffer between Xen and Domain0, and is processed by the Swap daemon process in Domain0.

一种基于云计算的内存管理装置,应用于云计算平台中,包括:A memory management device based on cloud computing, applied to a cloud computing platform, comprising:

虚拟机监控器,用于采用逻辑扩展地址空间扩展本地的物理地址空间;The virtual machine monitor is used to expand the local physical address space by using the logically extended address space;

控制台,用于采用全局扩展地址空间记录被本地使用的远程空闲内存;The console is used to record the remote free memory used locally by using the global extended address space;

地址映射模块,用于根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The address mapping module is configured to perform bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules.

可选地,所述全局扩展地址空间包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。Optionally, the global extended address space includes an identifier of a remote server where the remote free memory is located and an address segment of the remote free memory in the remote server.

可选地,所述地址映射模块根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间。Optionally, when the address mapping module performs bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules, the remote free memory of multiple remote servers is mapped to one logical extended address space.

可选地,所述地址映射模块还用于当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。Optionally, the address mapping module is also used to copy the data in the remote free memory to the remote free memory provided by another remote server page by page when the remote free memory exits, and the data provided by the other remote server The remote free memory is added to the global extended address space, and mapped to the same segment of logical extended address space originally mapped by the withdrawn remote free memory.

本发明针对虚拟化云计算平台下的内存优化需要,构建了一种利用虚拟化技术来无缝聚合闲置内存资源的机制;在虚拟化云计算基础设施之上,引入了一种基于逻辑扩展地址空间和全局扩展地址空间的双层地址空间映射机制;利用该机制,重构了虚拟化云平台下内存层次结构,构建了基于冗余备份机制的高可靠性的扩展内存区来优化内存利用;通过扩展虚拟机监控器,实现了一种对虚拟机透明的闲置(及利用率不高的)页面回收机制,该机制对于不适合修改操作系统代码而进行空闲内存回收的情形具有特别的意义。本发明通过跨越物理平台的寻址技术,实现对于远程空闲内存资源的访问,可以将低利用率的内存调配给内存利用率高的虚拟机使用,从而优化了整个内存资源的利用。Aiming at the needs of memory optimization under the virtualized cloud computing platform, the present invention constructs a mechanism for seamlessly aggregating idle memory resources by using virtualization technology; The double-layer address space mapping mechanism of space and global extended address space; using this mechanism, the memory hierarchy under the virtualized cloud platform is reconstructed, and a high-reliability extended memory area based on a redundant backup mechanism is constructed to optimize memory utilization; By extending the virtual machine monitor, an idle (and low-utilization) page recovery mechanism transparent to the virtual machine is realized. This mechanism has special significance for the situation where the idle memory recovery is not suitable for modifying the operating system code. The present invention realizes access to remote idle memory resources through the addressing technology across physical platforms, and can allocate memory with low utilization rate to virtual machines with high memory utilization rate, thereby optimizing the utilization of the entire memory resource.

附图说明Description of drawings

图1为使用了实施例一的方法的系统示意图;Fig. 1 is a schematic diagram of a system using the method of Embodiment 1;

图2为映射示意图;Figure 2 is a schematic diagram of mapping;

图3是内存服务器页状态转换图;Fig. 3 is a state transition diagram of a memory server page;

图4是扩展的Xen系统示意图;Fig. 4 is a schematic diagram of the extended Xen system;

图5是实施例二的装置的示意图。Fig. 5 is a schematic diagram of the device of the second embodiment.

具体实施方式Detailed ways

下面将结合附图及实施例对本发明的技术方案进行更详细的说明。The technical solution of the present invention will be described in more detail below with reference to the drawings and embodiments.

需要说明的是,如果不冲突,本发明实施例以及实施例中的各个特征可以相互结合,均在本发明的保护范围之内。另外,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。It should be noted that, if there is no conflict, the embodiments of the present invention and various features in the embodiments can be combined with each other, and all are within the protection scope of the present invention. In addition, although a logical order is shown in the flowcharts, in some cases the steps shown or described may be performed in an order different from that shown or described herein.

实施例一、一种基于云计算的内存管理方法,包括:Embodiment 1. A memory management method based on cloud computing, comprising:

采用逻辑扩展地址空间扩展本地的物理地址空间;Expand the local physical address space by using the logical extension address space;

采用全局扩展地址空间记录被本地使用的远程空闲内存;Use the global extended address space to record the remote free memory used locally;

根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The bidirectional mapping between the global extended address space and the logical extended address space is performed according to a predetermined rule.

为了能够利用分布在整个平台各个物理服务器上的空闲内存资源,考虑到分布式平台的特性,本实施例引入了一个由双层地址空间映射构成的分布式内存池。双层地址空间的构建兼顾了效率和可靠性,提供最大程度的内存资源抽象。如图1所示,云计算平台中的各节点(节点1、节点2、……、节点n)中,虚拟机(VM)里低利用率的内存(比如图1里节点1和节点2中VM#1的内存)集中到空闲资源池,再提供给高利用率内存所在的虚拟机(比如图1里节点2和节点n中VM#k的内存)使用。In order to utilize free memory resources distributed on each physical server of the entire platform, this embodiment introduces a distributed memory pool composed of two-layer address space mapping in consideration of the characteristics of the distributed platform. The construction of the double-layer address space takes into account both efficiency and reliability, and provides the greatest degree of abstraction of memory resources. As shown in Figure 1, in each node (node 1, node 2, ..., node n) in the cloud computing platform, memory with low utilization rate in the virtual machine (VM) (such as in node 1 and node 2 in Figure 1 The memory of VM#1) is collected into the free resource pool, and then provided to the virtual machine where the memory with high utilization rate is located (such as the memory of VM#k in node 2 and node n in Figure 1).

本实施例的一种实施方式中,所述全局扩展地址空间包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。In an implementation manner of this embodiment, the global extended address space includes a remote server identifier where the remote free memory is located and an address segment of the remote free memory in the remote server.

本实施方式中,所述全局扩展地址空间可以采用<服务器ID,地址段>来标示远程空闲内存的地址构成;用于记录同一个远程服务器的多个远程空闲内存的全局扩展地址空间中,远程服务器标识相同,而地址段各不相同。In this embodiment, the global extended address space can use <server ID, address segment> to mark the address of the remote free memory; in the global extended address space used to record multiple remote free memories of the same remote server, the remote The server IDs are the same, but the address segments are different.

本实施方式中,可以根据空闲内存变化动态地调整全局扩展地址空间。远程服务器的空闲内存采用全局扩展地址空间标示后,再被映射到逻辑扩展地址空间。In this implementation manner, the global extended address space can be dynamically adjusted according to changes in free memory. After the free memory of the remote server is marked with the global extended address space, it is mapped to the logical extended address space.

本实施例的一种实施方式中,根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间;这样可以实现数据的冗余存储,提高远程内存的可靠性。In an implementation manner of this embodiment, when the two-way mapping between the global extended address space and the logical extended address space is performed according to predetermined rules, the remote free memory of multiple remote servers is mapped to one logical extended address space; Realize redundant storage of data and improve the reliability of remote memory.

本实施方式如图2所示,逻辑扩展地址空间中同一段地址空间可以通过全局扩展地址空间分别与不同服务器、不同内存中的远程空闲内存相映射。In this embodiment, as shown in FIG. 2 , the same segment of address space in the logical extended address space can be mapped to different servers and remote free memories in different memories through the global extended address space.

远程内存系统的设计需要考虑两个方面的要求:(1)尽量缩短访存延迟,提高效率;(2)分布式系统的可靠性问题,提供可靠稳定的基于内存的存储服务。本实施方式充分考虑了这两个方面的要求,通过全局扩展地址空间到逻辑扩展地址空间的多对一映射机制来达到高效可靠的目的。The design of the remote memory system needs to consider two requirements: (1) shorten the memory access delay as much as possible to improve efficiency; (2) the reliability of the distributed system, and provide reliable and stable memory-based storage services. This embodiment fully considers the requirements of these two aspects, and achieves the purpose of high efficiency and reliability through a many-to-one mapping mechanism from the global extended address space to the logical extended address space.

本实施例的一种实施方式中,采用地址映射组件提供全局扩展地址空间和逻辑扩展地址空间之间的双向映射。In an implementation manner of this embodiment, an address mapping component is used to provide bidirectional mapping between the global extended address space and the logical extended address space.

本实施方式中,通过维护相关的映射关系来提供高效可靠的远程内存存储抽象。地址映射组件支持两类基本的数据操作:数据存取和数据同步。其中,数据存取是基本的远程内存操作,实现对于远程数据的读取和写入。数据同步操作为远程空闲内存的退出提供支持。In this embodiment, an efficient and reliable remote memory storage abstraction is provided by maintaining related mapping relationships. The address mapping component supports two basic types of data operations: data access and data synchronization. Among them, data access is a basic remote memory operation, which realizes reading and writing of remote data. Data synchronization operations provide support for remote free memory eviction.

本实施例的一种实施方式中,所述方法还可以包括:In an implementation manner of this embodiment, the method may further include:

当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。When the remote free memory exits, copy the data in the remote free memory to the remote free memory provided by another remote server page by page, add the remote free memory provided by the other remote server into the global extended address space, And mapped to the same segment of logical extended address space originally mapped by the exited remote free memory.

本实施方式中,当一个远程服务器因为自身负载增加需要收回共享的内存或者远程服务器无法正常提供内存服务时,系统会主动或被动地启动数据同步操作来迁移数据备份到其它远程服务器上。采用数据同步方法从退出空闲内存的服务器迁移数据到其它远程服务器,可以实现数据存储的高可靠性,保证数据的有效性。In this embodiment, when a remote server needs to reclaim shared memory due to an increase in its own load or the remote server cannot provide memory services normally, the system will actively or passively start a data synchronization operation to migrate data back up to other remote servers. Using the data synchronization method to migrate data from the server exiting free memory to other remote servers can achieve high reliability of data storage and ensure data validity.

内存服务器页的状态转换如图3所示,对未初始化的页进行远程写或同步写后,页状态变为脏;对未初始化的页进行同步读或对脏页进行远程读后,页状态变为空闲;对空闲状态的页进行同步写后状态仍为空闲,进行远程写后变为脏;对脏页进行同步读后状态仍为脏。The state transition of the memory server page is shown in Figure 3. After remote writing or synchronous writing of uninitialized pages, the page status becomes dirty; after synchronous reading of uninitialized pages or remote reading of dirty pages, the page status becomes idle; the state is still idle after synchronous writing to the idle page, and becomes dirty after remote writing; the state is still dirty after synchronous reading of the dirty page.

本实施例的一种实施方式中,所述远程空闲内存除了包括未被分配的内存或虚拟机主动共享的内存外,还可以包括虚拟机内部由于数据访问模式的限制所存在的部分已经分配使用,但访问频率极低的内存空间。In an implementation of this embodiment, in addition to unallocated memory or memory actively shared by the virtual machine, the remote free memory may also include the part of the virtual machine that has been allocated and used due to the limitation of the data access mode. , but the memory space with extremely low access frequency.

为了最大程度地增加内存的共享度,本实施方式引入了一种对虚拟机透明的空闲页面回收技术。为了实现对于页面的透明回收,本实施方式扩展Xen(一种开放源代码虚拟机监视器)虚拟机监控器以实现基于内存页面访问信息的动态"偷取"运行时系统。In order to maximize memory sharing, this embodiment introduces a free page reclamation technology that is transparent to virtual machines. In order to realize the transparent reclamation of pages, this embodiment extends the Xen (an open source virtual machine monitor) virtual machine monitor to implement a dynamic "stealing" runtime system based on memory page access information.

扩展的Xen虚拟机监控器如图4所示,完成两个核心功能:(1)引入了逻辑扩展地址空间以支持远程内存访问;(2)对不在本地内存的页面提供透明寻址支持。The extended Xen virtual machine monitor, as shown in Figure 4, completes two core functions: (1) introduces logical extended address space to support remote memory access; (2) provides transparent addressing support for pages not in local memory.

为了支持逻辑扩展地址空间,本实施方式修改了Xen虚拟机监控器中从虚假物理地址到机器地址的映射(p2m机制)部分,增加了新的地址类型来标示逻辑扩展地址空间。In order to support the logically extended address space, this embodiment modifies the mapping (p2m mechanism) from the virtual physical address to the machine address in the Xen virtual machine monitor, and adds a new address type to mark the logically extended address space.

当虚拟机访问逻辑扩展地址空间时,要么会触发一次缺页异常,要么触发逻辑扩展地址空间寻址机制。通过缺页异常处理和指令运行回滚运行时,虚拟机被暂停执行以等待页面重新被装入本地内存;当页面被重新装入本地内存时,p2m被重新设置以指向新装入的内存页面。如果是半虚拟化情况,缺页异常的处理流程会继续。而在全虚拟化时,异常重播机制将发挥作用以重新调度虚拟机执行,恢复异常的处理过程。When the virtual machine accesses the logical extended address space, it will either trigger a page fault exception, or trigger the logical extended address space addressing mechanism. When running through page fault exception handling and instruction execution rollback, the virtual machine is suspended to wait for the page to be reloaded into the local memory; when the page is reloaded into the local memory, p2m is reset to point to the newly loaded memory page . In the case of paravirtualization, the process of page fault exception processing will continue. In the case of full virtualization, the exception replay mechanism will play a role to reschedule the execution of the virtual machine and restore the abnormal processing process.

指令运行回滚运行时系统截取在指令模拟执行过程中对逻辑扩展地址空间的访问,触发逻辑扩展地址空间访问异常并逐级往上层函数传递,直到执行逻辑到达虚拟机陷入到Xen的入口点。在那里,虚拟机被暂停,对逻辑扩展地址空间的操作命令通过共享内存空间传递给Domain0。当数据返回后,指令模拟操作或异常处理操作被继续执行,虚拟机重新被调度。The system intercepts the access to the logical extension address space during the instruction simulation execution process, triggers the access exception of the logical extension address space, and passes it to the upper layer function step by step until the execution logic reaches the entry point where the virtual machine falls into Xen. There, the virtual machine is suspended, and the operation commands on the logical extended address space are passed to Domain0 through the shared memory space. After the data is returned, the instruction simulation operation or exception handling operation is continued, and the virtual machine is rescheduled.

本实施方式中,对远程空闲内存进行读写的命令通过Xen和Domain0之间的共享缓冲区由Xen发出,Domain0中的Sw ap守护进程负责具体处理。这样做的原因在于Xen本身缺乏网络协议栈,且这样的设计可以很大程度地提高系统弹性。In this embodiment, the command that reads and writes remote free memory is sent by Xen through the shared buffer between Xen and Domain0, and the Swap daemon process in Domain0 is responsible for specific processing. The reason for this is that Xen itself lacks a network protocol stack, and such a design can greatly improve system flexibility.

在Domain0中,本实施方式实现了弹性的全局扩展地址空间管理机制。其中,每段连续的地址空间(地址段)由一个地址空间描述符和空间范围来表示,每个远程服务器可以包含一个或多个地址空间。通过映射多个地址空间到同一段逻辑扩展地址空间上,可以实现数据的冗余存储。通过模块的形式,本实施方式支持两种形式的外部存储:远程空闲内存和本地内存。把本地内存和远程内存叠加映射,可以获取具有高可靠性、高性能的附加存储系统。In Domain0, this embodiment implements a flexible global expansion address space management mechanism. Wherein, each segment of continuous address space (address segment) is represented by an address space descriptor and space range, and each remote server may contain one or more address spaces. Redundant storage of data can be realized by mapping multiple address spaces to the same logical extended address space. In the form of modules, this embodiment supports two forms of external storage: remote free memory and local memory. By overlaying and mapping local memory and remote memory, an additional storage system with high reliability and high performance can be obtained.

本实施方式可以通过mmap的方式实现基于共享页的、与Xen之间的信息通信,Xen通过共享的消息通道传递请求给Domain0。在Domain0中,守护进程KXenSw ap内核线程被创建以相应从Xen中发出的控制命令,如远程内存的读写操作。当KXenSw ap通过驱动完成了相关命令后,一个新的Hypercall被调用通知Xen完成后续的p2m表修改、页表更新等过程以恢复虚拟机的调度执行。In this embodiment, information communication with Xen based on a shared page can be realized through mmap, and Xen transmits a request to Domain0 through a shared message channel. In Domain0, the KXenSwap kernel thread of the daemon process is created to respond to control commands issued from Xen, such as read and write operations of remote memory. When KXenSwap completes the relevant commands through the driver, a new Hypercall is invoked to notify Xen to complete the subsequent p2m table modification, page table update and other processes to resume the scheduling execution of the virtual machine.

实施例二、一种基于云计算的内存管理装置,应用于云计算平台中,如图5所示,包括:Embodiment 2. A memory management device based on cloud computing is applied to a cloud computing platform, as shown in FIG. 5 , including:

虚拟机监控器,用于采用逻辑扩展地址空间扩展本地的物理地址空间;The virtual machine monitor is used to expand the local physical address space by using the logically extended address space;

控制台,用于采用全局扩展地址空间记录被本地使用的远程空闲内存;The console is used to record the remote free memory used locally by using the global extended address space;

地址映射模块,用于根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The address mapping module is configured to perform bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules.

本实施例中,所述地址映射模块也可以作为地址映射组件集成在所述控制台中(如图5所示);虚拟机的内存空间除了来源于本地内存外,还来源于逻辑扩展地址空间通过全局扩展地址空间所映射的远程空闲内存;本地内存还可以为控制台提供内存空间。In this embodiment, the address mapping module can also be integrated in the console as an address mapping component (as shown in Figure 5); the memory space of the virtual machine is not only derived from the local memory, but also derived from the logical extended address space through Remote free memory mapped by the global extended address space; local memory can also provide memory space for the console.

本实施例的一种实施方式中,所述全局扩展地址空间可以包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。In an implementation manner of this embodiment, the global extended address space may include a remote server identifier where the remote free memory is located and an address segment of the remote free memory in the remote server.

本实施例的一种实施方式中,所述地址映射模块根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间。In an implementation of this embodiment, when the address mapping module performs bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules, it maps remote free memory of multiple remote servers to a logical extended address space.

本实施例的一种实施方式中,所述地址映射模块还用于当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。In an implementation manner of this embodiment, the address mapping module is also used to copy the data in the remote free memory to the remote free memory provided by another remote server page by page when the remote free memory exits, and the The remote free memory provided by another remote server is added to the global extended address space, and mapped to the same section of logical extended address space originally mapped by the withdrawn remote free memory.

本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,所述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明不限制于任何特定形式的硬件和软件的结合。Those skilled in the art can understand that all or part of the steps in the above method can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, and the like. Optionally, all or part of the steps in the foregoing embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, or may be implemented in the form of software function modules. The present invention is not limited to any specific combination of hardware and software.

当然,本发明还可有其他多种实施例,在不背离本发明精神及其实质的情况下,熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形,但这些相应的改变和变形都应属于本发明的权利要求的保护范围。Of course, the present invention can also have other various embodiments, and those skilled in the art can make various corresponding changes and deformations according to the present invention without departing from the spirit and essence of the present invention, but these corresponding Changes and deformations should all belong to the protection scope of the claims of the present invention.

Claims (9)

1.一种基于云计算的内存管理方法,应用于云计算平台中,包括:1. A memory management method based on cloud computing, applied in a cloud computing platform, comprising: 采用逻辑扩展地址空间扩展本地的物理地址空间;Expand the local physical address space by using the logical extension address space; 采用全局扩展地址空间记录被本地使用的远程空闲内存;Use the global extended address space to record the remote free memory used locally; 根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The bidirectional mapping between the global extended address space and the logical extended address space is performed according to a predetermined rule. 2.如权利要求1所述的方法,其特征在于:2. The method of claim 1, wherein: 所述全局扩展地址空间包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。The global extended address space includes the remote server identifier where the remote free memory is located and the address segment of the remote free memory in the remote server. 3.如权利要求1所述的方法,其特征在于:3. The method of claim 1, wherein: 根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间。When the two-way mapping between the global extended address space and the logical extended address space is performed according to predetermined rules, the remote free memory of multiple remote servers is mapped to one logical extended address space. 4.如权利要求1所述的方法,其特征在于,还包括:4. The method of claim 1, further comprising: 当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。When the remote free memory exits, copy the data in the remote free memory to the remote free memory provided by another remote server page by page, add the remote free memory provided by the other remote server into the global extended address space, And mapped to the same segment of logical extended address space originally mapped by the exited remote free memory. 5.如权利要求1所述的方法,其特征在于,还包括:5. The method of claim 1, further comprising: 对所述远程空闲内存进行读写的命令通过Xen和Domain0之间的共享缓冲区由Xen发出,由Domain0中的Sw ap守护进程进行处理。The command that reads and writes to the remote free memory is sent by Xen through the shared buffer between Xen and Domain0, and is processed by the Swap daemon process in Domain0. 6.一种基于云计算的内存管理装置,应用于云计算平台中,其特征在于,包括:6. A memory management device based on cloud computing, applied in a cloud computing platform, is characterized in that, comprising: 虚拟机监控器,用于采用逻辑扩展地址空间扩展本地的物理地址空间;The virtual machine monitor is used to expand the local physical address space by using the logically extended address space; 控制台,用于采用全局扩展地址空间记录被本地使用的远程空闲内存;The console is used to record the remote free memory used locally by using the global extended address space; 地址映射模块,用于根据预定规则进行所述全局扩展地址空间与所述逻辑扩展地址空间之间的双向映射。The address mapping module is configured to perform bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules. 7.如权利要求6所述的装置,其特征在于:7. The device of claim 6, wherein: 所述全局扩展地址空间包括远程空闲内存所在的远程服务器标识及远程空闲内存在该远程服务器中的地址段。The global extended address space includes the remote server identifier where the remote free memory is located and the address segment of the remote free memory in the remote server. 8.如权利要求6所述的装置,其特征在于:8. The device of claim 6, wherein: 所述地址映射模块根据预定规则进行全局扩展地址空间与逻辑扩展地址空间之间的双向映射时,是将多个远程服务器的远程空闲内存映射到一个逻辑扩展地址空间。When the address mapping module performs bidirectional mapping between the global extended address space and the logical extended address space according to predetermined rules, the remote free memory of multiple remote servers is mapped to one logical extended address space. 9.如权利要求6所述的装置,其特征在于:9. The device of claim 6, wherein: 所述地址映射模块还用于当远程空闲内存退出时,将该远程空闲内存中的数据逐页复制到另外的远程服务器提供的远程空闲内存中,将该另外的远程服务器提供的远程空闲内存加入所述全局扩展地址空间中,并映射到所退出的远程空闲内存原先所映射的同一段逻辑扩展地址空间上。The address mapping module is also used to copy the data in the remote free memory to the remote free memory provided by another remote server page by page when the remote free memory exits, and add the remote free memory provided by the other remote server to The global extended address space is mapped to the same section of logical extended address space originally mapped by the withdrawn remote free memory.
CN201410352763.2A 2014-07-23 2014-07-23 Cloud computing-based memory management method and device Pending CN104102460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410352763.2A CN104102460A (en) 2014-07-23 2014-07-23 Cloud computing-based memory management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410352763.2A CN104102460A (en) 2014-07-23 2014-07-23 Cloud computing-based memory management method and device

Publications (1)

Publication Number Publication Date
CN104102460A true CN104102460A (en) 2014-10-15

Family

ID=51670642

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410352763.2A Pending CN104102460A (en) 2014-07-23 2014-07-23 Cloud computing-based memory management method and device

Country Status (1)

Country Link
CN (1) CN104102460A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536905A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Memory management method and system
CN104657198A (en) * 2015-01-24 2015-05-27 深圳职业技术学院 Memory access optimization method and memory access optimization system for NUMA (Non-Uniform Memory Access) architecture system in virtual machine environment
CN105278880A (en) * 2015-10-19 2016-01-27 浪潮电子信息产业股份有限公司 Cloud computing virtualization-based memory optimization device and method
CN105988871A (en) * 2015-01-27 2016-10-05 华为技术有限公司 Remote memory allocation method, device and system
CN106445691A (en) * 2016-11-25 2017-02-22 郑州云海信息技术有限公司 Memory optimization method oriented to virtual cloud computing platform
CN107786599A (en) * 2016-08-26 2018-03-09 北京计算机技术及应用研究所 Internal memory cloud system
WO2021218038A1 (en) * 2020-04-28 2021-11-04 华为技术有限公司 Storage system, memory management method, and management node
CN116684496A (en) * 2023-06-28 2023-09-01 建信金融科技有限责任公司 Cluster resource management method, device, equipment and medium

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536905A (en) * 2015-01-14 2015-04-22 浪潮(北京)电子信息产业有限公司 Memory management method and system
CN104536905B (en) * 2015-01-14 2018-02-02 浪潮(北京)电子信息产业有限公司 A kind of EMS memory management process and system
CN104657198A (en) * 2015-01-24 2015-05-27 深圳职业技术学院 Memory access optimization method and memory access optimization system for NUMA (Non-Uniform Memory Access) architecture system in virtual machine environment
CN104657198B (en) * 2015-01-24 2017-12-26 深圳职业技术学院 NUMA architecture system memory access optimization method in a virtual machine environment and system
CN105988871A (en) * 2015-01-27 2016-10-05 华为技术有限公司 Remote memory allocation method, device and system
CN105278880A (en) * 2015-10-19 2016-01-27 浪潮电子信息产业股份有限公司 Cloud computing virtualization-based memory optimization device and method
CN107786599A (en) * 2016-08-26 2018-03-09 北京计算机技术及应用研究所 Internal memory cloud system
CN107786599B (en) * 2016-08-26 2020-07-17 北京计算机技术及应用研究所 Memory cloud system
CN106445691A (en) * 2016-11-25 2017-02-22 郑州云海信息技术有限公司 Memory optimization method oriented to virtual cloud computing platform
WO2021218038A1 (en) * 2020-04-28 2021-11-04 华为技术有限公司 Storage system, memory management method, and management node
US11861204B2 (en) 2020-04-28 2024-01-02 Huawei Technologies Co., Ltd. Storage system, memory management method, and management node
CN116684496A (en) * 2023-06-28 2023-09-01 建信金融科技有限责任公司 Cluster resource management method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10552337B2 (en) Memory management and device
CN104102460A (en) Cloud computing-based memory management method and device
US9529611B2 (en) Cooperative memory resource management via application-level balloon
CN110597451B (en) A method for realizing virtualized cache and physical machine
US8997098B2 (en) Hypervisor-based server duplication system and method and storage medium storing server duplication computer program
US9582221B2 (en) Virtualization-aware data locality in distributed data processing
CN101727331B (en) Method and equipment for upgrading client operating system of active virtual machine
CN102779074B (en) Internal memory resource distribution method based on internal memory hole mechanism
CN103176845B (en) A virtual machine deployment method, system and device
US10534720B2 (en) Application aware memory resource management
TWI646423B (en) Mapping mechanism for large shared address spaces
US20160266923A1 (en) Information processing system and method for controlling information processing system
US20090307432A1 (en) Memory management arrangements
CN111880891B (en) Microkernel-based scalable virtual machine monitor and embedded system
US11199972B2 (en) Information processing system and volume allocation method
US20130254500A1 (en) Storage apparatus, computer system, and control method for storage apparatus
CN106230986A (en) Resource adaptation scheduling system and method based on electric power PaaS cloud platform
EP2375324A2 (en) Virtualization apparatus for providing a transactional input/output interface
US10341177B2 (en) Parallel computing system and migration method
CN106445691A (en) Memory optimization method oriented to virtual cloud computing platform
WO2024051292A1 (en) Data processing system, memory mirroring method and apparatus, and computing device
CN105677481A (en) Method and system for processing data and electronic equipment
CN107832097A (en) Data load method and device
CN102622304A (en) A memory optimization method for double-layer address space mapping
CN114860439B (en) A memory allocation method, host machine, distributed system and program product

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141015

RJ01 Rejection of invention patent application after publication