A memory management method and apparatus based on a cloud management platform

By proactively identifying and reclaiming idle storage units of virtualized instances through the cloud management platform, the problem of low memory reclamation efficiency in virtualized environments is solved, achieving more efficient resource utilization and stable operation of virtualized instances.

CN122086582APending Publication Date: 2026-05-26HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
Filing Date
2024-11-26
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In a virtualized environment, the process of reclaiming memory only after other virtual machines (VMs) actively report that memory is available leads to low memory reclamation efficiency on the physical host.

Method used

The cloud management platform proactively identifies idle storage units that need to be reclaimed from virtualized instances. By acquiring storage information and reclaiming them directly, it avoids waiting time and improves reclamation efficiency.

Benefits of technology

It improves the efficiency of reclaiming idle storage units and the utilization rate of resources, ensuring the normal operation and stability of virtualized instances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086582A_ABST
    Figure CN122086582A_ABST
Patent Text Reader

Abstract

A memory management method and apparatus based on a cloud management platform are disclosed, relating to the field of cloud computing technology. The cloud management platform acquires and responds to a first request, determining a first virtualization instance from among the virtualization instances deployed in a first computing node. The cloud management platform acquires storage information of a first free storage unit of the first virtualization instance, and then reclaims the first free storage unit from the first virtualization instance based on this information. The first request instructs the reclamation of free storage units occupied by virtualization instances in the first computing node, and the first virtualization instance is determined based on the number of page faults of virtualization instances deployed in the first computing node. By proactively determining the first virtualization instance from among the virtualization instances deployed in the first computing node, the cloud management platform reduces the time spent reclaiming free storage units in the first computing node, thereby improving the efficiency of free storage unit reclamation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud computing technology, and in particular to a memory management method and apparatus based on a cloud management platform. Background Technology

[0002] Virtualization technology can virtualize a physical host into one or more virtual machines (VMs). The physical host can overcommit memory to allow more VMs to run on a single physical host. However, as the actual memory usage of the VMs increases, insufficient memory on the physical host can occur, preventing the VMs on that physical host from acquiring enough memory to run. To avoid this in overcommit scenarios, VMs can be reclaimed from the physical host when other VMs (excluding the VMs) actively report available memory, and then the reclaimed memory can be used by the VMs. However, the process of reclaiming memory from other VMs only after they actively report available memory is lengthy, resulting in low memory reclamation efficiency on the physical host. Summary of the Invention

[0003] This application provides a memory management method and apparatus based on a cloud management platform to solve the problem that the physical host has low memory reclamation efficiency because other VMs only reclaim memory after actively reporting that memory is available, resulting in a long waiting time.

[0004] Firstly, this application provides a memory management method based on a cloud management platform. This cloud management platform-based memory management method can be applied to a computer system or to a computing device that supports the implementation of the cloud management platform-based memory management method in the computer system, such as a cloud management platform. In one possible example, the cloud management platform is used to manage the infrastructure of cloud services. The infrastructure includes multiple computing nodes. The cloud management platform maintains the number of page faults for virtualized instances deployed in a first computing node. The multiple computing nodes include the first computing node. The cloud management platform-based memory management method includes: the cloud management platform obtaining a first request and, in response to the first request, determining a first virtualized instance from the virtualized instances deployed in the first computing node; the cloud management platform obtaining storage information of a first free storage unit of the first virtualized instance, and then, based on the storage information of the first free storage unit, reclaiming the first free storage unit from the first virtualized instance. The first request is used to instruct the reclamation of free storage units occupied by virtualization instances in the first compute node. The first virtualization instance is determined based on the number of page faults of virtualization instances deployed in the first compute node, and the free storage units occupied by virtualization instances in the first compute node include the first free storage units.

[0005] Compared to a cloud management platform passively reclaiming idle memory occupied by a VM after the VM reports memory availability, in this application, the cloud management platform proactively identifies the first virtualization instance from among the virtualization instances deployed in the first compute node. This reduces the time spent by the cloud management platform in reclaiming idle storage units in the first compute node, thereby improving the efficiency of idle storage unit reclamation. Furthermore, based on the storage information of the first idle storage unit, the cloud management platform reclaims the first idle storage unit from the first virtualization instance, allowing the first idle storage unit in the first compute node to be used by other virtualization instances, thus improving the resource utilization rate of the first compute node's storage units.

[0006] The following are three possible examples of how a cloud management platform obtains the content of the first request.

[0007] In the first possible example, the cloud management platform periodically triggers the generation of the first request, thereby enabling the periodic reclamation of idle storage units occupied by virtualization instances.

[0008] In the second possible example, the cloud management platform generates a first request when the capacity of the unoccupied free storage unit in the first compute node is less than the storage unit capacity required by the virtualization instance that needs to be expanded.

[0009] In a third possible example, the cloud management platform receives the first request sent by the terminal, which is a user-side electronic device.

[0010] In one possible scenario, the storage information of the first free storage unit includes the storage capacity and / or physical address of the first free storage unit.

[0011] In one possible scenario, a virtualization instance includes one or more of the following: a virtual machine, a container, or a function.

[0012] In one possible scenario, the storage unit is any of the following: a data block, a cache line, a data segment, or a physical storage block.

[0013] In one possible implementation, the number of page faults of the first virtualization instance is ranked among the top N of the number of page faults of the virtualization instances deployed in the first compute node, where N is a positive integer.

[0014] In this application, the number of page faults in the first virtualization instance is ranked in the top N, indicating that the first virtualization instance triggers page fault requests less often (compared to the number of page fault requests triggered by the virtualization instances deployed in the first compute node). This means that the capacity of the free storage units in the first virtualization instance is larger, and thus the free storage units in the first virtualization instance can be reclaimed. This can ensure the normal operation of the first virtualization instance while improving the resource utilization rate of the storage units in the first compute node.

[0015] In one possible scenario, the virtualization instances deployed in the first compute node are arranged in ascending order of the number of page faults.

[0016] In another possible implementation, the number of page faults of the first virtualization instance is less than or equal to a first threshold.

[0017] In this application, since the number of page faults in the first virtualization instance is less than or equal to the first threshold, the number of page fault requests triggered by the first virtualization instance is relatively small, that is, the capacity of the free storage units in the first virtualization instance is large. Thus, the free storage units in the first virtualization instance can be reclaimed, which can ensure the normal operation of the first virtualization instance while improving the resource utilization rate of the storage units of the first computing node.

[0018] In one possible implementation, the cloud management platform obtains storage information of the first free storage unit of the first virtualization instance, including: the cloud management platform sending a second request to the first virtualization instance and obtaining the storage capacity and / or physical address of the first free storage unit returned by the first virtualization instance in response to the second request. The second request is used to instruct the cloud management platform to obtain the storage capacity and / or physical address of the first free storage unit.

[0019] In this application, the cloud management platform shortens the time required for the cloud management platform to obtain the storage information of the first virtualization instance by proactively sending a second request to the first virtualization instance to instruct it to obtain the storage capacity and / or physical address of the first free storage unit, thereby improving the efficiency of reclaiming the first free storage unit.

[0020] In one possible scenario, the first virtualization instance maintains a free list of available space, where each node in the free list represents a free storage unit.

[0021] In one possible example, the free list is a linked list.

[0022] In one possible example, each node in the free list also includes the starting address and size (storage capacity) of the free storage unit.

[0023] In one possible implementation, the cloud management platform sends a second request to the first virtualization instance, including: the cloud management platform sending the second request to the first virtualization instance through a virtual input / output virtio queue between the cloud management platform and the first virtualization instance.

[0024] In this application, since the virtio queue is a data exchange mechanism between kernel spaces, it avoids the need to forward the second request to the first virtualization instance through user space, thereby reducing the time required for data interaction and improving the speed at which the cloud management platform sends the second request to the first virtualization instance, thus improving the efficiency of reclaiming the first idle storage unit.

[0025] For example, the virtio queue is used for communication between the cloud management platform and the first virtualization instance in kernel space; that is, the virtio queue exchanges data between the kernel space of the first virtualization instance and the kernel space of the cloud management platform.

