Memory management method and device based on cloud management platform

By utilizing the memory management methods of the cloud management platform and employing strategies such as memory borrowing, migration, and return, the utilization of physical host memory resources is optimized, solving the memory shortage problem caused by virtual machine migration and improving memory utilization and virtual machine reliability.

CN121900929APending Publication Date: 2026-04-21HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2024-10-21
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, releasing physical host memory solely through virtual machine migration has poor adaptability, resulting in low physical host memory utilization and significant impact on virtual machine performance.

Method used

Based on memory usage information and processing strategies, the cloud management platform optimizes memory resource utilization by selecting methods such as memory borrowing, virtualization instance migration, and memory return. This includes migrating virtualization instances to other worker nodes or requesting/releasing memory blocks to ensure the normal operation of virtualization instances.

Benefits of technology

It improves the utilization of physical host memory resources and the operational reliability of virtualization instances, avoiding the problem of virtual machines failing to run properly due to insufficient memory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900929A_ABST
    Figure CN121900929A_ABST
Patent Text Reader

Abstract

The invention discloses a memory management method and device based on a cloud management platform, and relates to the technical field of cloud computing. And the cloud management platform determines a processing mode matched with the first working node according to the memory occupation information of the first working node and the processing strategy. And the cloud management platform executes a processing mode matched with the first working node, migrates the N virtualization instances in the first working node to the second working node, and / or sends information of a third working node to the first working node. Wherein the information of the third working node is used for indicating that the first working node applies for a memory block from the third working node, or the first working node releases the occupied memory block of the third working node. Through the one or more processing modes, the memory resource of the first working node is fully utilized, and the utilization rate of the memory resource is improved.
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). Physical hosts 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 host from obtaining enough memory to run. To avoid VMs not having enough memory to run in overcommit scenarios, VMs can be migrated from one physical host to another to free up memory. However, relying solely on VM migration to free up physical host memory has limitations, poor adaptability to different physical hosts, resulting in low memory utilization on the physical host and a significant impact on VM performance. Summary of the Invention

[0003] This application provides a memory management method and apparatus based on a cloud management platform to solve the problems that relying solely on VM migration to release physical host memory has limitations in processing methods, poor adaptability to physical hosts, resulting in low memory utilization of physical hosts and significant impact on VM performance.

