WO2022199206A9 - 用于虚拟机的内存共享方法及装置 - Google Patents
用于虚拟机的内存共享方法及装置 Download PDFInfo
- Publication number
- WO2022199206A9 WO2022199206A9 PCT/CN2022/070263 CN2022070263W WO2022199206A9 WO 2022199206 A9 WO2022199206 A9 WO 2022199206A9 CN 2022070263 W CN2022070263 W CN 2022070263W WO 2022199206 A9 WO2022199206 A9 WO 2022199206A9
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual machine
- homogeneous
- virtual machines
- memory
- virtual
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000006835 compression Effects 0.000 claims abstract description 69
- 238000007906 compression Methods 0.000 claims abstract description 69
- 238000012544 monitoring process Methods 0.000 claims abstract description 11
- 230000004044 response Effects 0.000 claims description 35
- 230000005012 migration Effects 0.000 claims description 20
- 238000013508 migration Methods 0.000 claims description 20
- 238000004590 computer program Methods 0.000 claims description 10
- 238000010586 diagram Methods 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 7
- 230000008569 process Effects 0.000 description 7
- 238000012545 processing Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45591—Monitoring or debugging support
Definitions
- the embodiments of the present application relate to the field of computer technology, and in particular to a memory sharing method and device for a virtual machine.
- Virtual machine memory over-commit technology is mainly divided into three categories, memory swapping (Swapping), ballooning (Ballooning), and page sharing (Page Sharing).
- the kernel scans the memory of the running process through KSM (Kernel Samepage Merging, Kernel Samepage Merging). If identical memory pages are found, they will be merged into a single memory page. If multiple virtual machines run the same OS (Operating System) or application and are not updated frequently, using KSM can greatly improve memory usage efficiency and performance.
- the monitoring of the virtual machines in the virtual machine set and determining the homogeneous virtual machines in the virtual machine set include: determining the homogeneous virtual machines in the virtual machine set that include the same memory page based on a hash value comparison algorithm. machine, and the number of identical memory pages in a homogeneous virtual machine.
- the embodiment of the present application provides a memory sharing device for virtual machines, including: a first determination unit configured to monitor the virtual machines in the virtual machine set, and determine the homogeneous virtual machines in the virtual machine set , wherein, the homogeneous virtual machine is used to represent a virtual machine with the same memory page; the migration unit is configured to migrate a virtual machine whose number of the same memory page in the homogeneous virtual machine exceeds a preset threshold to the target host machine; shared The unit is configured to compress the memory of the homogeneous virtual machine on the target host machine, so as to realize the memory sharing of the same memory page by the homogeneous virtual machine.
- the above-mentioned apparatus further includes: a second determining unit configured to determine the state of a configuration switch representing whether to perform memory sharing; and a first determining unit further configured to: respond to determining that the configuration switch is in an on state , monitor the virtual machines in the virtual machine set, and determine the homogeneous virtual machines in the virtual machine set.
- the terminal devices 101, 102, and 103 may be hardware devices or software that support network connections for data interaction and data processing.
- the terminal devices 101, 102, 103 are hardware, they can be various electronic devices that support network connection, information acquisition, interaction, display, processing and other functions, including but not limited to smartphones, tablet computers, e-book readers, Laptops and desktop computers and more.
- the terminal devices 101, 102, 103 are software, they can be installed in the electronic devices listed above. It can be implemented, for example, as a plurality of software or software modules for providing distributed services, or as a single software or software module. No specific limitation is made here.
- the server may be hardware or software.
- the server can be implemented as a distributed server cluster composed of multiple servers, or as a single server.
- the server is software, it can be implemented as multiple software or software modules (such as software or software modules for providing distributed services), or as a single software or software module. No specific limitation is made here.
- the above-mentioned executive body can monitor all virtual machines running on the cloud platform as a collection of virtual machines.
- the execution subject may determine, based on a hash value comparison algorithm, the homogeneous virtual machines in the virtual machine set that include the same memory page, and the number of the same memory page in the homogeneous virtual machine. quantity.
- the virtual machines corresponding to the same memory pages that meet the first preset attribute are migrated to the target host machine.
- the virtual machines 3021 , 3022 , 3023 , 3024 whose number of identical memory pages in the homogeneous virtual machines exceeds a preset threshold are migrated to the target host machine 303 . Furthermore, the homogeneous virtual machines 3021, 3022, 3023, and 3024 on the target host machine 303 perform memory compression on the same memory page, and implement memory sharing for the same memory page by the homogeneous virtual machines.
- FIG. 4 shows a schematic process 400 of an embodiment of a memory sharing method for virtual machines according to the present application, including the following steps:
- Step 403 determine whether the application in the homogeneous virtual machine has a high availability requirement, and determine whether the memory compression operation for the same memory page that meets the first preset attribute in the virtual machine whose number of the same memory page exceeds a preset threshold Whether the compressed memory exceeds the compression threshold.
- the sharing unit 503 is further configured to: perform memory compression on the homogeneous virtual machines on the same target host machine, and realize memory sharing of the same memory pages by the homogeneous virtual machines .
- the above-mentioned device further includes: a second determination unit (not shown in the figure), configured to determine the state of a configuration switch indicating whether memory sharing is performed; and a first determination unit 501. It is further configured to: in response to determining that the configuration switch is turned on, monitor virtual machines in the virtual machine set, and determine homogeneous virtual machines in the virtual machine set.
- Computer program code for carrying out the operations of this application may be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional procedural programming language—such as "C" or a similar programming language.
- the program code may execute entirely on the client computer, partly on the client computer, as a stand-alone software package, partly on the client computer and partly on a remote computer or entirely on the remote computer or server.
- the remote computer can be connected to the client computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
- LAN local area network
- WAN wide area network
- Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (18)
- 一种用于虚拟机的内存共享方法,包括:监控虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机,其中,所述同质虚拟机用于表征存在相同内存页的虚拟机;将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至目标宿主机上;将所述目标宿主机上的同质虚拟机进行内存压缩,实现所述同质虚拟机针对于相同内存页的内存共享。
- 根据权利要求1所述的方法,其中,所述将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至目标宿主机上,包括:确定所述同质虚拟机中的应用是否具有高可用需求;响应于确定所述同质虚拟机中的应用具有高可用需求,将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至不同的目标宿主机上。
- 根据权利要求2所述的方法,其中,所述响应于确定所述同质虚拟机中的应用具有高可用需求,将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至不同的目标宿主机上,包括:响应于确定所述同质虚拟机中的应用具有高可用需求,确定所述高可用需求的高可用程度;根据所述高可用程度,确定目标宿主机的数量;将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至所述数量的目标宿主机上。
- 根据权利要求2所述的方法,其中,所述将所述目标宿主机上的同质虚拟机进行内存压缩,实现所述同质虚拟机针对于相同内存页的内存共享,包括:将同一目标宿主机上的同质虚拟机进行内存压缩,实现所述同质虚拟机针对于相同内存页的内存共享。
- 根据权利要求1所述的方法,其中,所述将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至目标宿主机上,包括:确定相同内存页的数量超过预设阈值的虚拟机中,针对于符合第一预设属性的相同内存页的内存压缩操作所压缩的内存是否超过压缩阈值;响应于确定所述内存压缩操作所压缩的内存超过所述压缩阈值,将相同内存页的数量超过预设阈值的虚拟机中,符合所述第一预设属性的相同内存页所对应的虚拟机迁移至所述目标宿主机上。
- 根据权利要求5所述的方法,其中,还包括:响应于确定所述内存压缩操作所压缩的内存未超过所述压缩阈值,将相同内存页的数量超过预设阈值的虚拟机中,符合所述第一预设属性的相同内存页所对应的虚拟机,以及符合第二预设属性的相同内存页所对应的虚拟机迁移至所述目标宿主机上。
- 根据权利要求1所述的方法,其中,所述监控虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机,包括:基于哈希值比对算法,确定所述虚拟机集合中包括相同内存页的同质虚拟机,以及所述同质虚拟机中相同内存页的数量。
- 根据权利要求1所述的方法,其中,在所述监控虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机之前,还包括:确定表征是否进行内存共享的配置开关的状态;以及所述监控虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机,包括:响应于确定所述配置开关处于开启状态,监控所述虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机。
- 一种用于虚拟机的内存共享装置,包括:第一确定单元,被配置成监控虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机,其中,所述同质虚拟机用于表征存在相同内存页的虚拟机;迁移单元,被配置成将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至目标宿主机上;共享单元,被配置成将所述目标宿主机上的同质虚拟机进行内存压缩,实现所述同质虚拟机针对于相同内存页的内存共享。
- 根据权利要求9所述的装置,其中,所述迁移单元,进一步被配置成:确定所述同质虚拟机中的应用是否具有高可用需求;响应于确定所述同质虚拟机中的应用具有高可用需求,将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至不同的目标宿主机上。
- 根据权利要求10所述的装置,其中,所述迁移单元,进一步被配置成:响应于确定所述同质虚拟机中的应用具有高可用需求,确定所述高可用需求的高可用程度;根据所述高可用程度,确定目标宿主机的数量;将所述同质虚拟机中相同内存页的数量超过预设阈值的虚拟机迁移至所述数量的目标宿主机上。
- 根据权利要求10所述的装置,其中,所述共享单元,进一步被配置成:将同一目标宿主机上的同质虚拟机进行内存压缩,实现所述同质虚拟机针对于相同内存页的内存共享。
- 根据权利要求9所述的装置,其中,所述迁移单元,进一步被配置成:确定相同内存页的数量超过预设阈值的虚拟机中,针对于符合第一预设属性的相同内存页的内存压缩操作所压缩的内存是否超过压缩阈值;响应于确定所述内存压缩操作所压缩的内存超过所述压缩阈值,将相同内存页的数量超过预设阈值的虚拟机中,符合所述第一预设属性的相同内存页所对应的虚拟机迁移至所述目标宿主机上。
- 根据权利要求13所述的装置,其中,所述迁移单元,进一步被配置成:响应于确定所述内存压缩操作所压缩的内存未超过所述压缩阈值,将相同内存页的数量超过预设阈值的虚拟机中,符合所述第一预设属性的相同内存页所对应的虚拟机,以及符合第二预设属性的相同内存页所对应的虚拟机迁移至所述目 标宿主机上。
- 根据权利要求9所述的装置,其中,所述第一确定单元,进一步被配置成:基于哈希值比对算法,确定所述虚拟机集合中包括相同内存页的同质虚拟机,以及所述同质虚拟机中相同内存页的数量。
- 根据权利要求9所述的装置,其中,还包括:第二确定单元,被配置成确定表征是否进行内存共享的配置开关的状态;以及所述第一确定单元,进一步被配置成:响应于确定所述配置开关处于开启状态,监控所述虚拟机集合中的虚拟机,确定所述虚拟机集合中的同质虚拟机。
- 一种计算机可读介质,其上存储有计算机程序,其中,所述程序被处理器执行时实现如权利要求1-8中任一所述的方法。
- 一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-8中任一所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US18/260,751 US20240061701A1 (en) | 2021-03-26 | 2022-01-05 | Memory sharing method and device for virtual machines |
JP2023540882A JP2024506131A (ja) | 2021-03-26 | 2022-01-05 | 仮想マシンのメモリ共有方法および装置 |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110324549.6 | 2021-03-26 | ||
CN202110324549.6A CN113076175B (zh) | 2021-03-26 | 2021-03-26 | 用于虚拟机的内存共享方法及装置 |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2022199206A1 WO2022199206A1 (zh) | 2022-09-29 |
WO2022199206A9 true WO2022199206A9 (zh) | 2023-08-17 |
Family
ID=76610391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/070263 WO2022199206A1 (zh) | 2021-03-26 | 2022-01-05 | 用于虚拟机的内存共享方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20240061701A1 (zh) |
JP (1) | JP2024506131A (zh) |
CN (1) | CN113076175B (zh) |
WO (1) | WO2022199206A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113076175B (zh) * | 2021-03-26 | 2022-09-30 | 北京汇钧科技有限公司 | 用于虚拟机的内存共享方法及装置 |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8631405B2 (en) * | 2010-02-26 | 2014-01-14 | Red Hat Israel, Ltd. | Identification and placement of new virtual machines based on similarity of software configurations with hosted virtual machines |
US9317314B2 (en) * | 2010-06-29 | 2016-04-19 | Microsoft Techology Licensing, Llc | Techniques for migrating a virtual machine using shared storage |
CN103019884B (zh) * | 2012-11-21 | 2015-07-01 | 北京航空航天大学 | 基于虚拟机快照的内存页去重方法及装置 |
CN104050008B (zh) * | 2013-03-15 | 2018-01-23 | 中兴通讯股份有限公司 | 一种内存超分配管理系统及方法 |
CN105786585B (zh) * | 2014-12-15 | 2019-01-29 | 中国电信股份有限公司 | 在线迁移内存数据的系统和方法 |
CN108399101B (zh) * | 2017-02-06 | 2021-03-16 | 腾讯科技(深圳)有限公司 | 资源调度的方法、装置和系统 |
CN111651236A (zh) * | 2020-05-11 | 2020-09-11 | 腾讯科技(深圳)有限公司 | 虚拟机内存优化处理方法及相关装置 |
CN111708653B (zh) * | 2020-05-29 | 2023-08-08 | 北京百度网讯科技有限公司 | 内存故障处理方法、装置、电子设备和存储介质 |
CN113076175B (zh) * | 2021-03-26 | 2022-09-30 | 北京汇钧科技有限公司 | 用于虚拟机的内存共享方法及装置 |
-
2021
- 2021-03-26 CN CN202110324549.6A patent/CN113076175B/zh active Active
-
2022
- 2022-01-05 US US18/260,751 patent/US20240061701A1/en active Pending
- 2022-01-05 JP JP2023540882A patent/JP2024506131A/ja active Pending
- 2022-01-05 WO PCT/CN2022/070263 patent/WO2022199206A1/zh active Application Filing
Also Published As
Publication number | Publication date |
---|---|
CN113076175B (zh) | 2022-09-30 |
JP2024506131A (ja) | 2024-02-09 |
US20240061701A1 (en) | 2024-02-22 |
CN113076175A (zh) | 2021-07-06 |
WO2022199206A1 (zh) | 2022-09-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8495625B1 (en) | Method and system for creation of streamed files on-demand | |
WO2021139224A1 (zh) | 云场景下的文件备份方法、装置、介质、电子设备 | |
CN107729570B (zh) | 用于服务器的数据迁移方法和装置 | |
US11076020B2 (en) | Dynamically transitioning the file system role of compute nodes for provisioning a storlet | |
US20200042345A1 (en) | Volume management by virtual machine affiliation auto-detection | |
US20190138375A1 (en) | Optimization of message oriented middleware monitoring in heterogenenous computing environments | |
US20200349122A1 (en) | Snapshot management in distributed file systems | |
CN110781159B (zh) | Ceph目录文件信息读取方法、装置、服务器及存储介质 | |
WO2022199206A9 (zh) | 用于虚拟机的内存共享方法及装置 | |
CN111338834A (zh) | 数据存储方法和装置 | |
CN110582752B (zh) | 不考虑特定实体类型而在连接的一组实体中传播信息的系统和方法 | |
US10740144B2 (en) | Controlling asynchronous tasks | |
US8874628B1 (en) | Systems and methods for projecting hierarchical storage management functions | |
US11153227B1 (en) | Managing communication between microservices | |
JP7431490B2 (ja) | 階層型ストレージ管理システムにおけるデータ・マイグレーション | |
US8583852B1 (en) | Adaptive tap for full virtual machine protection | |
CN111767169A (zh) | 数据处理方法、装置、电子设备及存储介质 | |
US8225009B1 (en) | Systems and methods for selectively discovering storage devices connected to host computing devices | |
US11301156B2 (en) | Virtual disk container and NVMe storage management system and method | |
US11340964B2 (en) | Systems and methods for efficient management of advanced functions in software defined storage systems | |
US11178216B2 (en) | Generating client applications from service model descriptions | |
US9160610B1 (en) | Method and apparatus for coordinating service execution within a shared file system environment to optimize cluster performance | |
CN113781154A (zh) | 一种信息回滚方法、系统、电子设备及存储介质 | |
CN112749042B (zh) | 一种应用运行方法和装置 | |
US20220141079A1 (en) | System and method for mitigating analytics loads between hardware devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22773871 Country of ref document: EP Kind code of ref document: A1 |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2023540882 Country of ref document: JP |
|
WWE | Wipo information: entry into national phase |
Ref document number: 18260751 Country of ref document: US |
|
WWE | Wipo information: entry into national phase |
Ref document number: 11202305626X Country of ref document: SG |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 15/02/2024) |