[0026] In one possible implementation, the cloud management platform is configured with a bitmap to indicate the storage unit usage by the virtualization instances deployed in the first compute node. Based on the storage information of the first free storage unit, the cloud management platform reclaims the first free storage unit from the first virtualization instance. This includes: the cloud management platform sending the storage information of the first free storage unit to the first virtualization instance, and adjusting the field in the bitmap indicating the usage status of the first free storage unit from a first identifier to a second identifier. Specifically, the storage information of the first free storage unit instructs the first virtualization instance to release the first free storage unit, the first identifier indicates that the first free storage unit is occupied, and the second identifier indicates that the first free storage unit is not occupied.

[0027] In this application, when the cloud management platform sends storage information of the first free storage unit to the first virtualization instance to instruct the first virtualization instance to use the first free storage unit, it also adjusts the usage of the first free storage unit in the bitmap to ensure that the first free storage unit is used only by the first virtualization instance, avoiding the problem of resource contention caused by multiple allocations of the first free storage unit, thereby improving the reliability and stability of the first virtualization instance's operation.

[0028] In one possible implementation, the aforementioned memory management method based on a cloud management platform further includes: obtaining a third request carrying the storage unit capacity required by the second virtualization instance; if the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, then the cloud management platform sends storage information of the second free storage units to the second virtualization instance. Wherein, the unoccupied free storage units in the first computing node include the second free storage units, the capacity of the second free storage units is greater than or equal to the storage unit capacity required by the second virtualization instance, and the storage information of the second free storage units is used to indicate that the second virtualization instance can use the second free storage units.

[0029] In this application, when the capacity of the unoccupied free storage unit in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, the cloud management platform directly sends the storage information of the second free storage unit to the second virtualization instance to instruct the second virtualization instance to use the second free storage unit, thereby reducing the time required for the expansion of the second virtualization instance and improving the expansion efficiency of the second virtualization instance.

[0030] In one possible implementation, the above-mentioned memory management method based on a cloud management platform further includes: if the capacity of the unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, the cloud management platform performs the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage units from the first virtualization instance according to the storage information of the first free storage units, until the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, and then sends the storage information of the second free storage units to the second virtualization instance.

[0031] In this application, when the idle storage units occupied by virtualization instances in the first computing node can still be reclaimed, the cloud management platform continuously reclaims the idle storage units occupied by virtualization instances until the capacity of the unoccupied idle storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance. Then, it sends the storage information of the second idle storage unit to the second virtualization instance to instruct the second virtualization instance to use the second idle storage unit, thereby improving the reliability and stability of the operation of the second virtualization instance.

[0032] In one possible scenario, the cloud management platform may change the field in the bitmap used to indicate the usage status of the second free storage unit from the second identifier to the first identifier.

[0033] In one possible implementation, the aforementioned memory management method based on a cloud management platform further includes: if the capacity of unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, then the cloud management platform migrates the second virtualization instance to the second computing node. Multiple computing nodes include the second computing node, and the capacity of unoccupied free storage units in the second computing node is greater than or equal to the storage unit capacity required by the second virtualization instance.

[0034] In this application, cloud management ensures the normal operation of the second virtualization instance by migrating the second virtualization instance to the second computing node, and the capacity of the unoccupied free storage units in the second computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, thereby improving the reliability and stability of the second virtualization instance operation.

[0035] In one possible implementation, the cloud management platform is configured with a second threshold for indicating the capacity of reserved storage units. The aforementioned memory management method based on the cloud management platform further includes: if the capacity of unoccupied free storage units in the first computing node is less than the second threshold, the cloud management platform performs the following steps: determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage unit from the first virtualization instance according to the storage information of the first free storage unit, until the capacity of unoccupied free storage units in the first computing node is greater than or equal to the second threshold.

[0036] In this application, the cloud management platform sets a second threshold for the reserved storage unit capacity, which enables the first computing node to have enough free storage units for timely use when expanding virtualized instances. This reduces the time spent waiting for other virtualized instances to release free storage units when expanding virtualized instances, improves the expansion speed of virtualized instances, and thus enhances the reliability and stability of virtualized instance operation.

[0037] In one possible implementation, the cloud management platform is configured with a third threshold to indicate the over-division ratio of storage units.

[0038] For example, if the third threshold is 120%, and the total capacity of the storage units in the first compute node is 100 gigabytes (GB), then the total capacity of the storage units allocated to the virtualization instance by the first compute node is 120 GB.

[0039] For example, if the third threshold is 120% and the second threshold is 10GB, and the total capacity of the storage units in the first compute node is 100GB, then the total capacity of the storage units allocated to the virtualization instance by the first compute node is 108((100-10)*120%)GB.

[0040] Secondly, this application provides a memory management device based on a cloud management platform. This cloud management platform-based memory management device is applied to a computer system or to a computing device that supports the implementation of the cloud management platform-based memory management device in the computer system. The cloud management platform-based memory management device includes modules for executing the cloud management platform-based memory management method in the first aspect or any optional implementation of the first aspect. In one possible example, the cloud management platform is used to manage the infrastructure of a cloud service, the infrastructure including multiple computing nodes, and the cloud management platform maintains the number of page faults of virtualized instances deployed in a first computing node. The multiple computing nodes include the first computing node. Exemplarily, the cloud management platform-based memory management device includes:

[0041] The first acquisition module is used to acquire a first request; the first request is used to instruct the reclamation of idle storage units occupied by virtualization instances in the first computing node; the cloud management platform is used to manage the infrastructure of cloud services, the infrastructure includes multiple computing nodes, the cloud management platform maintains the number of page faults of virtualization instances deployed in the first computing node, and the multiple computing nodes include the first computing node.

[0042] A determination module is configured to, in response to a first request, determine a first virtualization instance from among the virtualization instances deployed in the first compute node; the first virtualization instance is determined based on the number of page faults of the virtualization instances deployed in the first compute node.

[0043] The second acquisition module is used to acquire the storage information of the first free storage unit of the first virtualization instance; the free storage unit occupied by the virtualization instance in the first computing node includes the first free storage unit.

[0044] The recycling module is used to reclaim the first free storage unit from the first virtualization instance based on the storage information of the first free storage unit.

[0045] For more detailed implementation information on the cloud management platform-based memory management device, please refer to the description of any of the implementation methods in the first aspect above, as well as the content of the specific implementation methods below, which will not be repeated here.

[0046] Thirdly, this application provides a chip, including: a processor and an interface circuit; the interface circuit is used to acquire first data, and the processor is used to execute the method in the first aspect or any possible implementation of the first aspect based on the first data.

[0047] Fourthly, this application provides a computing device cluster. The computing device cluster includes at least one computing device, which includes a memory and a processor. The memory stores computer instructions; when the processor executes the computer instructions, it implements the method described in the first aspect or any possible implementation of the first aspect.

[0048] Fifthly, this application provides a computer-readable storage medium storing a computer program or instructions that, when executed by a processing device, implement the method described in the first aspect or any possible implementation of the first aspect.

[0049] In a sixth aspect, this application provides a computer program product comprising a computer program or instructions that, when executed by a processing device, implement the method in the first aspect or any possible implementation thereof.

[0050] The beneficial effects of aspects two through six above can be referred to in the first aspect or any possible implementation of the first aspect, and will not be elaborated here. Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. Attached Figure Description

[0051] Figure 1 A schematic diagram of a computer system provided in this application;

[0052] Figure 2 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 1 ;

[0053] Figure 3 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 2 ;

[0054] Figure 4 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 3 ;

[0055] Figure 5 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 4 ;

[0056] Figure 6a A schematic diagram of the structure of a memory management device based on a cloud management platform provided in this application. Figure 1 ;

[0057] Figure 6b A schematic diagram of the structure of a memory management device based on a cloud management platform provided in this application. Figure 2 ;

[0058] Figure 7 A schematic diagram of the structure of a computing device provided in this application;

[0059] Figure 8 This application provides a schematic diagram of the structure of a computing device cluster;

[0060] Figure 9 This is a schematic diagram of the connection between computing devices provided in this application. Detailed Implementation