[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 worker nodes, wherein one or more virtualization instances are deployed in each worker node. The following description uses the execution of the cloud management platform-based memory management method provided in this embodiment as an example. The cloud management platform-based memory management method includes: the cloud management platform acquiring a user-configured processing strategy that maps multiple waterlines indicating memory usage information to multiple processing methods; the cloud management platform acquiring memory alarm information including memory usage information of a first worker node, and then determining a processing method matching the first worker node based on the memory usage information of the first worker node and the processing strategy; and the cloud management platform executing the processing method matching the first worker node, migrating N virtualization instances in the first worker node to a second worker node, and / or sending information about a third worker node to the first worker node. Among them, multiple working nodes include a first working node, a second working node, and a third working node. The information of the third working node is used to indicate: the first working node requests a memory block from the third working node, or the first working node releases the memory block occupied by the third working node. N is a positive integer.

[0005] In this application, the cloud management platform determines a matching processing method from the processing strategy based on the memory usage information of the first working node. This allows for the selection of one or more processing methods from memory borrowing (the first working node requests memory blocks from the third working node), memory return (the first working node releases memory blocks occupied by the third working node), and virtualization instance migration. This fully utilizes the memory resources of the first working node and improves memory resource utilization. Furthermore, by expanding the available memory resources of the first working node through memory borrowing and virtualization instance migration, the cloud management platform ensures the normal operation of virtualization instances running on the first working node, thereby improving the reliability of virtualization instance operation.

[0006] In one possible scenario, the cloud management platform determines the processing method that matches the first working node based on the memory usage information and processing strategy of the first working node. This includes: the cloud management platform determines the processing method that matches the first working node from the processing strategy based on the memory usage information of the first working node and the memory usage information of other working nodes among multiple working nodes excluding the first working node.

[0007] In one possible scenario, the third worker node could be a computing device or a shared memory pool.

[0008] In one possible implementation, the second and / or third worker node is the worker node with the highest memory risk among a group of worker nodes excluding the first worker node. Memory risk is determined based on one or more of the following: worker node memory usage, memory excess, memory fragmentation, and total memory capacity.

[0009] In this application, the cloud management platform determines the memory risk of multiple worker nodes through multi-dimensional indicators (one or more of the following: memory usage, memory overload, memory fragmentation, and total memory capacity). Then, it selects the worker node with the highest memory risk as the second and third worker nodes, ensuring that the second worker node can run the virtualized instance migrated from the first worker node normally, and that the virtualized instance on the third worker node can run normally after the third worker node lends memory blocks to the first worker node, thereby improving the reliability of the virtualized instance operation in the worker nodes.

[0010] In one possible scenario, the above arrangement is in ascending order. For example, the first working node in the above arrangement is the first working node in ascending order.

[0011] In another possible scenario, the above arrangement is in descending order. For example, the first working node in the above arrangement is the first working node in descending order.

[0012] In one possible implementation, the N virtualization instances are the virtualization instances ranked first among one or more virtualization instances based on a first metric. The first metric is determined based on at least one of the virtualization instance's memory usage and migration time.

[0013] In this application, since the first indicator is determined based on at least one of the memory usage of the virtualization instance and the migration time, the first indicator can be used to indicate the migration cost-effectiveness of the virtualization instance (such as the time required to migrate a virtualization instance, the memory released, etc.). By migrating the N virtualization instances with the highest migration cost-effectiveness, the efficiency of memory release of the first working node can be improved, and the virtualization instance cannot run normally due to the memory over-allocation of the first working node, thereby improving the reliability of the virtualization instance operation.

[0014] In one possible scenario, the above arrangement can be either ascending or descending.

[0015] In one possible scenario, the first metric is the memory footprint of the virtualized instance divided by the migration time.

[0016] In one possible scenario, the first metric is determined based on at least one of the virtualization instance's memory footprint and / or memory specification, and migration time. For example, memory specification is the amount of memory allocated to the virtualization instance, such as 4 gigabytes (GB), and memory footprint is the amount of memory actually used by the virtualization instance, such as only 3GB of the 4GB being used.

[0017] In one possible implementation, the migration method for moving N virtualization instances from the first working node to the second working node is as follows: the migration method that ranks first among the preset migration methods based on the second metric. The second metric is determined based on the memory usage and / or memory specifications of the virtualization instances, in conjunction with the migration method.

[0018] In this application, since the second indicator is determined based on the memory usage and / or memory specifications of the virtualization instance and the migration method, the second indicator can be used to indicate the migration cost-effectiveness of the migration method. Migrating the virtualization instance using the migration method with the highest migration cost-effectiveness can improve the migration efficiency of the virtualization instance, realize the rapid release of the memory of the first working node, and improve the reliability of the virtualization instance operation.

[0019] In one possible scenario, the aforementioned preset migration methods include: offline migration, online migration, iterative copy migration, etc.

[0020] In one possible scenario, the above arrangement can be either ascending or descending.

[0021] In one possible scenario, the second metric is determined based on the virtualization instance’s memory footprint and / or memory specifications, migration path, and migration method.

[0022] In one possible implementation, the memory usage information is the amount of memory used. The sum of the capacities of the memory blocks requested by the first worker node is the sum of the difference between the memory usage information and the first or second waterline among multiple waterlines, plus a preset value. The first waterline is greater than the second waterline.

[0023] In this application, the cloud management platform instructs the first working node to request an excess of memory blocks from the third working node (e.g., the size of the excess portion is a preset value), thereby restoring the free memory capacity of the first working node in excess, providing redundant memory for the operation of the virtualization instance, and improving the reliability of the virtualization instance operation.

[0024] In one possible scenario, the memory usage information is the amount of memory used. The sum of the capacities of the memory blocks requested by the first working node is M times the difference between the memory usage information and the first or second waterline among multiple waterlines, where M is greater than or equal to 1.

[0025] In one possible implementation, memory usage information includes one or more of the following: memory usage, memory borrowing time, and memory borrowing amount. Memory borrowing time indicates the time a first worker node borrows a memory block from a fourth worker node among multiple worker nodes, and memory borrowing amount indicates the capacity of the memory block borrowed by the first worker node from the fourth worker node.

[0026] In one possible implementation, the multiple waterlines include a first waterline, a second waterline, and a third waterline, where the first waterline > the second waterline > the third waterline. The cloud management platform determines the appropriate processing method for the first working node based on its memory usage information and processing strategy. This includes: if the memory usage information is greater than or equal to the first waterline, the cloud management platform determines, according to the processing strategy, to migrate N virtualization instances from the first working node to the second working node; if the memory usage information of the first working node after migrating the virtualization instances is greater than or equal to the second waterline but less than the first waterline, the cloud management platform determines, according to the processing strategy, that the first working node requests a memory block from the third working node; if the memory usage information is less than or equal to the third waterline, the cloud management platform determines, according to the processing strategy, that the first working node releases the memory block it occupied in the third working node.

[0027] In this application, the cloud management platform determines the processing method matching the first working node from the processing strategy based on the memory usage information and the size relationship between the first waterline, the second waterline, and the third waterline, so as to realize the corresponding management of the first working node (virtualization instance migration, memory borrowing, and memory return). While improving the utilization rate of memory resources of the first working node, it also ensures the reliability of virtualization instance operation on the first working node.

[0028] In one possible implementation, the multiple waterlines include a first waterline, a second waterline, and a third waterline, where the first waterline > the second waterline > the third waterline. The cloud management platform determines the appropriate processing method for the first working node based on its memory usage information and processing strategy. This includes: if the memory usage information is greater than or equal to the first waterline, the cloud management platform determines, according to the processing strategy, that the first working node requests a memory block from the third working node; if the memory usage information of the first working node after requesting the memory block is greater than or equal to the second waterline but less than the first waterline, the cloud management platform determines, according to the processing strategy, that N virtualization instances in the first working node be migrated to the second working node; if the memory usage information is less than or equal to the third waterline, the cloud management platform determines, according to the processing strategy, that the first working node releases the memory block it occupied in the third working node.

[0029] In this application, the cloud management platform determines the processing method matching the first working node from the processing strategy based on the memory usage information and the size relationship between the first waterline, the second waterline, and the third waterline, so as to realize the corresponding management of the first working node (virtualization instance migration, memory borrowing, and memory return). While improving the utilization rate of memory resources of the first working node, it also ensures the reliability of virtualization instance operation on the first working node.

[0030] In one possible implementation, the cloud management platform determines a matching processing method for the first working node based on its memory usage information and processing strategy. This includes: the cloud management platform determining a matching processing method for the first working node based on its memory usage information, memory jitter amplitude, and the processing strategy. The memory jitter amplitude is obtained based on the historical memory usage information of the first working node, and the processing strategy indicates the mapping relationship between multiple waterlines, the memory jitter amplitude, and various processing methods.

[0031] In this application, since the magnitude of memory jitter is obtained based on the historical memory usage information of the first working node, the historical memory usage information of the first working node is also considered when obtaining the processing method matching the first working node. This makes the obtained processing method matching the first working node closer to the actual situation of the first working node, further ensuring the reliability of the virtual machine running on the first working node and improving the utilization rate of the memory resources of the first working node.

[0032] In one possible scenario, the magnitude of memory jitter is the covariance between multiple historical memory usage information and numerical matrix of the first working node.

[0033] In one possible scenario, the memory thrashing of the first worker node is the sum of the memory thrashing of one or more virtualization instances running on the first worker node.

[0034] In one possible implementation, the multiple waterlines include a first waterline, a second waterline, and a third waterline, with the first waterline > the second waterline > the third waterline. Based on the memory usage information, memory jitter amplitude, and processing strategy of the first working node, the cloud management platform determines the appropriate processing method for the first working node, including: if the memory usage information is less than or equal to the third watermark, the cloud management platform determines, according to the processing strategy, that the first working node releases the memory blocks occupied in the third working node; if the memory usage information is greater than or equal to the first watermark, the cloud management platform determines, according to the processing strategy, to migrate N virtualization instances in the first working node to the second working node, and the first working node requests memory blocks from the third working node; if the memory usage information is greater than or equal to the second watermark and less than the first watermark, and the memory jitter amplitude of the first working node is greater than or equal to the first threshold, the cloud management platform determines, according to the processing strategy, to migrate N virtualization instances in the first working node to the second working node; if the memory usage information is greater than or equal to the second watermark and less than the first watermark, and the memory jitter amplitude of the first working node is less than the first threshold, the cloud management platform determines, according to the processing strategy, that the first working node requests memory blocks from the third working node.

[0035] In this application, the cloud management platform determines the processing method matching the first working node from the processing strategy based on the relationship between memory usage information and the first, second, and third waterline, as well as the relationship between the amplitude of memory jitter and the first threshold. This enables corresponding management of the first working node (virtualization instance migration, memory borrowing, and memory return), improving the utilization rate of memory resources on the first working node while ensuring the reliability of virtualization instance operation on the first working node.

[0036] In one possible scenario, the virtualization instances described above include containers, virtual machines, or functions.

[0037] In one possible scenario, the memory block requested by the first working node from the third working node is used to store data in the first working node whose access frequency or number of accesses is less than a second threshold.

[0038] In this application, since data with access frequency or number of accesses less than the second threshold usually has a low access probability, the first working node stores the data with access frequency or number of accesses less than the second threshold in the memory block of the third working node. This has a small impact on the performance of the business on the first working node and ensures the efficient operation of the business.

[0039] In one possible scenario, the memory usage information of the first worker node after the cloud management platform executes the processing method matching the first worker node is within a set range, and multiple waterlines include the endpoint values ​​of the set range.

[0040] In another possible scenario, due to insufficient available memory block capacity and insufficient migrateable virtualization instances, after the cloud management platform executes the processing method (memory borrowing, virtualization instance migration) matching the first worker node, the memory usage information of the first worker node is outside the set range, such as the memory usage information of the first worker node being greater than or equal to the first waterline.

[0041] In another possible scenario, since the first working node has a small capacity of memory blocks that can be returned, after the cloud management platform executes a processing method that matches the first working node (such as memory return), the memory usage information of the first working node is outside the set range, such as the memory usage information of the first working node being less than or equal to the third waterline.

[0042] 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 cloud services, the infrastructure including multiple worker nodes, wherein one or more virtualization instances are deployed in each worker node. Exemplarily, the cloud management platform-based memory management device includes: a first acquisition module, a second acquisition module, a determination module, and an execution module.

[0043] The first acquisition module is used to acquire the processing strategy configured by the user; the processing strategy is used to indicate the mapping relationship between multiple waterlines of memory usage information and multiple processing methods.

[0044] The second acquisition module is used to acquire memory alarm information of the first working node; the memory alarm information includes memory usage information of the first working node, and the first working node is included among multiple working nodes.

[0045] The determination module is used to determine the processing method that matches the first working node based on the memory usage information and processing strategy of the first working node.

[0046] The execution module is used to execute the processing method matched to the first worker node, migrating N virtualization instances in the first worker node to the second worker node, and / or sending information about the third worker node to the first worker node. The multiple worker nodes include the second and third worker nodes. The information from the third worker node is used to instruct: the first worker node to request a memory block from the third worker node, or the first worker node to release a memory block it is occupying in the third worker node, where N is a positive integer.

[0047] 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.

[0048] Thirdly, this application provides a chip. The chip includes: a processor and a power supply circuit; the power supply circuit is used to supply power to the processor, and the processor is used to execute the method in the first aspect or any possible implementation of the first aspect.

[0049] 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.

[0050] 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.

[0051] 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.

[0052] 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

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

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

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

[0056] Figure 4 A schematic diagram showing the correspondence between a water line and a treatment method provided in this application;

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

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

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

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

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

[0062] To address the issue of low memory utilization in physical hosts, this application provides a memory management method based on a cloud management platform. The cloud management platform determines a matching processing method for a first working node based on its memory usage information and processing strategy. The cloud management platform then executes this matching processing method, migrating N virtualization instances from the first working node to a second working node, and / or sending information about a third working node to the first working node. The information about the third working node instructs the first working node to request a memory block from the third working node, or to release a memory block it has been using from the third working node.

[0063] In this application, the cloud management platform determines a matching processing method from the processing strategy based on the memory usage information of the first working node. This allows for the selection of one or more processing methods from memory borrowing (the first working node requests memory blocks from the third working node), memory return (the first working node releases memory blocks occupied by the third working node), and virtualization instance migration. This fully utilizes the memory resources of the first working node and improves memory resource utilization. Furthermore, by expanding the available memory resources of the first working node through memory borrowing and virtualization instance migration, the cloud management platform ensures the normal operation of virtualization instances running on the first working node, thereby improving the reliability of virtualization instance operation.

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

[0065] Virtualization instance migration refers to moving a virtualization instance from one worker node (such as the first worker node) to another worker node (such as the second worker 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.

[0066] Memory borrowing refers to a worker node (e.g., the first worker node) using a memory block borrowed by another worker node (e.g., the third worker node) through a channel (e.g., a high-speed interconnect network). Memory borrowing is relatively quick; the time-consuming part is establishing the link and mapping relationship between the first and third worker nodes.

[0067] Memory return refers to a worker node (such as the first worker node) releasing (returning) a memory block borrowed from another worker node (such as the third worker node) via a channel. The memory block released by the first worker node is then reallocated and used by the third worker node. Memory return is the reverse operation of memory borrowing, and its time consumption is also short. Before releasing the memory block from the third worker node, the first worker node must first transfer the data stored in that memory block.

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

[0069] Memory fragmentation refers to unused space between allocated memory blocks. This fragmentation reduces memory utilization, thus affecting the performance and stability of worker nodes. The amount of memory fragmentation refers to the size of this unused space.

[0070] Memory over-allocation 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 worker node is 125GB, and the actual physical memory allocated to the first worker node is 100GB, then the first worker node experiences memory over-allocation, with the excess exceeding 25GB.

[0071] Memory jitter refers to the change in memory usage by worker nodes or virtualization instances. Memory jitter can be measured as either the memory jitter of the worker node or the memory jitter of the virtualization instance.

[0072] 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.

[0073] See Figure 1 , Figure 1A 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 worker node cluster 120. The cloud management platform 110 manages the worker node cluster 120. The cloud management platform 110 and the worker 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.

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

[0075] In this application, the cloud management platform 110 provides a policy configuration interface (such as an application programming interface (API)) to the outside world. This policy configuration interface is used to obtain the processing policies configured by the user. For a detailed description of the processing policies, please refer to the following. Figure 2 The content shown will not be repeated here.

[0076] In one possible example, the cloud management platform 110 obtains the processing policy from the user and memory alarm information including the memory usage information of the first worker node. Then, based on the memory usage information of the first worker node and the processing policy, it determines the processing method that matches the first worker node and executes the processing method that matches the first worker node.

[0077] The first worker node in the worker node cluster 120 collaboratively performs one or more of the following: migrating a virtualization instance to a second worker node, requesting a memory block from a third worker node, and releasing the memory block occupied by the first worker node in the third worker node.

[0078] 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 worker node cluster 120.

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

[0080] In one possible scenario, the cloud management platform 110 and the working nodes described above 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 above processing units, such as terminals, servers, etc.

[0081] In another possible scenario, the cloud management platform 110 and the worker 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 worker nodes execute to implement the functions of the components deployed on it.

[0082] 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.

[0083] The worker node cluster 120 may include multiple worker nodes. For example, these multiple worker nodes may include worker node 121, worker node 122, worker node 123, worker node 124, and worker node 125. Worker nodes may be physical machines, shared memory pools, etc.; if a worker node is a physical machine, it may be a computing device such as a server. The cloud management platform 110 may also be a physical machine or a virtual machine; if the cloud management platform 110 is a physical machine, it may be a management device. The cloud management platform 110 can be used to interact with users and, based on the processing policies configured by the user, determine the processing method matching the first worker node.

[0084] In one possible example, at least one of the aforementioned worker nodes has one or more virtualization instances deployed on it. These virtualization instances may include virtual machines (VMs), containers (PODs), or functions.

[0085] 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.

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

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

[0088] 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.

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

[0090] It should be noted that, Figure 1The 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 worker nodes.

[0091] 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.

[0092] 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 worker nodes, where each worker node deploys one or more virtualization instances. These worker nodes include worker node 121, worker node 122, and worker node 123. Worker node 121 can also be referred to as the first worker node, worker node 122 as the second worker node, and worker node 123 as the third worker node. The processing strategy indicates multiple waterlines, including a first waterline, a second waterline, and a third waterline, where the order is: first waterline > second waterline > third waterline. Figure 2 As shown, the memory management method based on the cloud management platform includes the following steps S210-S240.

[0093] S210 and cloud management platform 110 obtain user configuration processing strategies.

[0094] The processing strategy is used to indicate the mapping relationship between multiple waterlines of memory usage information and various processing methods.

[0095] Regarding the content of the processing strategy, two possible examples are provided below.

[0096] Example 1: The processing strategy can be found in Table 1 below.

[0097] Table 1

[0098] Waterline Handling method First water level: 92% / 530GB Virtualization instance migration Second water line: 85% / 500GB Memory borrowing Third water line: 80% / 480GB Memory return

[0099] It is worth noting that Table 1 above uses memory usage information as an example, specifically memory usage amount (memory usage or the ratio of memory usage to total memory capacity). In other embodiments of this application, memory usage information may also include memory borrowing time, memory borrowing amount, etc. Taking memory borrowing amount as an example, if the waterline is 10GB, the corresponding processing method is virtualization instance migration; if the waterline is 5GB, the corresponding processing method is memory borrowing.

[0100] It is worth noting that the watermarks and corresponding processing methods in Table 1 above are merely examples and should not be construed as limiting this application. In this application, the correspondence between watermarks and corresponding processing methods can be set according to user needs. For example, the processing method corresponding to the first watermark is memory borrowing, and the processing method corresponding to the second watermark is virtualization instance migration. Table 1 above may also include more or less content. For example, when the cloud management platform determines that the processing method is virtualization instance migration, the processing strategy also includes the means of determining the target working node a (such as working node 122 below) and the virtualization instances to be migrated (such as the N virtualization instances below) corresponding to the virtualization instance migration.

[0101] Example 2: The processing strategy is to configure the user's YAML (YAML is not markup language) file.

[0102] The YAML file includes mappings between multiple waterlines of memory usage information and various processing methods. These mappings include: virtualization instance migration, memory borrowing, and memory return. Furthermore, the aforementioned YAML file also includes methods for determining the target worker node a (as described in worker node 122 below) during virtualization instance migration, the virtualization instances to be migrated (as described in N virtualization instances below), the target worker node b (as described in worker node 123 below) during memory borrowing, and the target worker node c (as described in worker node 123 below) during memory return.

[0103] For details on the determination methods mentioned above, please refer to the following content on determining working node 122, working node 123, virtualization instance, migration method, etc., which will not be repeated here.

[0104] In one possible implementation, the cloud management platform 110 obtains the processing policy configured by the user, including: the cloud management platform 110 obtains the processing policy sent by the terminal 130.

[0105] 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 these triggering operations, terminal 130 obtains the user-configured processing strategy and sends it to cloud management platform 110.

[0106] Three possible examples are provided below for the specific implementation of the triggering operation.

[0107] 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-configured processing strategy.

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

[0109] 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 whether the candidate option corresponding to the clicked control component is a processing strategy, waterline, processing method, etc.

[0110] For example, the above multiple options are multiple values ​​of the waterline (such as 50%, 60%, 80%, 85%, 92%, etc.) and processing methods (virtualization instance migration, memory borrowing, memory return), etc.

[0111] For example, the above-mentioned multiple options are determined by various methods, such as selecting the virtualization instance with the highest memory usage as the virtualization instance to be migrated, or selecting the virtualization instance with the highest memory usage as the virtualization instance to be migrated.

[0112] Example 3: The triggering operation can be the user's input operation in the control unit via the keyboard, such as the input processing strategy or the contents included in the processing strategy (such as waterline, processing method, determination means, etc.).

[0113] S220 and cloud management platform 110 obtain memory alarm information from worker node 121.

[0114] The memory alarm information includes the memory usage information of worker node 121.

[0115] In one possible scenario, memory alarm information may include memory return alarms or memory escape alarms. Memory return alarms are used to indicate alarms triggered by worker nodes whose memory usage is less than or equal to the third watermark, while memory escape alarms are used to indicate alarms triggered by worker nodes whose memory usage is greater than or equal to the second watermark.

[0116] Regarding the memory alarm information obtained by the cloud management platform 110 from the worker node 121, the following are two possible scenarios.

[0117] In the first possible scenario, worker node 121 triggers an alarm based on its own memory usage information, and then sends a memory alarm message to cloud management platform 110.

[0118] In the second possible scenario, worker node 121 sends memory usage information to cloud management platform 110, and then cloud management platform 110 triggers an alarm based on the memory usage information of worker node 121, and obtains the memory alarm information of worker node 121.

[0119] In one possible example, memory usage information includes one or more of the following: memory usage, memory borrowing time, and memory borrowing amount.

[0120] The memory borrowing time indicates the time during which worker node 121 borrows a memory block from worker node 124 (the fourth worker node) among multiple worker nodes. The memory borrowing amount indicates the capacity of the memory block that worker node 121 borrows from worker node 124.

[0121] The following explanation uses memory usage as an example. For information on memory usage as memory borrowing time or memory borrowing amount, please refer to the description of memory usage as memory usage amount, which will not be repeated here.

[0122] S230 and cloud management platform 110 determine processing method a based on the memory usage information and processing strategy of worker node 121.

[0123] Among them, processing method a can also be called the processing method that matches working node 121.

[0124] In one possible implementation, the cloud management platform 110 determines processing method a based on the memory usage information of the worker node 121 and the processing strategy, including: the cloud management platform 110 determines processing method a from the processing strategies shown in Table 1 above based on the memory usage information of the worker node 121.

[0125] For example, if the memory usage information of worker node 121 is memory usage amount, and the memory usage amount is 93%, then the cloud management platform 110 determines that the memory usage amount of worker node 121 is greater than the first threshold (e.g., 92%), and the processing method that matches the memory usage information of the first worker node includes virtualization instance migration (e.g., migrating N virtualization instances in worker node 121 to worker node 122 in S240).

[0126] In one possible scenario, after determining that processing method a includes virtualization instance migration, cloud management platform 110 will further determine the target worker node a (such as worker node 122) to which the virtualization instances will be migrated, the N virtualization instances to be migrated, and the migration method of the virtualization instances, thereby obtaining processing method a. N is a positive integer.

[0127] For details regarding determining the worker node to which virtualization instances will be migrated, the N virtualization instances to be migrated, and the migration method for the virtualization instances, please refer to the following determination method a or Figure 3 The detailed description of the content shown is not repeated here.

[0128] For example, if the cloud management platform 110 determines that the memory usage of worker node 121 is still greater than the second watermark after the virtualization instance migration is performed, then processing method a also includes memory borrowing (such as worker node 121 requesting a memory block from worker node 123).

[0129] In one possible scenario, the cloud management platform 110, in determining processing method a, also includes memory borrowing, and will further determine the target worker node b (such as worker node 123) for memory borrowing, as well as the capacity of the memory block to be borrowed.

[0130] For details regarding determining the target working node b for memory borrowing and the capacity of the memory block to be borrowed, please refer to the description of determining working nodes 123 and the capacity of the memory block to be borrowed below, which will not be repeated here.

[0131] It is worth noting that the order in which the cloud management platform 110 first determines that processing method a includes virtualization instance migration, and then determines that processing method a also includes memory borrowing, is reversible. In other words, the processing method corresponding to the first watermark is memory borrowing, and the processing method corresponding to the second watermark is virtualization instance migration. Therefore, the cloud management platform 110 can first determine that processing method a includes memory borrowing, and further determine that after executing memory borrowing, the memory usage information of worker node 121 is still greater than the second watermark, then determine that processing method a also includes virtualization instance migration.

[0132] Alternatively, processing method a can also be: memory borrowing.

[0133] Optionally, processing method a can also be: memory return (e.g., worker node 121 releases the memory block occupied in worker node 123). For example, when cloud management platform 110 determines that the memory usage information is less than or equal to the third watermark, it determines that processing method a is memory return.

[0134] Optionally, the cloud management platform 110 determines processing method a based on the memory usage information of the first working node and the processing strategy. This includes: the cloud management platform 110 determines processing method a based on the memory usage information of the first working node, the magnitude of memory jitter, and the processing strategy. The magnitude of memory jitter is obtained based on the historical memory usage information of the first working node, and the processing strategy is used to indicate the mapping relationship between multiple waterlines, the magnitude of memory jitter, and multiple processing methods.

[0135] For the description of this optional example, please refer to the following: Figure 5 The content shown will not be repeated here.

[0136] S240, the cloud management platform 110 executes processing method a, which migrates N virtualization instances in worker node 121 to worker node 122, and / or sends information about worker node 123 to worker node 121.

[0137] Specifically, sending information about worker node 123 to worker node 121 to instruct worker node 121 to borrow or return memory takes less time than migrating N virtualization instances from worker node 121 to worker node 122.

[0138] Regarding the content of S240 above, four possible examples are provided below.

[0139] In the first possible example, cloud management platform 110 performs processing method a, which migrates N virtualization instances in worker node 121 to worker node 122.

[0140] In the second possible example, the cloud management platform 110 performs processing method a, sending information about worker node 123 to worker node 121. This information about worker node 123 is used to instruct worker node 121 to request a memory block from worker node 123.

[0141] For example, the information of worker node 123 may include: the identifier of worker node 123, and the capacity of the memory block borrowed from worker node 123. The identifier of worker node 123 may be its name or identity document (ID), etc.

[0142] In a third possible example, cloud management platform 110 performs processing method a, sending information about worker node 123 to worker node 121. This information about worker node 123 is used to instruct worker node 121 to release the memory block occupied by worker node 123.

[0143] For example, the information of worker node 123 includes: the identifier of worker node 123 and the capacity of the memory block to be released from worker node 123.

[0144] For example, the information for worker node 123 includes: the identifier of the memory block. The identifier of the memory block is the name or ID of the memory block, etc.

[0145] In the fourth possible example, the cloud management platform 110 performs processing method a, which migrates N virtualization instances in worker node 121 to worker node 122, and sends information about worker node 123 to worker node 121, which instructs worker node 121 to request a memory block from worker node 123.

[0146] It is worth noting that this application does not limit the execution order of migrating N virtualization instances in worker node 121 to worker node 122, and sending information of worker node 123 to worker node 121; they can be executed sequentially or simultaneously.

[0147] Regarding the changes in memory usage information of worker node 121 after cloud management platform 110 executes processing method a, the following three possible scenarios are shown.

[0148] In one possible scenario, the memory usage information of the worker node 121 after the cloud management platform 110 executes processing method a is within the set range.

[0149] In one possible scenario, multiple waterlines may include endpoint values ​​within a defined range.

[0150] For example, the endpoints of the set range are the second and third watermarks. That is, when the memory usage information of worker node 121 is between the second and third watermarks, the cloud management platform 110 will not obtain the memory alarm information of worker node 121.

[0151] For example, the endpoint values ​​of the set range are the first waterline and the third waterline, respectively.

[0152] In the second possible scenario, since the available memory block capacity and the number of migrated virtualization instances are insufficient for worker node 121, after the cloud management platform 110 executes the processing method (memory borrowing, virtualization instance migration) that matches worker node 121, the memory usage information of worker node 121 is outside the set range, such as the memory usage information of worker node 121 being greater than or equal to the first waterline.

[0153] In the third possible scenario, since the capacity of the memory blocks that can be returned by worker node 121 is small, after the cloud management platform 110 executes the processing method that matches worker node 121 (such as memory return), the memory usage information of worker node 121 is outside the set range, such as the memory usage information of worker node 121 being less than or equal to the third waterline.

[0154] It is worth noting that this embodiment only uses multiple water lines including a first water line, a second water line, and a third water line as an example for illustration. In other embodiments of this application, multiple water lines may include more or fewer water lines, which is not limited in this application.

[0155] In this application, the cloud management platform 110, by executing processing method a, keeps the memory usage information of worker node 121 within a set range, thereby maintaining the memory load of worker node 121 within a controllable range (the set range) and improving the reliability of the virtualization instances running on worker node 121. Furthermore, through virtual machine migration, memory borrowing, and memory return, it fully utilizes the memory resources of the entire worker node cluster, improving the overall memory utilization of the worker node cluster.

[0156] Optionally, regarding the content of processing method a determined by the cloud management platform 110, three embodiments are provided below.

[0157] In a first possible embodiment, the cloud management platform 110 determines processing method a as virtualization instance migration from the processing strategies shown in Table 1 above, based on the memory usage information of the first working node.

[0158] The following describes, in sequence, that after processing method a (virtualization instance migration), it is also necessary to determine the target worker node a (e.g., worker node 122) to which the virtualization instances will be migrated, the N virtualization instances to be migrated, and the migration method for the virtualization instances. This application does not limit the order in which worker node 122, the N virtualization instances to be migrated, and the migration method for the virtualization instances are determined. In one possible example, the cloud management platform first determines the N virtualization instances to be migrated, then determines worker node 122, and finally determines the migration method for the virtualization instances.

[0159] It is worth noting that each of the N virtualization instances corresponds to a target worker node a. Therefore, the following description of worker node 122 and the migration method of virtualization instances is based on a single virtualization instance (virtualization instance a).

[0160] In one possible scenario, the cloud management platform 110 identifies worker node 122 from among the worker nodes other than worker node 121, and worker node 122 is the worker node with the highest memory risk among the worker nodes other than worker node 121.

[0161] In one possible example, memory risk is determined based on one or more of the following: worker node memory footprint, memory overload, memory fragmentation, and total memory capacity.

[0162] For example, the higher the memory usage of a worker node, the higher the memory risk; the larger the memory overload of a worker node, the higher the memory risk; the smaller the individual memory fragments and the larger the total number of memory fragments, the higher the memory risk of a worker node; and the larger the total memory capacity, the lower the memory risk of a worker node.

[0163] For example, the smaller the ratio of memory usage to total memory capacity, the lower the memory risk of a working node; the smaller the ratio of memory excess to total memory capacity, the lower the memory risk of a working node; and the smaller the ratio of memory fragmentation to total memory capacity, the lower the memory risk of a working node.

[0164] For example, the ratio of memory usage to total memory capacity is used as the primary indicator. If at least two worker nodes have the same ratio of memory usage to total memory capacity, then the ratio of memory excess to total memory capacity is used as a secondary indicator. In this case, the smaller the ratio of memory excess to total memory capacity, the lower the memory risk of the worker node.

[0165] For example, the ratio of memory usage to total memory capacity is the primary indicator, while the ratio of memory excess to total memory capacity is the secondary indicator. If the ratios of memory usage to total memory capacity of at least two worker nodes are the same, and the ratios of memory excess to total memory capacity are the same, then the ratio of memory fragmentation to total memory capacity is the least important indicator. Consequently, the smaller the ratio of memory fragmentation to total memory capacity, the lower the memory risk of the worker node.

[0166] In another possible scenario, the cloud management platform 110 determines N virtualization instances from one or more virtualization instances deployed in worker node 121. These N virtualization instances are the virtualization instances that rank highest among the one or more virtualization instances in terms of the first metric (migration cost-effectiveness a).

[0167] In one possible scenario, the above arrangement is in descending order.

[0168] In another possible scenario, the above arrangement is an ascending order.

[0169] In one possible example, the first metric is determined based on at least one of the virtualization instance's memory footprint and migration time.

[0170] For example, the first metric is memory usage; the higher the memory usage of a virtualization instance, the higher the first metric. The first metric is migration time; the lower the migration time of a virtualization instance, the higher the first metric.

[0171] For example, the first metric is the ratio of memory usage to migration time. The higher the ratio of memory usage to migration time, the higher the first metric for the virtualization instance.

[0172] The migration time mentioned above is determined by the cloud management platform 110 based on one or more of the virtualization instance's memory usage, migration method, and migration path. For example, the cloud management platform 110 determines the first indicator of the virtualization instance based on memory usage, migration method, and migration path.

[0173] Optionally, the migration path is used to represent the devices (such as worker nodes, switches, etc.) that need to be passed through to migrate the virtualization instance in worker node 121 to worker node 122. The more devices that need to be passed through in the migration path, the longer the migration time will be.

[0174] It is worth noting that the memory usage of the virtualization instance in this example is the actual memory usage of the virtualization instance, which includes the capacity of the memory block occupied by the virtualization instance on worker node 121 and the capacity of the memory block borrowed by the virtualization instance.

[0175] It is worth noting that after the cloud management platform 110 migrates N virtualization instances to worker node 122, the memory usage of worker node 121 is less than the first watermark, or less than the second watermark. If the memory usage of worker node 121 is less than the first watermark and greater than the second watermark, the cloud management platform 110 will also determine processing method a, which includes memory borrowing, so that the memory usage of worker node 121 is adjusted to be less than the second watermark and greater than the third watermark.

[0176] The following example illustrates the migration method for virtualization instance a among N virtualization instances. The migration methods for other virtualization instances besides virtualization instance a can be found in the description of virtualization instance a, and will not be repeated here.

[0177] In another possible scenario, the cloud management platform 110 determines the migration method with the second indicator ranked first from the preset migration methods. The migration method with the second indicator ranked first is the migration method of migrating the virtualization instance a in worker node 121 to worker node 122.

[0178] In one possible scenario, the above arrangement is in descending order.

[0179] In another possible scenario, the above arrangement is an ascending order.

[0180] In one possible example, the second metric (migration cost-effectiveness b) is determined based on the memory footprint and / or memory specifications of the virtualization instance a, along with the migration method.

[0181] Example 1: The cloud management platform 110 can determine the migration time under different preset migration methods based on the memory usage and / or memory specifications of virtualization instance a and the migration method, and then use the migration time as a second indicator. For example, when the memory usage and / or memory specifications are fixed, the migration time of offline migration, online migration, and iterative copy migration gradually decreases.

[0182] Example 2: The cloud management platform 110 divides the memory usage or memory specification of the virtualization instance a above by the migration time in Example 1 as the second indicator.

[0183] Example 3: The cloud management platform 110 determines the migration time under different preset migration methods based on the memory usage and / or memory specifications, migration path, and migration method of virtualization instance a, and then uses the aforementioned migration time as a second indicator. For example, when the memory usage and / or memory specifications are fixed, the minimum migration time a for each migration path when using offline migration, the minimum migration time b for each migration path when using online migration, and the minimum migration time c for each migration path when using iterative copy migration.

[0184] Example 4: The cloud management platform 110 divides the memory usage or memory specifications of the virtualization instance a above by the migration time in Example 3 as the second indicator.

[0185] In a second possible embodiment, the cloud management platform 110 determines processing method a as memory borrowing from the processing strategies shown in Table 1 above, based on the memory usage information of the first working node.

[0186] The following explains that after processing method a is memory borrowing, it is also necessary to determine the target working node b (such as working node 123) and the capacity of the memory block to be borrowed.

[0187] In one possible scenario, the cloud management platform 110 determines worker node 123 from among the worker nodes other than worker node 121, and worker node 123 is the worker node with the highest memory risk among the worker nodes other than worker node 121.

[0188] For the content of this situation, please refer to the description in the first possible embodiment above, which will not be repeated here.

[0189] In another possible scenario, where the memory usage information is the amount of memory used, the sum of the capacities of the memory blocks requested by worker node 121 is: the difference between the memory usage information and the first or second waterline among multiple waterlines, plus a preset value.

[0190] In one possible example, the sum of the sizes of the memory blocks requested by worker node 121 is the sum of the difference 'a' between the memory usage of worker node 121 and the first watermark, and a preset value (such as 2GB).

[0191] By setting preset values, the memory resources of worker node 121 can be over-recovered, preventing the same alarm (such as an alarm exceeding the first waterline) from occurring again in a short period of time.

[0192] For example, after the cloud management platform 110 determines that the memory usage information of the worker node 121 is still between the first waterline and the second waterline after the worker node 121 performs the above memory borrowing, the cloud management platform 110 can determine to migrate the virtualization instance in the worker node 121 until the memory usage information of the worker node 121 is between the second waterline and the third waterline.

[0193] For example, if the cloud management platform 110 determines that the total capacity of the memory blocks requested by the worker node 121 is 10GB, and the capacity of the free memory blocks in the worker node 123 is 10GB, then the cloud management platform 110 can determine to borrow 10GB from the worker node 123.

[0194] It is worth noting that when determining worker node 123, the cloud management platform 110 must also ensure that the memory usage information of worker node 123 after lending out the memory block remains between the second and third watermarks. Furthermore, it must also ensure that the target worker node b includes as few worker nodes as possible. For example, if there are two memory lending schemes: worker node 123 can lend out a memory block with a capacity of 10GB, and the sum of the memory block capacities that worker nodes 124 and 125 can lend out is 10GB, and both of these schemes meet the memory block capacity required by worker node 121, the scheme with fewer worker nodes will be selected, meaning worker node 121 will request a 10GB memory block from worker node 123.

[0195] In another possible example, the sum of the memory blocks requested by worker node 121 is the sum of the difference b between the memory usage of worker node 121 and the second watermark, and a preset value (such as 2GB).

[0196] The cloud management platform 110 determines the sum of the capacity of the borrowed memory blocks as the sum of the difference b and the preset value. Therefore, after the above memory borrowing is performed, the memory usage information of the worker node 121 is between the second and third watermarks, which improves the reliability of the virtualization instance running on the worker node 121 and improves the overall memory resource utilization of the worker node cluster 120.

[0197] In a third possible embodiment, the cloud management platform 110 determines processing method a as memory return from the processing strategies shown in Table 1 above, based on the memory usage information of the first working node.

[0198] The following explains that after processing method a (memory return), it is also necessary to determine the target working node c (such as working node 1, 2, or 3) and the capacity of the memory block to be returned.

[0199] In one possible scenario, the cloud management platform 110 identifies worker node 123 from among the multiple worker nodes that borrowed memory blocks from worker node 121. Worker node 123 is the worker node with the highest memory risk among the multiple worker nodes that lent memory blocks to worker node 121.

[0200] In one possible example, the above arrangement is in descending order.

[0201] In one possible example, the above arrangement is an ascending order.

[0202] For example, if the cloud management platform 110 determines that after worker node 121 releases the memory block borrowed from worker node 123, the memory usage information of worker node 121 is still less than the third watermark, then the cloud management platform 110 will again determine from the multiple worker nodes that lent the memory block to worker node 121 the worker node with the highest memory risk ranking, and determine that worker node 121 releases the memory block borrowed from that worker node. The aforementioned steps are repeated until the memory usage information of worker node 121 is between the second and third watermarks, or until all the memory blocks borrowed by worker node 121 are returned.

[0203] For example, the cloud management platform 110 determines the top P working nodes from a memory risk ranking in descending order, and the sum of the capacity of the memory blocks lent by the top P working nodes to working node 121 is between the difference between the memory usage information of working node 121 and the third watermark and the difference between the memory usage information of working node 121 and the second watermark.

[0204] It is worth noting that the cloud management platform 110 determines the principle for returning memory blocks to worker nodes 121 as follows: priority is given to returning memory blocks to worker nodes with high memory risk; when memory risks are consistent, priority is given to returning memory blocks with larger capacities. Memory risk is determined based on one or more of the following: memory usage, memory overload, memory fragmentation, and total memory capacity.

[0205] For example, the capacity of the memory block that worker node 121 can return (the difference between the memory usage information and the third watermark) is 5GB. The capacity of the memory block that worker node 121 borrows from worker node 123 is 5GB. The capacity of the memory block that worker node 121 borrows from worker node 124 is 3GB. The capacity of the memory block that worker node 121 borrows from worker node 125 is 2GB. Therefore, according to the aforementioned principle, when the memory risks of worker nodes 123 and 124 are the same, the cloud management platform 110 determines that the memory block with the larger capacity should be returned first, and will prioritize returning the memory block borrowed from worker node 123.

[0206] It is worth noting that the above three possible implementations are all content of the cloud management platform 110 in the decision-making stage, and the cloud management platform has not yet specifically implemented processing method a.

[0207] Regarding the above Figure 2 The memory management method based on the cloud management platform shown below provides three complete embodiments. These three complete embodiments are illustrated using a virtual machine (VM) in a virtualized instance as an example. Figures 3-5 This will be explained in detail based on the above.

[0208] In the first possible embodiment, such as Figure 3 As shown, Figure 3 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 2 . Figure 4 The content shown includes the following steps S310-S380.

[0209] S310 and cloud management platform 110 obtain user configuration processing strategies.

[0210] S320 and cloud management platform 110 obtain memory alarm information sent by worker node 121.

[0211] S330. If the memory usage information included in the memory alarm information is less than or equal to the third waterline, the cloud management platform 110 determines the processing method a as memory return based on the memory usage information and processing strategy of the working node 121 in the memory alarm information.

[0212] In one possible scenario, the cloud management platform 110 determines that processing method a is memory return based on the memory usage information and processing strategy of worker node 121 in the memory alarm information. This includes: the cloud management platform 110 determines that processing method a is memory return based on the memory usage information and processing strategy of worker node 121 in the memory alarm information, as well as the memory risk of the worker node lending the memory block to worker node 121.

[0213] S340 and cloud management platform 110 send information about worker node 123 to worker node 121.

[0214] The information from worker node 123 is used to instruct worker node 121 to release the memory block of worker node 123. The information from worker node 123 includes: the address or identifier of the memory block to be returned.

[0215] The memory blocks to be returned are located in worker node 123.

[0216] S350a. If the memory usage information of worker node 121 in the memory alarm information is greater than or equal to the first waterline (or the duration of being greater than or equal to the second waterline exceeds the preset time), then the cloud management platform 110 determines the processing method a, which includes memory borrowing, based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0217] The parameters required to perform memory borrowing include: the name or identifier of the working node lending the memory block, and the capacity of the memory block to be borrowed from the working node lending the memory block. Processing method a includes the aforementioned parameters required to perform memory borrowing.

[0218] All the aforementioned worker nodes include worker node 121 and remote worker nodes. The remote worker nodes are all worker nodes in the worker node cluster 120 except for worker node 121. The memory usage information of the remote worker nodes is periodically reported by the remote worker nodes to the cloud management platform 110, or the cloud management platform 110 actively obtains the memory usage information of the remote worker nodes. The remote worker node includes worker node 123.

[0219] Regarding the parameters required to perform the memory borrowing mentioned above, two possible examples are provided below.

[0220] Example 1: The cloud management platform 110 determines the capacity of the memory block to be borrowed from the working node that lends the memory block, including: the cloud management platform 110 determines the difference between the memory usage information of the working node 121 and the first watermark or the second watermark, and the sum of the preset values ​​is the sum of the capacity of the borrowed memory block.

[0221] In one possible scenario, the borrowed memory blocks determined by the cloud management platform 110 must satisfy memory borrowing constraint a. Memory borrowing constraint a includes one or more of the following: the individual memory block borrowed is between a set minimum and a set maximum value; the memory regions included in the memory block are byte-aligned; the sum of the capacities of the memory blocks borrowed by the worker node 121 is less than or equal to threshold a; and the number of memory blocks borrowed is less than or equal to threshold b.

[0222] For example, if the sum of the capacity of the memory blocks borrowed by worker node 121 is 5GB, the cloud management platform 110 determines that the sizes of the memory blocks to be borrowed are 2GB, 2GB, and 1GB, respectively, and the aforementioned three memory blocks to be borrowed satisfy the above memory borrowing constraint a.

[0223] In one possible scenario, the cloud management platform 110 determines that M times the difference between the memory usage information of the worker node 121 and the first or second watermark is the sum of the borrowed memory block capacities. M is greater than 1, for example, 1.5 or 1.2, etc. M is configured by the user and is not limited in this application.

[0224] Example 2: The cloud management platform 110 determines the name or identifier of the working node for lending memory blocks, including: the cloud management platform 110 selects a working node with low memory risk as the working node for lending memory blocks, and then obtains the name or identifier of the working node for lending memory blocks.

[0225] Among them, memory risk is determined based on one or more of the following: memory usage, memory overload, memory fragmentation, and total memory capacity.

[0226] In one possible scenario, when selecting a low-memory-risk worker node as the worker node to lend memory blocks, the cloud management platform 110 must satisfy memory borrowing constraint b. Memory borrowing constraint b includes one or more of the following: the total capacity of memory blocks lent out by a single remote worker node is less than or equal to threshold c; the total number of worker nodes lending memory blocks is less than or equal to threshold d; the total capacity of memory blocks borrowed by worker node 121 is less than or equal to threshold e; and the network topology between worker node 121 and remote worker nodes (e.g., data transfer between worker node 121 and remote worker nodes only passes through nodes less than or equal to threshold f).

[0227] S360. If the cloud management platform 110 predicts that after the memory borrowing is completed, the memory usage information of worker node 121 is less than the second watermark and greater than the third watermark, then the cloud management platform 110 will perform memory borrowing and send the information of worker node 123 to worker node 121 to instruct worker node 121 to request a memory block from worker node 123.

[0228] The information of the aforementioned worker node 123 includes: the name, identifier or address of the worker node 123, and the capacity of the memory block borrowed from the worker node 123.

[0229] S370. If the cloud management platform 110 predicts that after the memory borrowing is completed, the memory usage information of the worker node 121 is greater than or equal to the second watermark and less than the first watermark, then the cloud management platform 110 determines the processing method a, which also includes VM migration, based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0230] The parameters required to perform VM migration include: N VMs to be migrated, migration method, and target worker node to which the VMs will be migrated. Processing method a includes the aforementioned parameters required to perform VM migration.

[0231] Regarding the parameters required to perform the VM migration, three possible examples are provided below.

[0232] Example 1: Cloud management platform 110 determines N VMs to be migrated, including: Cloud management platform 110 selects the N VMs ranked first by a first metric from one or more VMs running on worker node 121. The first metric is determined based on at least one of VM memory usage and migration time.

[0233] In this arrangement, the above order is descending. The number N is determined by the cloud management platform 110 using the memory usage information of worker node 121, the capacity of the borrowed memory block, and the memory usage or memory specifications of the VMs. For example, the cloud management platform 110 subtracts the capacity of the borrowed memory block from the memory usage information of worker node 121, and then subtracts the second threshold to obtain the first value. Furthermore, the cloud management platform 110 sequentially determines the VMs to be migrated according to the descending order of the first indicator, until the memory usage or memory specifications of the first N VMs are greater than or equal to the first value, thus obtaining the N VMs to be migrated.

[0234] For example, the first metric is obtained by dividing memory usage by migration time.

[0235] Optionally, the migration time mentioned above is based on the migration method, migration path, and VM memory usage.

[0236] In one possible scenario, when selecting a VM with the highest priority based on the first metric, the cloud management platform 110 must satisfy VM migration constraint a. VM migration constraint a includes one or more of the following: the VM's memory specification is less than or equal to threshold g, the VM's actual memory usage is less than or equal to threshold h, the VM's service level agreement (SLA), the time the VM migrates to worker node 121, or its creation time, etc.