[0061] To facilitate understanding, the technical terms used in this application will be introduced first.

[0062] Memory overspending refers to a situation in cloud services or other virtualization environments where the total amount of virtual memory that can be allocated exceeds the total amount of physical memory that is actually available. The excess memory is calculated as the total virtual memory minus the total physical memory. For example, if the total memory allocated to the virtualization instance running on the first compute node is 125GB, but the actual physical memory on the first compute node is 100GB, then the first compute node experiences memory overspending, with the excess exceeding 25GB.

[0063] Virtualization instance migration refers to moving a virtualization instance from one compute node (such as the first compute node) to another compute node (such as the second compute node). Besides copying the data corresponding to the virtualization instance, virtualization instance migration also involves state synchronization, and the migration process is generally time-consuming, with brief business interruptions during the process.

[0064] Quality of Service (QoS) degradation refers to the decrease in QoS performance (such as throughput) of tenant services caused by resource contention among multiple virtualization instances coexisting on the same compute node. For example, because multiple virtualization instances share resources such as CPU, memory, network bandwidth, and cache within a compute node, these resources may be unable to meet the load requirements of the virtualization instances in a timely manner, resulting in a significant decline in the QoS performance indicators of tenant services.

[0065] A function is a block of code that encapsulates specific logic or operations. A function can accept input (parameters) and return output (results).

[0066] To address the issue of long waiting times before memory is reclaimed from other VMs (Virtual Machines), leading to low memory reclamation efficiency on the physical host, this application provides a memory management method based on a cloud management platform. The cloud management platform receives a first request and, in response, determines a first virtualization instance from among the virtualization instances deployed in a first compute node. The cloud management platform obtains storage information of a first free storage unit of the first virtualization instance and, based on this information, reclaims the first free storage unit from the first virtualization instance. The first request instructs the reclamation of free storage units occupied by virtualization instances in the first compute node. The first virtualization instance is determined based on the number of page faults among virtualization instances deployed in the first compute node, and the free storage units occupied by these virtualization instances include the first free storage unit.

[0067] Compared to a cloud management platform passively reclaiming idle memory occupied by a VM after the VM reports memory availability, in this application, the cloud management platform proactively identifies the first virtualization instance from among the virtualization instances deployed in the first compute node. This reduces the time spent by the cloud management platform in reclaiming idle storage units in the first compute node, thereby improving the efficiency of idle storage unit reclamation. Furthermore, based on the storage information of the first idle storage unit, the cloud management platform reclaims the first idle storage unit from the first virtualization instance, allowing the first idle storage unit in the first compute node to be used by other virtualization instances, thus improving the resource utilization rate of the first compute node's storage units.

[0068] Next, the memory management method based on the cloud management platform provided in this application will be described in detail with reference to the accompanying drawings.

[0069] See Figure 1 , Figure 1 A schematic diagram of a computer system provided in this application. For example... Figure 1 As shown, the computer system includes a cloud management platform 110 and a computing node cluster 120. The cloud management platform 110 manages the computing node cluster 120. The cloud management platform 110 and the computing node cluster 120 can communicate with each other via wired or wireless means. The aforementioned cloud management platform 110 can also be referred to as a management node.

[0070] The aforementioned cloud management platform 110 is used to manage the infrastructure for cloud services, which includes the aforementioned compute node cluster 120. In one possible example, the infrastructure also includes a storage node cluster (…). Figure 1 (not shown in the image), etc.

[0071] In this application, the cloud management platform 110 provides a request retrieval interface (such as an application programming interface (API)) which can be used to retrieve a first request configured by the user. For a detailed description of the first request, please refer to the following... Figure 2 The content shown will not be repeated here.

[0072] In one possible example, the cloud management platform 110 receives a first request from the user, and then, based on the first request, determines virtualization instance a from multiple virtualization instances, and then reclaims the free storage unit a occupied by virtualization instance a.

[0073] The aforementioned wired communication methods can be: Ethernet, fiber optic, and various peripheral component interconnect express (PCIe) buses, universal serial bus (USB) or unified bus (Ubus or UB), compute express link (CXL), cache coherent interconnect for accelerators (CCIX), etc., set up inside the computer system to connect the cloud management platform 110 and the computing node cluster 120.

[0074] The aforementioned wireless communication methods can include: the Internet, wireless fidelity (WIFI), and ultra-wideband (UWB) technology, etc.

[0075] In one possible scenario, the aforementioned cloud management platform 110 and computing nodes may include one or more processing units, which may be graphics processing units (GPUs), neural network processing units (NPUs), central processing units (CPUs), field-programmable gate arrays (FPGAs), application processors (APs), modem processors, image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), tensor processing units (TPUs), application-specific integrated circuits (ASICs), discrete gates, transistor logic devices, discrete hardware components, and / or baseband processors. Alternatively, they may be processing devices including any one or more of the aforementioned processing units, such as terminals, servers, etc.

[0076] In another possible scenario, the cloud management platform 110 and the computing nodes described above may also include one or more memories. These memories may include volatile memory, such as random access memory (RAM). The memories may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD). The memories store executable program code or data generated during component operation, which the cloud management platform 110 or the computing nodes execute to implement the functions of the components deployed on it.

[0077] For a detailed description of the structure of the cloud management platform 110, please refer to the following: Figures 7-9 The content shown will not be repeated here.

[0078] The computing node cluster 120 includes multiple computing nodes. For example, these multiple computing nodes include computing node 121, computing node 122, and computing node 123. Computing nodes can be physical machines, shared memory pools, etc.; if a computing node is a physical machine, it can be a computing device, such as a server. The cloud management platform 110 can also be a physical machine or a virtual machine; if the cloud management platform 110 is a physical machine, it can be a management device.

[0079] In one possible example, at least one of the aforementioned computing nodes has one or more virtualization instances deployed, such as virtualization instance a, virtualization instance b, virtualization instance c, etc. deployed in computing node 121, virtualization instance d, etc. deployed in computing node 122, and virtualization instance e, etc. deployed in computing node 123.

[0080] The virtualization instances mentioned above may include virtual machines (VMs), containers (PODs), or functions.

[0081] For example, compute node 121 is deployed with VMA, VM B, VM C, etc., and compute node 122 is deployed with VM D, etc.

[0082] The following explanation uses VM as the virtualization instance. For content on POD or function virtualization instances, please refer to the relevant descriptions for VM virtualization instances, which will not be repeated here.

[0083] In one possible example, the aforementioned memory includes RAM, which contains storage units. These storage units can be any of the following: block, cache line, segment, or chunk.

[0084] In one possible example, the aforementioned computer system could be referred to as a distributed system, a cloud computing platform, or a cloud service.

[0085] In one possible example, the computer system described above may also include terminal 130, terminal 140, and terminal 150.

[0086] Terminals 130, 140, and 150 can be mobile phones, tablets, handheld computers, personal computers (PCs), cellular phones, personal digital assistants (PDAs), wearable devices (such as smartwatches), smart home devices (such as televisions), in-vehicle computers, game consoles, and augmented reality (AR) / virtual reality (VR) devices, etc. This application does not impose any special restrictions on the specific device form of terminals 130, 140, and 150.

[0087] In another possible example, terminals 130, 140, and 150 are set up independently and communicate with the computer system, i.e., the distributed system.

[0088] It should be noted that, Figure 1 The illustrated computer system architecture is merely an example; the types or number of devices within the system can be configured according to actual needs, and this application embodiment does not limit this. For example, the computer system may also include more cloud management platforms and computing nodes.

[0089] The following will be Figure 1 Based on the computer system shown, the implementation of the memory management method based on a cloud management platform provided in this application will be described in detail with reference to the accompanying drawings.

[0090] Figure 2 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 1 The method provided in this embodiment can be applied to Figure 1 The computer system shown here. The memory management method based on a cloud management platform, as illustrated in this application, is executed by a cloud management platform 110 as an example. The cloud management platform 110 is used to manage the infrastructure of cloud services, and the infrastructure may include, for example... Figure 1 The diagram shows multiple compute nodes, including a first compute node, which deploys virtualized instances. The cloud management platform maintains the number of page faults for the virtualized instances deployed on the first compute node.