[0237] For example, cloud management platform 110 will prioritize migrating VMs with lower SLAs, or cloud management platform 110 will determine, based on processing policies, that VMs with SLAs greater than or equal to the set SLA level will not be migrated. VMs that migrate into worker node 121 at a time later than a set time will not be migrated, or VMs that migrate into worker node 121 at a time earlier will be prioritized for migration.

[0238] Example 2: The cloud management platform 110 determines the migration method, including: the cloud management platform 110 selects the migration method with the second metric ranked first from the preset migration methods. The second metric is determined based on the VM's memory usage and / or memory specifications, in conjunction with the migration method.

[0239] Optionally, the second metric is obtained by dividing memory usage by migration time. Migration time is calculated based on the migration method, migration path, and VM memory usage.

[0240] In one possible scenario, when selecting a VM with the second most important metric, the cloud management platform 110 must satisfy VM migration constraint b. VM migration constraint b includes the correspondence between the VM's memory specifications and the migration method.

[0241] For example, this correspondence includes: a VM with 10GB of memory corresponds to iterative copy migration; a VM with 2GB of memory corresponds to offline migration. It is important to note that the foregoing is merely an example and should not be construed as limiting this application.

[0242] Example 3: The cloud management platform 110 determines the target worker node to which the VM will be migrated, including: the cloud management platform 110 selects a worker node with low memory risk as the target worker node to which the VM will be migrated.

[0243] Among them, memory risk is determined based on one or more of the following: memory usage, memory overload, memory fragmentation, and total memory capacity.

[0244] In one possible scenario, when selecting a low-memory-risk worker node as the target worker node to which a VM is migrated, the cloud management platform 110 must satisfy VM migration constraint c. VM migration constraint c includes one or more of the following: the maximum memory specification of the VM that can be migrated to the remote worker node must be greater than or equal to the VM's memory specification or actual memory usage, the network topology between worker node 121 and the remote worker node (e.g., data transfer between worker node 121 and the remote worker node only passes through nodes less than or equal to a threshold f), etc.

[0245] S380, the cloud management platform 110 executes the memory borrowing determined in S350, sends the information of worker node 123 to worker node 121, and executes the VM migration determined in S370, migrating the N VMs to be migrated in worker node 121 to worker node 122.

[0246] For example, the cloud management platform 110 can migrate N VMs to be migrated from worker node 121 to worker node 122 through the VM management system deployed on the cloud management platform 110.

[0247] After the cloud management platform 110 executes the above processing method a, the memory usage information of the working node 121 is between the second water level and the third water level.

[0248] It is worth noting that after the cloud management platform 110 executes processing method a, it is also used to instruct worker node 121 to complete the application for memory blocks from worker node 123 based on the information sent by the cloud management platform 110 to worker node 123, and to indicate that the N VMs to be migrated in worker node 121 have been migrated to worker node 122.