[0091] In this embodiment, request 1 can be referred to as the first request, compute node 121 can be referred to as the first compute node, virtualization instance a can be referred to as the first virtualization instance, and free storage unit A can be referred to as the first free storage unit. Figure 2 As shown, the memory management method based on the cloud management platform includes the following steps S210-S240.

[0092] S210, Cloud Management Platform 110 obtains request 1.

[0093] Request 1 is used to instruct the reclamation of idle storage units occupied by virtualization instances in compute node 121.

[0094] In one possible scenario, request 1 carries the identifier of the compute node, such as the identifier of compute node 121.

[0095] The identifier of compute node 121 is: the name or identity document (ID) of compute node 121, etc.

[0096] In one possible scenario, request 1 also carries the capacity of the free storage units that need to be reclaimed.

[0097] In one possible example, request 1 carries a field 'a', the value of which indicates the capacity of the free storage units to be reclaimed.

[0098] For example, if the value of field a is 2GB, then request 1 is used to instruct the reclamation of 2GB of free storage space occupied by the virtualization instance in compute node 121.

[0099] Regarding the content of request 1 obtained by the cloud management platform 110, the following are four possible implementation methods.

[0100] In the first possible implementation, the cloud management platform 110 obtains request 1, including: the cloud management platform 110 periodically generates request 1.

[0101] In one possible example, cloud management platform 110 generates request 1 every minute to reclaim idle storage units occupied by virtualization instances in compute node 121.

[0102] In the example above, request 1 may or may not include field a, and this application does not limit this.

[0103] In the second possible implementation, the cloud management platform 110 obtains request 1, which includes: when the capacity of the unoccupied free storage unit in the compute node 121 is less than the storage unit capacity required by the virtualization instance (such as VM B below) that needs to be expanded, the cloud management platform 110 generates request 1.

[0104] In a third possible implementation, the cloud management platform 110 is configured with a threshold a (second threshold) for indicating the capacity of reserved storage units. The cloud management platform 110 obtains request 1, which includes: when the capacity of the unoccupied free storage units in the computing node 121 is less than or equal to the threshold a, the cloud management platform 110 generates request 1.

[0105] In one possible example, the cloud management platform 110 periodically determines the capacity of the unoccupied free storage units in the cloud management platform 110 and the value of the threshold a. If the capacity of the unoccupied free storage units in the computing node 121 is less than or equal to the threshold a, the cloud management platform 110 generates request 1.

[0106] For example, the aforementioned timing can be configured by the user, and this application does not limit this. For instance, the cloud management platform 110 determines the time every 2 seconds.

[0107] In the fourth possible implementation, the cloud management platform 110 obtains request 1, including: the cloud management platform 110 obtains request 1 sent by the terminal 130.

[0108] In one possible example, terminal 130 accesses cloud management platform 110 via an API provided by cloud management platform 110 to display a user interface on terminal 130. Then, the user triggers control components on the user interface using various input devices (keyboard, mouse, touchscreen, etc.) connected to terminal 130. Based on the triggered operation, terminal 130 obtains the user-configured request 1 and sends request 1 to cloud management platform 110.

[0109] Two possible examples are provided below for the specific implementation of the triggering operation.

[0110] Example 1: The trigger operation can be a user's confirmation of the control component via the keyboard, such as the user pressing the Enter key to confirm the user's configured request 1.

[0111] Example 2: The trigger action can be a user clicking on the control component with the mouse.

[0112] For example, the user interface displays multiple control components corresponding to candidate options. The user can click on the aforementioned control components with the mouse to determine the candidate option corresponding to the clicked control component, such as the identifier of the computing node or the value of field 'a'.

[0113] For example, the multiple candidate options mentioned above are multiple values ​​of field a (such as 1GB, 2GB, 3GB, etc.), the identifier of the computing node (computing node 121, computing node 122, computing node 123), etc.

[0114] It is worth noting that the above content is merely an example and should not be construed as limiting this application. In other examples of this application, the triggering operation may be a user's input operation in the control unit via the keyboard, such as inputting the identifier of the computing node or the specific content of the value of field 'a'.

[0115] S220, cloud management platform 110 responds to the first request and determines virtual instance a from the virtualization instance deployed in compute node 121.

[0116] In one possible scenario, virtualization instance a is determined based on the number of page faults of the virtualization instances deployed in compute node 121.

[0117] In one possible scenario, the cloud management platform 110 maintains a count table that indicates the mapping relationship between each virtualization instance deployed in the compute node cluster and the number of page faults.

[0118] In one possible example, the number of page faults corresponding to a virtualization instance is the number of times that virtualization instance triggers a page fault interrupt request. A page fault interrupt request occurs when a virtualization instance accesses a page in virtual memory and finds that the page is not in main memory (physical memory). The virtualization instance handles this problem by triggering a page fault interrupt.

[0119] The fewer page faults a virtualization instance has, the more sufficient the storage capacity allocated to that virtualization instance by the compute node; conversely, the more page faults a virtualization instance has, the less storage capacity allocated to that virtualization instance by the compute node.

[0120] For the contents of the frequency table, please refer to the description in Table 1 below.

[0121] Table 1

[0122]

[0123] It is worth noting that Table 1 above is merely an example and should not be construed as limiting this application. In other embodiments of this application, the number of page faults corresponding to more or fewer virtualization instances may also be included. For example, virtualization instance d has 12 page faults. In one possible example, the above table may also include a compute node column to identify the deployment status of each virtualization instance. For instance, the compute node column corresponding to virtualization instances a and b is compute node 121, meaning that virtualization instances a and b are deployed on compute node 121; the compute node column corresponding to virtualization instance c is also compute node 121, meaning that virtualization instance c is deployed on compute node 121.

[0124] Regarding the cloud management platform 110 determining the content of virtual instance a from the virtualization instance deployed in compute node 121, the following two possible implementation methods are provided.

[0125] In a first possible implementation, the cloud management platform 110 determines virtualization instance a from the virtualization instances deployed in the compute node 121, including: the cloud management platform 110 determines the top N page fault counts from the page fault counts of the virtualization instances deployed in the compute node 121, and then determines virtualization instance a from the N virtualization instances corresponding to the top N page fault counts. Here, N is a positive integer.

[0126] In one possible example, the above arrangement is sorted in ascending order of the number of page faults.

[0127] For example, if N is 1, then the cloud management platform 110 determines the virtualization instance with the fewest page faults among the computing nodes 121, such as virtualization instance a.

[0128] For example, if N is 2, then the cloud management platform 110 determines one of the two virtualization instances (virtualization instance a and virtualization instance c) in the computing node 121 whose page fault counts are arranged in ascending order, such as virtualization instance a.

[0129] For the case where N is greater than 2, please refer to the above description of N=2, which will not be repeated here.

[0130] In the second possible implementation, the cloud management platform 110 determines virtual instance a from the virtualization instances deployed in the compute node 121, including: the cloud management platform 110 determines any one of the virtualization instances in the compute node 121 whose page fault count is less than or equal to a threshold b (a first threshold), such as virtual instance a.

[0131] For example, if the threshold b is 11, the cloud management platform 110 determines the virtualization instance a with a page fault count of less than or equal to 11 based on the content shown in Table 1 above.

[0132] It is worth noting that the above content is merely an example and should not be construed as limiting this application. Other implementations of this application may also be combinations of the first and second possible implementations described above. For details, please refer to the descriptions of the first and second possible implementations above, which will not be repeated here.

[0133] S230, the cloud management platform 110 obtains the storage information of the free storage unit A of the virtualization instance a.

[0134] Among them, the free storage units occupied by the virtualization instance in compute node 121 include free storage unit A.

[0135] In one possible example, the storage information includes: storage capacity and / or physical address.

[0136] For example, the storage information of free storage unit A includes the storage capacity of free storage unit A, such as 1GB.

[0137] For example, the storage information of free storage unit A includes the physical address of free storage unit A. As mentioned above, the physical address is the start address and end address of free storage unit A.