[0249] In one possible scenario, Figure 3 The contents shown also include S350b below.

[0250] S350b If the memory usage information of worker node 121 in the memory alarm information is less than the first watermark but greater than or equal to the second watermark, the cloud management platform 110 determines the processing method a as VM migration based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0251] Processing method a includes the parameters required to perform the VM migration mentioned above.

[0252] For details on the parameters required for the cloud management platform 110 to perform VM migration, please refer to the description in S370 above, which will not be repeated here.

[0253] In the second possible embodiment, such as Figure 4 As shown, Figure 4 This is a schematic diagram illustrating the correspondence between a waterline and a treatment method provided in this application. For example... Figure 4 As shown in Figure a, compared to the first possible embodiment, memory borrowing is used when the memory usage of worker node 121 is greater than or equal to the first watermark, and VM migration is used when the memory usage of worker node 121 is greater than or equal to the second watermark but less than the first watermark. Figure 4 As shown in Figure b, in this embodiment, VM migration is performed when the memory usage of worker node 121 is greater than or equal to the first watermark, and memory borrowing is performed when the memory usage of worker node 121 is greater than or equal to the second watermark but less than the first watermark. In other words, VM migration is prioritized in the first possible embodiment, while memory borrowing is prioritized in this application.

[0254] Therefore, the content of the second possible embodiment is compared to Figure 4The content of the first possible embodiment shown differs only in that: in S350a, if the memory alarm information includes a memory escape alarm, and the memory usage information of worker node 121 in the memory alarm information is greater than or equal to the first waterline (or the time of borrowing the memory block exceeds the preset time, or the capacity of the borrowed memory block exceeds the preset capacity), then the cloud management platform 110 determines the processing method a, which includes VM migration, based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0255] In S360, if the cloud management platform 110 predicts that after the VM migration is completed, the memory usage information of worker node 121 is between the second and third watermarks, then the cloud management platform 110 will perform VM migration, migrating N VMs in worker node 121 to worker node 123.

[0256] In S370, if the cloud management platform 110 predicts that after the VM migration is completed, the memory usage of worker node 121 is less than the first watermark and greater than or equal to the second watermark, then the cloud management platform 110 determines that processing method a, which includes memory borrowing, is based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0257] In S350b, if the memory alarm information includes a memory escape alarm, and the memory usage information of worker node 121 in the memory alarm information is less than the first waterline and greater than or equal to the second waterline, the cloud management platform 110 determines the processing method a, which includes memory borrowing, based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0258] In the third possible embodiment, the third possible embodiment is the same as above. Figure 3 The difference is that when the memory usage information of worker node 121 is between the first waterline and the second waterline, the cloud management platform 110 also introduces the amplitude of memory jitter of worker node 121 for determination when determining processing method a.

[0259] First, the calculation method for memory jitter amplitude is explained, and three examples are shown below.