[0138] For example, the storage information of free storage unit A includes the physical address and storage capacity of free storage unit A. The physical address mentioned above could be the starting address of free storage unit A, or both the starting and ending addresses.

[0139] In one possible scenario, virtualization instance 'a' maintains a free list, where each node represents a free storage unit, and each node records the starting address and storage capacity of the free storage unit. Therefore, the free list in virtualization instance 'a' includes the storage information of free storage unit A.

[0140] In one possible implementation, the cloud management platform 110 obtains the storage information of the free storage unit A of the virtualization instance a, including: the cloud management platform 110 sends a request 2 (second request) to the virtualization instance a, and then obtains the storage capacity and / or physical address of the free storage unit A returned by the virtualization instance a in response to the request 2.

[0141] Request 2 is used to instruct the user to obtain the storage capacity and / or physical address of the free storage unit A.

[0142] In one possible scenario, request 2 carries an identifier for free storage unit a, such as the ID of free storage unit A, the sector it is located in, etc.

[0143] In one possible example, cloud management platform 110 sends request 2 to virtualization instance a via the transmission channel between cloud management platform 110 and virtualization instance a. Virtualization instance a queries the free list based on the identifier of free storage unit A carried in request 2 to obtain the storage capacity and / or physical address of free storage unit A. Virtualization instance a then returns the storage capacity and / or physical address of free storage unit A to cloud management platform 110 via the aforementioned transmission channel.

[0144] For example, the aforementioned transmission channels can be: virtual input / output (virtio) queues, software-defined networking, shared storage, etc.

[0145] For example, the end address included in the physical address of the free storage unit A returned by virtualization instance a is obtained by converting the initial address and storage capacity in the free storage unit A.

[0146] S240 and cloud management platform 110 reclaim the idle storage unit A from virtualization instance a based on the storage information of the idle storage unit A.

[0147] In one possible implementation, the cloud management platform 110 reclaims the idle storage unit A from the virtualization instance a based on the storage information of the idle storage unit A, including: the cloud management platform 110 sends the storage information of the idle storage unit A to the virtualization instance a to instruct the virtualization instance a to release the idle storage unit A.

[0148] In one possible example, virtualization instance a deletes the node associated with free storage unit A from the free list based on the storage information of free storage unit A, thereby preventing virtualization instance a from using free storage unit A and thus enabling virtualization instance a to release free storage unit A.

[0149] In one possible example, cloud management platform 110 sends storage information of some storage units in free storage unit A to virtualization instance a, so that virtualization instance a only releases some storage units in free storage unit A.

[0150] In one possible scenario, the cloud management platform 110 is configured with a bitmap that indicates how virtualization instances deployed in the compute node cluster use storage units.

[0151] In one possible example, the bitmap includes a field b for indicating the usage of the storage unit.

[0152] For example, when field b is the first identifier, it is used to indicate that the storage unit is occupied; when field b is the second identifier, it is used to indicate that the storage unit is not occupied.

[0153] For example, the first identifier can be 0, and the second identifier can be 1.

[0154] It is worth noting that the specific content of the first and second identifiers mentioned above is merely illustrative and should not be construed as limiting this application. In other examples of this application, the first identifier may be 'a' and the second identifier may be 'b'.

[0155] In another possible implementation, the cloud management platform 110 reclaims the idle storage unit A from the virtualization instance a based on the storage information of the idle storage unit A, including: the cloud management platform 110 sends the storage information of the idle storage unit A to the virtualization instance a to instruct the virtualization instance a to release the idle storage unit A, and adjusts the field b in the bitmap used to indicate the usage status of the idle storage unit A from the first identifier to the second identifier.

[0156] The cloud management platform 110 sends storage information of the free storage unit A to the virtualization instance a, instructing the virtualization instance a to release the free storage unit A. The implementation method described above can be referred to, and will not be repeated here.

[0157] By adjusting field b in the bitmap, which indicates the usage status of free storage unit A, from the first identifier to the second identifier, the cloud management platform 110 marks free storage unit A as unoccupied. This allows the cloud management platform 110 to allocate free storage unit A to other virtualized instances in compute node 121, excluding virtualized instance a, thereby improving the utilization rate of storage units in compute node 121.

[0158] It is worth noting that, Figure 2 The descriptions provided all use a single virtualization instance 'a' as an example. In other embodiments of this application, the cloud management platform 110 simultaneously identifies multiple virtualization instances 'a' and then reclaims the free storage units occupied by these multiple virtualization instances 'a'. For details on how the cloud management platform 110 simultaneously identifies each of the multiple virtualization instances 'a' and then reclaims the free storage units occupied by each virtualization instance 'a', please refer to the above. Figure 2 The content shown will not be elaborated here. For example, the cloud management platform 110 identifies at least two virtualization instances a from the N virtualization instances corresponding to the first N page faults. The content of reclaiming idle storage units for each of the at least two virtualization instances a can be referred to the content of S230 and S240 above, and will not be elaborated here.

[0159] It is worth noting that when the cloud management platform 110 executes the contents of S220-S240, it does so in the kernel space.

[0160] In this application, the cloud management platform 110 actively identifies virtual instance a from the virtualized instances deployed in the computing node 121, and reduces the time spent by the cloud management platform 110 in reclaiming idle storage unit A in the computing node 121 for virtualized instance a, thereby improving the efficiency of reclaiming idle storage units, which in turn reduces the waiting time required for the expansion of other virtualized instances and improves QoS.

[0161] exist Figure 2 Based on the content shown, this application also provides a memory management method based on a cloud management platform to illustrate the content of the cloud management platform 110 when it receives an expansion request (third request). Figure 3 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 2 In this embodiment, the second virtualization instance is taken as VM B as an example for explanation. Request 3 can be referred to as the third request. VM B is deployed on compute node 121, and free storage unit B can be referred to as the second free storage unit. Figure 3 As shown, Figure 3 The content shown includes the following steps S310-S330.

[0162] S310, Cloud Management Platform 110 received request 3.

[0163] Request 3 carries the storage unit capacity required by VM B.

[0164] In one possible example, the value of field c in request 3 indicates the storage unit capacity required by VM B.

[0165] In one possible scenario, request 3 may also include the identifier of the compute node, such as the identifier of compute node 121.

[0166] In one possible implementation, the cloud management platform 110 obtains request 3, which includes: the cloud management platform 110 obtains request 3 sent by VM B.

[0167] In one possible example, request 3 is a page fault request. For instance, cloud management platform 110 receives a page fault request sent by VM B.

[0168] In another possible example, request 3 is a scaling request. For example, cloud management platform 110 receives a scaling request sent by VM B.

[0169] In another possible implementation, the cloud management platform 110 obtains request 3, including: the cloud management platform 110 obtains request 3 sent by terminal 130.

[0170] For details regarding the cloud management platform 110 obtaining the request 3 sent by terminal 130, please refer to the above description of the cloud management platform 110 obtaining the request 1 sent by terminal 130, which will not be repeated here.

[0171] S320. If the capacity of the unoccupied free storage unit in compute node 121 is greater than or equal to the storage unit capacity required by VM B, then cloud management platform 110 sends the storage information of free storage unit B to VM B.

[0172] Among them, the unoccupied free storage units in computing node 121 include free storage unit B. The capacity of free storage unit B is greater than or equal to the storage unit capacity required by VM B. The storage information of free storage unit B is used to indicate that VM B can use free storage unit B.

[0173] In one possible example, the storage information of free storage unit B includes the storage capacity and / or physical address of free storage unit B.

[0174] After the cloud management platform 110 sends the storage information of the free storage unit B to VM B, VM B adds a node to the free list to indicate the free storage unit B, thereby instructing VM B to use the free storage unit B.

[0175] In one possible scenario, the cloud management platform 110 may also change field b in the bitmap, which indicates the usage status of the free storage unit B, from the second identifier to the first identifier, thereby marking the free storage unit B as occupied.

[0176] S330. If the capacity of the unoccupied free storage unit in compute node 121 is less than the storage unit capacity required by VM B, then cloud management platform 110 executes the above S220-S240 until the capacity of the unoccupied free storage unit in compute node 121 is greater than or equal to the storage unit capacity required by VM B, and cloud management platform 110 sends the storage information of free storage unit B to VM B.

[0177] In this embodiment, the cloud management platform 110 repeatedly reclaims the free storage units occupied by the VMs in the computing node 121 from the computing node 121 until the capacity of the unoccupied free storage units in the computing node 121 is greater than or equal to the storage unit capacity required by VM B.

[0178] That is, the cloud management platform 110 executes the above S220-S240 multiple times until the capacity of the unoccupied free storage units in the compute node 121 is greater than or equal to the storage unit capacity required by VM B.

[0179] The content of the storage information of the idle storage unit B sent by the cloud management platform 110 to VM B can be referred to the description in S320, and will not be repeated here.

[0180] In another possible embodiment, Figure 4 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 3 If the cloud management platform 110 is unable to reclaim memory for the VMs in compute node 121, or if, after the cloud management platform 110 reclaims all the free storage units occupied by the VMs in compute node 121, the capacity of the unoccupied free storage units in compute node 121 is less than the storage unit capacity required by VM B, then the cloud management platform 110 will migrate VM B to compute node 122. Wherein, the capacity of the unoccupied free storage units in compute node 122 is greater than or equal to the storage unit capacity required by VM B.

[0181] like Figure 4 As shown, Figure 4 The content shown includes the following steps ①-③.

[0182] Step ①: VM B requests capacity expansion from cloud management platform 110.

[0183] Step 2: Based on the request, the cloud management platform 110 determines that the capacity of the unoccupied free storage units in the compute node 121 is less than the storage unit capacity required by VM B.

[0184] Step 3: The cloud management platform 110 migrates VM B from compute node 121 to compute node 122.

[0185] For the migration of VM B from the cloud management platform 110 to the compute node 122, please refer to the descriptions of VM migration in this field, which will not be repeated here.

[0186] It is worth noting that the above description only takes the migration of VM B as an example. In other embodiments of this application, the cloud management platform 110 can also migrate VM C in compute node 121 to compute node 122. The capacity of the unoccupied free storage units in compute node 121 after the migration of VM C is greater than or equal to the storage unit capacity required by VM B. Thus, the unoccupied free storage units in compute node 121 after the migration of VM C can meet the storage unit capacity required by VM B, thereby ensuring that VM B can run normally in compute node 121.

[0187] It is worth noting that the above-described migration of VM B to compute node 122 is only an example. In other embodiments of this application, VM B can also be migrated to other compute nodes in the compute node cluster. The compute node must satisfy the requirement that the capacity of its unoccupied free storage units is greater than or equal to the storage unit capacity required by VM B.

[0188] exist Figure 2 or Figure 3 Based on this, this application also provides a possible embodiment. Figure 5 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 4 This embodiment is used to illustrate the memory management of the computing node cluster 120 by the cloud management platform 110 when a threshold a (second threshold) for indicating the capacity of reserved storage units is configured in the cloud management platform 110.

[0189] If the capacity of the unoccupied free storage units in compute node 121 is less than the threshold a, then the cloud management platform 110 executes the above S220-S240 until the capacity of the unoccupied free storage units in compute node 121 is greater than or equal to the threshold a, or until all the free storage units occupied by VMs in compute node 121 have been reclaimed.

[0190] In one possible example, the cloud management platform 110 periodically compares the capacity of the unoccupied free storage units in the compute node 121 with a threshold a. If the capacity of the unoccupied free storage units in the compute node 121 is less than the threshold a, the cloud management platform 110 executes the above-described S220-S240 steps until the capacity of the unoccupied free storage units in the compute node 121 is greater than or equal to the threshold a, or until all the free storage units occupied by the VMs in the compute node 121 have been reclaimed.

[0191] For example, the cloud management platform 110 compares the capacity of the unoccupied free storage units in the computing node 121 with the threshold a every 2 seconds.

[0192] like Figure 5 As shown, Figure 5 The content shown includes the following steps ① and ②.

[0193] Step ①: The cloud management platform 110 determines that the capacity of the unoccupied storage units in the computing node 121 is less than or equal to the threshold a.

[0194] Step ②: The cloud management platform 110 executes the above steps S220-S240 once or multiple times to reclaim the free storage units occupied by VMA and / or VM B until the unoccupied free storage units in the compute node 121 have a capacity greater than or equal to the threshold a.

[0195] It is understood that, in order to achieve the functions in the above embodiments, the cloud management platform 110 includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0196] The above text combines Figures 2 to 5 This application describes in detail the memory management method based on a cloud management platform provided. The following section will combine... Figure 6a , Figure 6a A schematic diagram of the structure of a memory management device based on a cloud management platform provided in this application. Figure 1This application describes a memory management device based on a cloud management platform. The cloud management platform-based memory management device 600 can be used to implement the functions of the cloud management platform 110 in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments. In one possible example, the cloud management platform is used to manage the infrastructure of cloud services, the infrastructure including multiple computing nodes, and the cloud management platform maintains the number of page faults of virtualized instances deployed in a first computing node, the multiple computing nodes including the first computing node.

[0197] like Figure 6a As shown, the cloud-based memory management device 600 includes a first acquisition module 610, a determination module 620, a second acquisition module 630, and a recycling module 640. This cloud-based memory management device 600 is used to implement the above-mentioned... Figures 2 to 5 The corresponding method embodiment describes the functionality of the cloud management platform 110. In one possible example, the specific process by which the cloud management platform-based memory management device 600 implements the aforementioned cloud management platform-based memory management method includes the following steps:

[0198] The first acquisition module 610 is used to acquire a first request; the first request is used to instruct the reclamation of idle storage units occupied by virtualization instances in the first computing node; the cloud management platform is used to manage the infrastructure of cloud services, the infrastructure includes multiple computing nodes, the cloud management platform maintains the number of page faults of virtualization instances deployed in the first computing node, and the multiple computing nodes include the first computing node.

[0199] The determination module 620 is configured to, in response to a first request, determine a first virtualization instance from among the virtualization instances deployed in the first compute node; the first virtualization instance is determined based on the number of page faults of the virtualization instances deployed in the first compute node.

[0200] The second acquisition module 630 is used to acquire the storage information of the first free storage unit of the first virtualization instance; the free storage unit occupied by the virtualization instance in the first computing node includes the first free storage unit.

[0201] The recycling module 640 is used to reclaim the first free storage unit from the first virtualization instance based on the storage information of the first free storage unit.

[0202] To further achieve the above Figures 2 to 5 The method embodiments shown in the illustration demonstrate functionality. This application also provides a memory management device based on a cloud management platform, such as... Figure 6b As shown, Figure 6b A schematic diagram of the structure of a memory management device based on a cloud management platform provided in this application. Figure 2The cloud-based memory management device 600 also includes an expansion module 650 and a reserved module 660.

[0203] The expansion module 650 is used to obtain a third request; the third request carries information indicating the storage unit capacity required by the second virtualization instance; the virtualization instances deployed in the first compute node include the second virtualization instance. If the capacity of the unoccupied free storage units in the first compute node is greater than or equal to the storage unit capacity required by the second virtualization instance, then storage information of the second free storage units is sent to the second virtualization instance. The unoccupied free storage units in the first compute node include second free storage units, the capacity of the second free storage units is greater than or equal to the storage unit capacity required by the second virtualization instance, and the storage information of the second free storage units is used to indicate that the second virtualization instance can use the second free storage units.

[0204] The expansion module 650 is further configured to, if the capacity of the unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, execute the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage units from the first virtualization instance according to the storage information of the first free storage units, until the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, and send the storage information of the second free storage units to the second virtualization instance.

[0205] The reservation module 660 is configured to, if the capacity of unoccupied free storage units in the first compute node is less than a second threshold, execute the following steps: determining a first virtualization instance from the virtualization instances deployed in the first compute node, and reclaiming the first free storage unit from the first virtualization instance based on its storage information, until the capacity of unoccupied free storage units in the first compute node is greater than or equal to the second threshold. The cloud management platform is configured with a second threshold to indicate the capacity of the reserved storage units.