[0260] Example 1: The cloud management platform 110 calculates the magnitude of memory jitter of worker node 121 based on the memory usage of each VM, the historical memory usage of each VM, and the numerical matrix obtained from the memory alarm information.

[0261] Taking VMAs as an example, the calculation of memory jitter for each VM is illustrated. The cloud management platform 110 concatenates the memory usage of VM A with the historical memory usage (which may include multiple VMs) to obtain a memory usage matrix. The cloud management platform 110 calculates the covariance between the memory usage matrix and the numerical matrix to obtain the magnitude of memory jitter for each VM.

[0262] The memory jitter of worker node 121 is the sum of the memory jitter of all VMs running on worker node 121.

[0263] For example, VM A has a memory usage of 5GB, and its historical memory usage, sorted from earliest to latest, is 2GB, 3GB, and 4GB. The cloud management platform 110 concatenates the aforementioned memory usage with the historical memory usage to obtain a memory usage matrix of (2, 3, 4, 5), and then calculates the covariance between the memory usage matrix and the numerical matrix (0, 8, 16, 24) to be 13.33. The aforementioned numerical matrix (0, 8, 16, 24) is merely an example and should not be construed as a limitation of this application; this numerical matrix can be configured by the user, and this application does not limit it. Furthermore, the aforementioned number of historical memory usages for VM A (3) is merely an example and should not be construed as a limitation of this application; this number can be configured by the user, and this application does not limit it.

[0264] It is worth noting that the historical memory usage of each VM is obtained based on historical memory alarm information. The cloud management platform 110 stores the historical memory usage of each VM in the historical memory alarm information.

[0265] Example 2: The cloud management platform 110 calculates the magnitude of memory jitter of worker node 121 based on the historical memory usage and numerical matrix of each VM.

[0266] The only difference between this example and Example 1 above is that the memory usage obtained this time is not used. Therefore, compared with the content shown in Example 1, the splicing steps are reduced, and the memory usage matrix is ​​obtained directly based on the historical memory usage of the VM. For the content of this example, please refer to the description shown in Example 1, which will not be repeated here.

[0267] Example 3: The cloud management platform 110 calculates the magnitude of memory jitter of worker node 121 based on the historical memory usage of worker node 121 and the numerical matrix.

[0268] For example, the historical memory usage of worker node 121, sorted from earliest to latest, is 512GB, 500GB, 510GB, and 520GB. Based on 512GB, 500GB, 510GB, and 520GB, cloud management platform 110 obtains the memory usage matrix (512, 500, 510, 520), and then calculates the covariance between the memory usage matrix (512, 500, 510, 520) and the numerical matrix (0, 8, 16, 24) as 45.33.

[0269] Secondly, combining Figure 5 The complete process of this embodiment will be described in detail. For example... Figure 5 As shown, Figure 5 A flowchart illustrating a memory management method based on a cloud management platform provided in this application. Figure 3 . Figure 5 The content shown includes the following steps S510-S560.

[0270] The S510 and cloud management platform 110 obtain the processing policies configured by the user and the memory alarm information sent by the worker node 121.

[0271] If the memory usage information in the memory alarm information is less than or equal to the third waterline, the cloud management platform 110 determines the processing method a as memory return based on the memory usage information of the working node 121 in the memory alarm information and the memory risk of the working node that lent the memory block to the working node 121.

[0272] The information of worker node 123 includes the address or identifier of the memory block to be returned.

[0273] S530. If the memory usage information of worker node 121 in the memory alarm information is greater than or equal to the first waterline, then the cloud management platform 110 determines the processing method a, including memory borrowing and / or VM migration, based on the memory usage information of all worker nodes in the worker node cluster 120 and the processing strategy.

[0274] For a detailed description of the processing method a determined by the cloud management platform 110, which includes memory borrowing and / or VM migration, please refer to the contents of S350a, S350b, and S370 above, and it will not be repeated here.

[0275] S540. If the memory usage information of worker node 121 in the memory alarm information is less than the first waterline and greater than or equal to the second waterline, and the amplitude of memory jitter of worker node 121 is greater than or equal to the threshold i (e.g., 30), then the cloud management platform 110 determines the processing method a as VM migration according to the processing strategy.

[0276] For a detailed description of how the cloud management platform 110 determines processing method a as VM migration, please refer to the content of S370 above, which will not be repeated here.

[0277] S550. If the memory usage information of worker node 121 in the memory alarm information is less than the first watermark and greater than or equal to the second watermark, and the amplitude of memory jitter of worker node 121 is less than the threshold i, then the cloud management platform 110 determines the processing method a as memory borrowing according to the processing strategy.

[0278] For a detailed description of how the cloud management platform 110 determines processing method a as memory borrowing, please refer to the content of S350a above, which will not be repeated here.

[0279] S560, the cloud management platform 110 executes the processing method a determined by S520-S550 above. After executing processing method a, the memory usage information of the working node 121 is less than the second watermark and greater than the third watermark.

[0280] In another possible embodiment, in S540 and S550 above, the cloud management platform 110 makes a judgment based on the change in the magnitude of memory jitter of the worker node 121 (compared to the memory jitter magnitude corresponding to the last time the memory alarm information was obtained). If the cloud management platform 110 determines that the change in the magnitude of memory jitter of the worker node 121 is greater than a threshold j (e.g., 5%), then it determines that processing method a is VM migration. If the cloud management platform 110 determines that the change in the magnitude of memory jitter of the worker node 121 is less than or equal to the threshold j, then it determines that processing method a is memory borrowing.

[0281] If the variation in memory jitter of worker node 121 is greater than the threshold j, it indicates that the VMs in worker node 121 are unbalanced and VM migration is required to achieve VM balancing. If the variation in memory jitter of worker node 121 is less than or equal to the threshold j, it indicates that the VMs in worker node 121 are still balanced and only memory borrowing is needed to smooth out peak memory usage in worker node 121.

[0282] In one possible embodiment, worker node 121 borrows a memory block from worker node 123 to store data in worker node 121 whose access frequency or access frequency is less than or equal to a threshold k (a second threshold).

[0283] Optionally, the threshold k can be 50 times or 2 times / minute.

[0284] For example, after borrowing a memory block from worker node 123, worker node 121 migrates data whose access frequency or access frequency is less than the threshold k to the aforementioned borrowed memory block of worker node 123.

[0285] 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.

[0286] 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 6 , Figure 6 This application provides a schematic diagram of a memory management device based on a cloud management platform, illustrating the memory management device based on a cloud management platform provided in this application. 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 worker nodes, wherein one or more virtualization instances are deployed in each worker node.

[0287] like Figure 6 As shown, the cloud-based memory management device 600 includes a first acquisition module 610, a second acquisition module 620, a determination module 630, and an execution 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:

[0288] The first acquisition module 610 is used to acquire the processing strategy configured by the user; the processing strategy is used to indicate the mapping relationship between multiple waterlines of memory usage information and multiple processing methods.

[0289] The second acquisition module 620 is used to acquire memory alarm information of the first working node; the memory alarm information includes memory usage information of the first working node, and the first working node is included among multiple working nodes.

[0290] The determination module 630 is used to determine the processing method that matches the first working node based on the memory usage information and processing strategy of the first working node.

[0291] Execution module 640 is used to execute a processing method matching the first working node, migrating N virtualization instances from the first working node to the second working node, and / or sending information about the third working node to the first working node. The multiple working nodes include the second and third working nodes. The information about the third working node indicates whether the first working node requests a memory block from the third working node, or whether the first working node releases a memory block it has occupied in the third working node. N is a positive integer. After executing the processing method matching the first working node, the memory usage information of the first working node is within a set range, and multiple watermarks include the endpoint values ​​of the set range.

[0292] For more information on the functions of the first acquisition module 610, the second acquisition module 620, the determination module 630, and the execution 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.

[0293] The first acquisition module 610, the second acquisition module 620, the determination module 630, and the execution 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 second acquisition module 620, the determination module 630, and the execution module 640 can refer to the implementation of the first acquisition module 610.

[0294] 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.

[0295] 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.

[0296] 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.

[0297] 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.

[0298] 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.

[0299] 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 second acquisition module 620 can be used to execute any step in the memory management method based on the cloud management platform, the determination module 630 can be used to execute any step in the memory management method based on the cloud management platform, and the execution 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 second acquisition module 620, the determination module 630, and the execution module 640 can be specified as needed. The first acquisition module 610, the second acquisition module 620, the determination module 630, and the execution 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.

[0300] 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.

[0301] in addition, Figure 6 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.

[0302] This application embodiment also provides a chip system, which includes a control circuit and an interface circuit. The interface circuit is used to obtain the user-configured processing strategy and the memory alarm information of the working node 121. The control circuit is used to implement the functions of the cloud management platform 110 in the above method according to the processing strategy and the memory alarm information.

[0303] 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.

[0304] This application also provides a computing device, please refer to... Figure 7 , Figure 7 This 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.

[0305] 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).

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

[0307] 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.

[0308] The memory 706 stores executable program code, and the processor 704 executes this executable program code to implement the functions of the aforementioned first acquisition module 610, second acquisition module 620, determination module 630, and execution module 640, thereby realizing the memory management method based on the cloud management platform. That is, the memory 706 stores instructions for executing the memory management method based on the cloud management platform.

[0309] 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.

[0310] 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.

[0311] like Figure 8 As shown, Figure 8 This application provides a schematic diagram of the structure 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.

[0312] 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.

[0313] 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 second acquisition module 620, the determination module 630, and the execution module 640.

[0314] 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 620. Simultaneously, the memory 706 in computing device 700B stores instructions for executing the functions of the determination module 630 and the execution module 640.