[0206] For more information on the functions of the first acquisition module 610, the determination module 620, the second acquisition module 630, and the recycling module 640, please refer to the description of the memory management method based on the cloud management platform above; it will not be repeated here.

[0207] The first acquisition module 610, the determination module 620, the second acquisition module 630, and the recycling module 640 can all be implemented in software or in hardware. For example, the implementation of the first acquisition module 610 will be described below. Similarly, the implementation of the determination module 620, the second acquisition module 630, and the recycling module 640 can refer to the implementation of the first acquisition module 610.

[0208] As an example of a software functional unit, the first acquisition module 610 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the aforementioned computing instance may be one or more. For example, the first acquisition module 610 may include code running on multiple hosts / virtual machines / containers.

[0209] It should be noted that the multiple hosts / virtual machines / containers used to run this code can be distributed within the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run this code can be distributed within the same availability zone (AZ) or in different AZs, each AZ comprising one or more geographically proximate data centers. Typically, a region can include multiple AZs.

[0210] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same VPC or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.

[0211] As an example of a hardware functional unit, the first acquisition module 610 may include at least one computing device, such as a server. Alternatively, the first acquisition module 610 may also be a device implemented using an ASIC or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), an FPGA, a generic array logic (GAL), or any combination thereof.

[0212] The multiple computing devices included in the first acquisition module 610 can be distributed in the same region or in different regions. Similarly, the multiple computing devices included in the first acquisition module 610 can be distributed in the same Availability Zone (AZ) or in different AZs. Likewise, the multiple computing devices included in the first acquisition module 610 can be distributed in the same Virtual Private Cloud (VPC) or in multiple VPCs. These multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0213] It should be noted that, in other embodiments, the first acquisition module 610 can be used to execute any step in the memory management method based on the cloud management platform, the determination module 620 can be used to execute any step in the memory management method based on the cloud management platform, the second acquisition module 630 can be used to execute any step in the memory management method based on the cloud management platform, and the recycling module 640 can be used to execute any step in the memory management method based on the cloud management platform. The steps implemented by the first acquisition module 610, the determination module 620, the second acquisition module 630, and the recycling module 640 can be specified as needed. The first acquisition module 610, the determination module 620, the second acquisition module 630, and the recycling module 640 respectively implement different steps in the memory management method based on the cloud management platform to achieve all the functions of the cloud management platform 110.

[0214] It is worth noting that the cloud management platform 110 in the foregoing embodiments can correspond to the memory management device 600 based on the cloud management platform, and can correspond to the execution of the method according to the embodiments of this application. Figures 2 to 5 The corresponding entities, and the operations and / or functions of each module in the memory management device 600 based on the cloud management platform, are respectively implemented to achieve... Figures 2 to 5 The corresponding processes of each method in the corresponding embodiments are not described in detail here for the sake of brevity.

[0215] in addition, Figure 6a or Figure 6b The cloud-based memory management device 600 shown can also be implemented via a communication device, which can refer to the cloud management platform 110 in the aforementioned embodiment. When the communication device is a chip or chip system applied to a processing device, the cloud-based memory management device 600 can also be implemented via a chip or chip system.

[0216] This application embodiment also provides a chip system, which includes a control circuit and an interface circuit. The interface circuit is used to obtain a first request, and the control circuit is used to implement the functions of the cloud management platform 110 in the above method according to the first request.

[0217] In one possible design, the chip system also includes a memory for storing program instructions and / or data. This chip system can be composed of chips or may include chips and other discrete components.

[0218] This application also provides a computing device, please refer to... Figure 7 , Figure 7This application provides a schematic diagram of the structure of a computing device. The computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, memory 706, and communication interface 708 are interconnected via the bus 702. The computing device 700 can be a server or a terminal device. It should be understood that this application does not limit the number of processors and memories in the computing device 700. For example, the computing device 700 could be the aforementioned cloud management platform 110.

[0219] The 702 bus can be a PCIe bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 7 The bus 702 may be represented by a single line, but this does not mean that there is only one bus or one type of bus. The bus 702 may include a path for transmitting information between various components of the computing device 700 (e.g., processor 704, memory 706, communication interface 708).

[0220] Processor 704 may include any one or more processors such as CPU, GPU, FPGA, microprocessor (MP) or DSP.

[0221] The memory 706 may include volatile memory, such as RAM. The processor 704 may also include non-volatile memory, such as ROM, flash memory, HDD, or SSD.

[0222] The memory 706 stores executable program code, which the processor 704 executes to implement the functions of the aforementioned first acquisition module 610, determination module 620, second acquisition module 630, and recycling module 640, thereby realizing a memory management method based on a cloud management platform. In other words, the memory 706 stores instructions for executing the memory management method based on a cloud management platform.

[0223] The communication interface 708 uses transceiver modules, such as, but not limited to, network interface cards and transceivers, to enable communication between the computing device 700 and other devices or communication networks. The computing device 700 can be a computer (e.g., a server) in a cloud data center, a computer in an edge data center, or a terminal.

[0224] This application also provides a computing device cluster. The computing device cluster includes at least one computing device, which can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smartphone. For example, the computing device cluster can be the aforementioned cloud management platform 110.

[0225] like Figure 8 As shown, Figure 8 This application provides a schematic diagram of a computing device cluster. The computing device cluster includes at least one computing device 700. The memory 706 of one or more computing devices 700 in the computing device cluster may store the same instructions for executing memory management methods based on a cloud management platform.

[0226] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing memory management methods based on the cloud management platform. In other words, a combination of one or more computing devices 700 can jointly execute instructions for executing memory management methods based on the cloud management platform.

[0227] It should be noted that the memory 706 in different computing devices 700 within the computing device cluster can store different instructions, each used to execute a portion of the memory management method based on the cloud management platform. That is, the instructions stored in the memory 706 of different computing devices 700 can implement the functions of one or more modules among the first acquisition module 610, the determination module 620, the second acquisition module 630, and the recycling module 640.

[0228] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN). Figure 9 One possible implementation is shown. For example... Figure 9 As shown, Figure 9 This application provides a schematic diagram of a connection between computing devices, where two computing devices 700A and 700B are connected via a network. Specifically, they are connected to the network through communication interfaces in each computing device. In this possible implementation, the memory 706 in computing device 700A stores instructions for executing the functions of the first acquisition module 610 and the second acquisition module 630. Simultaneously, the memory 706 in computing device 700B stores instructions for executing the functions of the determination module 620 and the recycling module 640.

[0229] It should be understood that Figure 9The functions of the computing device 700A shown can also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700B can also be performed by multiple computing devices 700.

[0230] This application also provides a computer program product containing instructions. This computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any available medium. When the computer program product runs on at least one computing device, it causes the at least one computing device to execute the aforementioned memory management method based on a cloud management platform.

[0231] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium capable of being stored by a computing device, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute a memory management method based on a cloud management platform.

[0232] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as an SSD.

[0233] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A memory management method based on a cloud management platform, characterized in that, The cloud management platform is used to manage the infrastructure of cloud services. The infrastructure includes multiple computing nodes. The cloud management platform maintains the number of page faults for virtualized instances deployed in a first computing node. The multiple computing nodes include the first computing node. The method includes: Obtain a first request; the first request is used to instruct the reclamation of free storage units occupied by virtualization instances in the first compute node; In response to the first request, a first virtualization instance is determined from the virtualization instances deployed in the first compute node; the first virtualization instance is determined based on the number of page faults of the virtualization instances deployed in the first compute node. Obtain the storage information of the first free storage unit of the first virtualization instance; the free storage unit occupied by the virtualization instance in the first compute node includes the first free storage unit; Based on the storage information of the first free storage unit, the first free storage unit is reclaimed from the first virtualization instance.

2. The method according to claim 1, characterized in that, The number of page faults of the first virtualization instance is ranked among the top N of the number of page faults of the virtualization instances deployed in the first compute node, where N is a positive integer.

3. The method according to claim 1, characterized in that, The number of page faults in the first virtualization instance is less than or equal to the first threshold.

4. The method according to any one of claims 1 to 3, characterized in that, The storage information of the first free storage unit includes the storage capacity and / or physical address of the first free storage unit. Obtaining the storage information of the first free storage unit of the first virtualization instance includes: Send a second request to the first virtualization instance; the second request is used to instruct the user to obtain the storage capacity and / or physical address of the first free storage unit; Obtain the storage capacity and / or physical address of the first free storage unit returned by the first virtualization instance in response to the second request.

5. The method according to claim 4, characterized in that, Sending the second request to the first virtualization instance includes: The second request is sent to the first virtualization instance through the virtual input / output virtio queue between the cloud management platform and the first virtualization instance.

6. The method according to any one of claims 1 to 5, characterized in that, The cloud management platform is configured with a bitmap, which is used to indicate the usage of storage units by the virtualization instances deployed in the first computing node. The step of reclaiming the first idle storage unit from the first virtualization instance based on the storage information of the first idle storage unit includes: The storage information of the first free storage unit is sent to the first virtualization instance, and the storage information of the first free storage unit is used to instruct the first virtualization instance to release the first free storage unit; The field in the bitmap used to indicate the usage status of the first free storage unit is changed from a first identifier to a second identifier. The first identifier is used to indicate that the first free storage unit is occupied, and the second identifier is used to indicate that the first free storage unit is not occupied.

7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: Obtain a third request; the third request carries the storage unit capacity required by the second virtualization instance; the virtualization instance deployed in the first computing node includes the second virtualization instance; If the capacity of the unoccupied free storage unit in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, then the storage information of the second free storage unit is sent to the second virtualization instance. The unoccupied free storage units in the first computing node include the second free storage unit. The capacity of the second free storage unit is greater than or equal to the storage unit capacity required by the second virtualization instance. The storage information of the second free storage unit is used to indicate that the second virtualization instance can use the second free storage unit.

8. The method according to claim 7, characterized in that, The method further includes: If the capacity of the unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, then the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage unit from the first virtualization instance according to the storage information of the first free storage unit are executed until the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, and the storage information of the second free storage unit is sent to the second virtualization instance.

9. The method according to claim 7, characterized in that, The method further includes: If the capacity of the unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, then the second virtualization instance is migrated to the second computing node; the plurality of computing nodes includes the second computing node, and the capacity of the unoccupied free storage units in the second computing node is greater than or equal to the storage unit capacity required by the second virtualization instance.

10. The method according to any one of claims 1 to 9, characterized in that, The cloud management platform is configured with a second threshold for indicating the capacity of reserved storage units, and the method further includes: If the capacity of the unoccupied free storage units in the first computing node is less than the second threshold, then the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage unit from the first virtualization instance according to the storage information of the first free storage unit are executed until the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the second threshold.

11. The method according to any one of claims 1 to 10, characterized in that, The virtualization instance includes any one or more of the following: virtual machine, container, function.

12. The method according to any one of claims 1 to 11, characterized in that, The storage unit is any one of the following: a data block, a cache line, a data segment, or a physical storage block chunk.

13. A memory management device based on a cloud management platform, characterized in that, The device includes: The first acquisition module is used to acquire a first request; the first request is used to instruct the reclamation of idle storage units occupied by virtualization instances in the first computing node; the cloud management platform is used to manage the infrastructure of cloud services, the infrastructure includes multiple computing nodes, the cloud management platform maintains the number of page faults of virtualization instances deployed in the first computing node, and the multiple computing nodes include the first computing node; A determining module is configured to, in response to the first request, determine a first virtualization instance from the virtualization instances deployed in the first compute node; the first virtualization instance is determined based on the number of page faults of the virtualization instances deployed in the first compute node; The second acquisition module is used to acquire the storage information of the first free storage unit of the first virtualization instance; the free storage unit occupied by the virtualization instance in the first computing node includes the first free storage unit; The recycling module is used to reclaim the first free storage unit from the first virtualization instance based on the storage information of the first free storage unit.

14. The apparatus according to claim 13, characterized in that, The number of page faults of the first virtualization instance is ranked among the top N of the number of page faults of the virtualization instances deployed in the first compute node, where N is a positive integer.

15. The apparatus according to claim 13, characterized in that, The number of page faults in the first virtualization instance is less than or equal to the first threshold.

16. The apparatus according to any one of claims 13 to 15, characterized in that, The storage information of the first free storage unit includes the storage capacity and / or physical address of the first free storage unit. The second acquisition module is specifically used to send a second request to the first virtualization instance. The second request is used to instruct the acquisition of the storage capacity and / or physical address of the first free storage unit. The first virtualization instance, in response to the second request, returns the storage capacity and / or physical address of the first free storage unit.

17. The apparatus according to claim 16, characterized in that, The second acquisition module is further specifically used to send the second request to the first virtualization instance through the virtual input / output virtio queue between the cloud management platform and the first virtualization instance.

18. The apparatus according to any one of claims 13 to 17, characterized in that, The cloud management platform is configured with a bitmap, which is used to indicate the usage of storage units by the virtualization instances deployed in the first computing node. The recycling module is specifically used to send storage information of the first free storage unit to the first virtualization instance, and the storage information of the first free storage unit is used to instruct the first virtualization instance to release the first free storage unit. The field in the bitmap that indicates the usage of the first free storage unit is adjusted from a first identifier to a second identifier. The first identifier is used to indicate that the first free storage unit is occupied, and the second identifier is used to indicate that the first free storage unit is not occupied.

19. The apparatus according to any one of claims 13 to 18, characterized in that, The device also includes a capacity expansion module; The expansion module is used to obtain a third request; the third request carries the storage unit capacity required by the second virtualization instance; the virtualization instance deployed in the first computing node includes the second virtualization instance; if the capacity of the unoccupied free storage unit in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, then the storage information of the second free storage unit is sent to the second virtualization instance. The unoccupied free storage units in the first computing node include the second free storage unit. The capacity of the second free storage unit is greater than or equal to the storage unit capacity required by the second virtualization instance. The storage information of the second free storage unit is used to indicate that the second virtualization instance can use the second free storage unit.

20. The apparatus according to claim 19, characterized in that, The expansion module is further configured to, if the capacity of the unoccupied free storage units in the first computing node is less than the storage unit capacity required by the second virtualization instance, execute the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage unit from the first virtualization instance according to the storage information of the first free storage unit, until the capacity of the unoccupied free storage units in the first computing node is greater than or equal to the storage unit capacity required by the second virtualization instance, and send the storage information of the second free storage unit to the second virtualization instance.

21. The apparatus according to claim 19, characterized in that, The expansion module is further configured to migrate the second virtualization instance to the second computing node if the capacity of the unoccupied free storage unit in the first computing node is less than the storage unit capacity required by the second virtualization instance; the plurality of computing nodes includes the second computing node, and the capacity of the unoccupied free storage unit in the second computing node is greater than or equal to the storage unit capacity required by the second virtualization instance.

22. The apparatus according to any one of claims 13 to 21, characterized in that, The cloud management platform is configured with a second threshold for indicating the capacity of reserved storage units, and the device also includes a reservation module. The reserved module is configured to, if the capacity of the unoccupied free storage unit in the first computing node is less than the second threshold, execute the steps of determining the first virtualization instance from the virtualization instances deployed in the first computing node, and reclaiming the first free storage unit from the first virtualization instance according to the storage information of the first free storage unit, until the capacity of the unoccupied free storage unit in the first computing node is greater than or equal to the second threshold.

23. The apparatus according to any one of claims 13 to 22, characterized in that, The virtualization instance includes any one or more of the following: virtual machine, container, function.

24. The apparatus according to any one of claims 13 to 23, characterized in that, The storage unit is any one of the following: a data block, a cache line, a data segment, or a physical storage block.

25. A computing device cluster, characterized in that, It includes at least one computing device, each computing device including a processor and memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device to cause the cluster of computing devices to perform the method as described in any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, The storage medium stores a computer program or instructions, which, when executed by a computing device, implement the method of any one of claims 1 to 12.

27. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a computing device, the method of any one of claims 1 to 12 is implemented.