[0315] It should be understood that Figure 9 The 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.

[0316] 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.

[0317] 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.

[0318] 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.

[0319] 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 including multiple worker nodes, wherein one or more virtualization instances are deployed in each worker node, and the method includes: Obtain the user-configured processing strategy; the processing strategy is used to indicate the mapping relationship between multiple waterlines of memory usage information and multiple processing methods; Obtain memory alarm information of the first working node; the memory alarm information includes memory usage information of the first working node, and the plurality of working nodes includes the first working node; Based on the memory usage information of the first working node and the processing strategy, determine the processing method that matches the first working node; The processing method matching the first working node is executed to migrate N virtualization instances in the first working node to the second working node, and / or send information about the third working node to the first working node; wherein, the plurality of working nodes includes the second working node and the third working node, and the information about the third working node is used to indicate: the first working node requests a memory block from the third working node, or the first working node releases the memory block occupied in the third working node, where N is a positive integer.

2. The method according to claim 1, characterized in that, The second working node and / or the third working node are the working nodes with the highest memory risk among a plurality of working nodes other than the first working node; The memory risk is determined based on one or more of the following: the memory usage of the working node, memory overload, memory fragmentation, and total memory capacity.

3. The method according to claim 1 or 2, characterized in that, The N virtualization instances are the virtualization instances ranked first among the one or more virtualization instances based on a first metric; the first metric is determined based on at least one of the virtualization instance's memory usage and migration time.

4. The method according to any one of claims 1 to 3, characterized in that, The migration method for migrating N virtualization instances from the first working node to the second working node is as follows: a migration method with the second indicator listed first among the preset migration methods; the second indicator is determined based on the memory usage and / or memory specifications of the virtualization instances, and the migration method.

5. The method according to any one of claims 1 to 4, characterized in that, The memory usage information refers to the amount of memory used. The sum of the capacities of the memory blocks requested by the first working node is the sum of the difference between the memory usage information and the first or second waterline among the multiple waterlines, and a preset value. The first waterline is greater than the second waterline.

6. The method according to any one of claims 1 to 5, characterized in that, The memory usage information includes one or more of the following: memory usage, memory borrowing time, and memory borrowing amount; The memory borrowing time is used to indicate the time during which the first working node borrows a memory block from the fourth working node among a plurality of working nodes. The memory borrowing amount is used to indicate the capacity of the memory block that the first working node borrows from the fourth working node.

7. The method according to any one of claims 1 to 6, characterized in that, The plurality of waterlines includes a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline. The step of determining the processing method matching the first working node based on the memory usage information of the first working node and the processing strategy includes: If the memory usage information is greater than or equal to the first waterline, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node; If the memory usage of the first working node after migrating the virtualization instance is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined that the first working node requests a memory block from the third working node. If the memory usage information is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined that the first working node requests a memory block from the third working node; If the memory usage information is less than or equal to the third waterline, then according to the processing strategy, it is determined that the first working node will release the memory block occupied by the third working node.

8. The method according to any one of claims 1 to 6, characterized in that, The plurality of waterlines includes a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline. The step of determining the processing method matching the first working node based on the memory usage information of the first working node and the processing strategy includes: If the memory usage information is greater than or equal to the first waterline, then according to the processing strategy, it is determined that the first working node requests a memory block from the third working node; If the memory usage of the first working node after requesting a memory block is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is less than or equal to the third waterline, then according to the processing strategy, it is determined that the first working node will release the memory block occupied by the third working node.

9. The method according to any one of claims 1 to 8, characterized in that, The step of determining the processing method matching the first working node based on the memory usage information of the first working node and the processing strategy includes: Based on the memory usage information of the first working node, the magnitude of memory jitter, and the processing strategy, a processing method matching the first working node is determined; the magnitude of memory jitter is obtained based on the historical memory usage information of the first working node, and the processing strategy is used to indicate the mapping relationship between the multiple waterlines and the magnitude of memory jitter, and the multiple processing methods.

10. The method according to claim 9, characterized in that, The plurality of waterlines includes a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline; the step of determining the processing method matching the first working node based on the memory usage information of the first working node, the magnitude of memory jitter, and the processing strategy includes: If the memory usage information is less than or equal to the third waterline, then according to the processing strategy, it is determined that the first working node releases the memory block occupied in the third working node; If the memory usage information is greater than or equal to the first waterline, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node, and the first working node requests a memory block from the third working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, and the memory jitter of the first working node is greater than or equal to the first threshold, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, and the memory jitter of the first working node is less than the first threshold, then according to the processing strategy, it is determined that the first working node requests a memory block from the third working node.

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

12. The method according to any one of claims 1 to 11, characterized in that, The memory block requested by the first working node from the third working node is used to store data in the first working node whose access frequency or number of accesses is less than the second threshold.

13. A memory management device 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 worker nodes, wherein one or more virtualization instances are deployed in each worker node. The device includes: The first acquisition module is used to acquire the processing strategy configured by the user; the processing strategy is used to indicate the mapping relationship between multiple waterlines of memory usage information and multiple processing methods; The second acquisition module is used to acquire memory alarm information of the first working node; the memory alarm information includes memory usage information of the first working node, and the plurality of working nodes includes the first working node; The determining module is used to determine the processing method that matches the first working node based on the memory usage information of the first working node and the processing strategy. An execution module is configured to execute the processing method matching the first working node, migrate N virtualization instances in the first working node to the second working node, and / or send information about the third working node to the first working node; wherein the plurality of working nodes includes the second working node and the third working node, and the information about the third working node is used to indicate: the first working node requests a memory block from the third working node, or the first working node releases the memory block occupied in the third working node, where N is a positive integer.

14. The apparatus according to claim 13, characterized in that, The second working node and / or the third working node are the working nodes with the highest memory risk among multiple working nodes other than the first working node; the memory risk is determined based on one or more of the following: the memory usage of the working node, the amount of memory excess, the amount of memory fragmentation, and the total memory capacity.

15. The apparatus according to claim 13 or 14, characterized in that, The N virtualization instances are the virtualization instances ranked first among the one or more virtualization instances based on a first metric; the first metric is determined based on at least one of the virtualization instance's memory usage and migration time.

16. The apparatus according to any one of claims 13 to 15, characterized in that, The migration method for migrating N virtualization instances from the first working node to the second working node is as follows: a migration method with the second indicator listed first among the preset migration methods; the second indicator is determined based on the memory usage and / or memory specifications of the virtualization instances, and the migration method.

17. The apparatus according to any one of claims 13 to 16, characterized in that, The memory usage information refers to the amount of memory used. The sum of the capacities of the memory blocks requested by the first working node is the sum of the difference between the memory usage information and the first or second waterline among the multiple waterlines, and a preset value. The first waterline is greater than the second waterline.

18. The apparatus according to any one of claims 13 to 17, characterized in that, The memory usage information includes one or more of the following: memory usage, memory borrowing time, and memory borrowing amount; The memory borrowing time is used to indicate the time during which the first working node borrows a memory block from the fourth working node among a plurality of working nodes. The memory borrowing amount is used to indicate the capacity of the memory block that the first working node borrows from the fourth working node.

19. The apparatus according to any one of claims 13 to 18, characterized in that, The plurality of waterlines includes a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline; the determining module is specifically used to determine, according to the processing strategy, to migrate N virtualization instances in the first working node to the second working node if the memory usage information is greater than or equal to the first waterline; If the memory usage of the first worker node after migrating the virtualization instance is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined that the first worker node requests a memory block from the third worker node; if the memory usage is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined that the first worker node requests a memory block from the third worker node. If the memory usage information is less than or equal to the third waterline, then according to the processing strategy, it is determined that the first working node will release the memory block occupied by the third working node.

20. The apparatus according to any one of claims 13 to 18, characterized in that, The plurality of waterlines include a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline; the determining module is specifically used to determine, according to the processing strategy, if the memory usage information is greater than or equal to the first waterline, that the first working node should request a memory block from the third working node; If the memory usage of the first working node after requesting a memory block is greater than or equal to the second watermark and less than the first watermark, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is less than or equal to the third waterline, then according to the processing strategy, it is determined that the first working node will release the memory block occupied by the third working node.

21. The apparatus according to any one of claims 13 to 20, characterized in that, The determining module is specifically used to determine the processing method matching the first working node based on the memory usage information of the first working node, the magnitude of memory jitter, and the processing strategy; the magnitude of memory jitter is obtained based on the historical memory usage information of the first working node, and the processing strategy is used to indicate the mapping relationship between the multiple waterlines and the magnitude of memory jitter, and the multiple processing methods.

22. The apparatus according to claim 21, characterized in that, The plurality of waterlines include a first waterline, a second waterline, and a third waterline, wherein the first waterline > the second waterline > the third waterline; the determining module is further specifically used to determine, according to the processing strategy, that the first working node releases the memory block occupied in the third working node if the memory occupancy information is less than or equal to the third waterline; If the memory usage information is greater than or equal to the first waterline, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node, and the first working node requests a memory block from the third working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, and the memory jitter of the first working node is greater than or equal to the first threshold, then according to the processing strategy, it is determined to migrate N virtualization instances in the first working node to the second working node. If the memory usage information is greater than or equal to the second waterline and less than the first waterline, and the memory jitter of the first working node is less than the first threshold, then according to the processing strategy, it is determined that the first working node requests a memory block from the third working node.

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

24. The apparatus according to any one of claims 13 to 23, characterized in that, The memory block requested by the first working node from the third working node is used to store data in the first working node whose access frequency or number of accesses is less than the second threshold.

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.