Memory management method and device

By limiting the memory allocation rate of computing nodes and business instances, it prolongs the time when the memory pool is full, solves the problem of insufficient memory caused by low-performance storage media such as hard disks, achieves faster data and business migration, and ensures business reliability. sex and performance.

WO2024222800A1PCT designated stage expired Publication Date: 2024-10-31SHENZHEN HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD

Patent Information

Application Number
PCT/CN2024/089811
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2024-04-25
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

When existing technology uses low-cost and low-performance storage media such as hard disks as swap partitions, data migration takes a long time when memory is insufficient, affecting business reliability and performance, and increasing hardware costs.

Method used

Limit the memory allocation rate of computing nodes and business instances to extend the time the memory pool is full, and migrate data or business instances to other nodes during the rate limit period to avoid memory pool explosion. This method does not use NVM as swap. Partitioning ensures migration speed and business reliability.

Benefits of technology

It effectively prolongs the time when the memory pool is full, prevents the system from freezing, reduces migration time, and ensures the operation of important services without increasing the impact on the speed of data migration and business migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024089811_31102024_PF_FP_ABST
    Figure CN2024089811_31102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a memory management method and a device. The method comprises: in response to satisfying a first trigger condition, performing memory allocation rate limiting on N computing nodes, such that the N computing nodes perform memory allocation rate limiting on service instances deployed on the N computing nodes; and when memory allocation rate limiting is performed on the N computing nodes, migrating first data to a first computing node, and / or migrating a service instance to a second computing node. By means of the memory management method provided by the present application, when a hotspot is present in a first memory pool, memory allocation rate limiting can be performed on the computing nodes, so that the time that the first memory pool is fully occupied is prolonged; and during the memory allocation rate limiting, partial data of the first memory pool is migrated to the first computing node, and / or the service instance of the first computing node is migrated to the second computing node, to relieve the pressure on the first memory pool, so that the first memory pool is prevented from exploding, a system is prevented from being stuck, and the operation of important services is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

A memory management method and device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 27, 2023, with application number 202310481416.9 and application name “A method and device for memory management”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computers, and more particularly, to a memory management method and device. Background Art

[0003] With the increasing maturity and rapid development of cloud technology, the continuous expansion of scale, improving allocation rate and reducing operating costs have gradually become the focus of various cloud vendors. Memory pooling and memory reuse are important means to improve memory allocation rate and utilization rate. However, unlike the time-division reuse of CPU computing power, memory resources are space-reused. The data in the memory must be retained and is complete and secure. When the memory is insufficient, the program cannot continue to run. At present, in order to reduce costs, low-cost and low-performance storage media such as hard disks and non-volatile memory (NVM) can be used as swap partitions. When the memory is insufficient, the swap partition is virtualized as memory to replace the temporarily unused data in the memory with the swap partition. However, the above method has the following problems: (1) Providing additional hardware storage media also increases the cost to a certain extent; (2) Due to the poor read and write performance of non-volatile memory and hard disks, the overall performance will be affected; (3) When performing data migration, due to the poor read and write performance of non-volatile memory and hard disks, the migration time is long. Therefore, a memory management method is urgently needed to ensure business reliability, reduce migration time, and prevent memory overflow.

[0004] Summary of the Invention

[0005] The present application provides a memory management method and device, which can extend the time when a first memory pool is full, prevent the first memory pool from overflowing, avoid system jamming, and ensure the operation of important services.

[0006] In a first aspect, a memory management method is provided, the method comprising: in response to satisfying a first trigger condition, performing memory allocation rate limiting on N computing nodes so that the N computing nodes perform memory allocation rate limiting on business instances deployed on the N computing nodes, N ≥ 1 and is an integer, the N computing nodes are associated with a first memory pool, the N computing nodes are deployed with M business instances, M ≥ 1 and is an integer; when performing memory allocation rate limiting on the N computing nodes, migrating first data to the first computing node, and / or migrating P business instances of the M business instances to a second computing node, wherein M ≥ P ≥ 1 and P is an integer, the second computing node is associated with a second memory pool, and the first data is data stored in the first memory pool.

[0007] In an embodiment of the present application, when there is a hotspot in the first memory pool (for example, the remaining memory in the memory pool is insufficient), the memory allocation speed is limited on the computing node, which can extend the time when the first memory pool is full. During the memory allocation speed limit, part of the data in the first memory pool is migrated to the first computing node, and / or the business instance of the first computing node is migrated to the second computing node to relieve the pressure on the first memory pool. Since the memory allocation speed is limited on the computing node, there is a longer time to perform the above actions, which prevents the first memory pool from bursting, avoids system jams, and ensures the operation of important businesses.

[0008] In addition, since NVM is not used as a swap partition in the embodiment of the present application, the speed of data migration and business instance migration will not be affected.

[0009] In combination with the first aspect, in certain implementations of the first aspect, the first trigger condition includes one or more of the following: the usage rate of the first memory pool is greater than or equal to a first threshold; the number of cold pages of the first memory pool is greater than or equal to a second threshold; the number of hot pages of the first memory pool is greater than or equal to a third threshold; the remaining memory of the first memory pool is less than or equal to a fourth threshold; and the remaining rate of the first memory pool is less than or equal to a fifth threshold.

[0010] In combination with the first aspect, in certain implementations of the first aspect, the memory allocation speed limit is performed on the N computing nodes, including: determining N memory allocation speed limit policies corresponding to the N computing nodes; and performing memory allocation speed limit on the N computing nodes according to the N memory allocation speed limit policies.

[0011] In combination with the first aspect, in certain implementations of the first aspect, the N memory allocation speed limit policies corresponding to the N computing nodes are pre-set; or the N memory allocation speed limit policies corresponding to the N computing nodes are determined based on the priorities of the N computing nodes; or the N memory allocation speed limit policies corresponding to the N computing nodes are determined based on the size of the memory used by the N computing nodes.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the first computing node is a computing node among the N computing nodes. When the memory allocation speed limit is executed, before migrating the first data to the first computing node, the method also includes: determining the first computing node from the N computing nodes.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the first computing node is pre-set; or the first computing node is determined based on the priority of the N computing nodes; or the first computing node is determined based on the size of the remaining memory of the N computing nodes themselves.

[0014] In combination with the first aspect, in certain implementations of the first aspect, the priorities of the N computing nodes are pre-set; or the priorities of the N computing nodes are determined based on the business instances run by the N computing nodes; or the priorities of the N computing nodes are determined based on the hardware capabilities of the N computing nodes.

[0015] In a second aspect, a memory management method is provided, the method comprising: applying the method to a first computing node, the method comprising: in response to satisfying a first trigger condition, limiting the memory allocation rate for X business instances, where X ≥ 1 and is an integer; when executing the memory allocation rate limit, migrating Y business instances of the X business instances to a second computing node, where X ≥ Y ≥ 1 and Y is an integer.

[0016] In the embodiment of the present application, when there is a hot spot in the computing node (for example, insufficient remaining memory), the memory allocation speed of the business instance in the computing node is limited, which can extend the time when the first computing node is fully occupied. During the period of memory allocation speed limit, the business instance of the first computing node is migrated to the second computing node to relieve the pressure on the first computing node. Since the memory allocation speed limit is applied to the business instance, there is more time to perform the above actions, preventing the memory of the first computing node from bursting, avoiding system jams, and ensuring the operation of important businesses. In addition, since NVM is not used as a swap partition in the embodiment of the present application, the speed of business instance migration will not be affected.

[0017] In combination with the second aspect, in certain implementations of the second aspect, the first trigger condition includes one or more of the following: the memory usage of the first computing node is greater than or equal to the first threshold; the remaining memory of the first computing node is less than or equal to the fourth threshold; the remaining rate of the memory of the first computing node is less than or equal to the fifth threshold; the memory application speed of the X business instances is greater than or equal to the sixth threshold.

[0018] In combination with the second aspect, in certain implementations of the second aspect, the memory allocation rate limit for X business instances includes: determining X memory allocation rate limit policies corresponding to the X business instances; and limiting the memory allocation rate for the X business instances according to the X memory allocation rate limit policies.

[0019] In combination with the second aspect, in certain implementations of the second aspect, the X memory allocation speed limit policies corresponding to the X business instances are pre-set; or the X memory allocation speed limit policies corresponding to the X business instances are determined based on the priorities of the X business instances; or the X memory allocation speed limit policies corresponding to the X business instances are determined based on the size of the memory used by the X business instances.

[0020] In combination with the second aspect, in certain implementations of the second aspect, the Y business instances are pre-set; or the Y business instances are determined based on the priorities of the X business instances; or the Y business instances are determined based on the memory size used by the X business instances.

[0021] In a third aspect, a device is provided, which includes: a storage module for storing programs; a processing module for executing the programs stored in the storage module. When the programs stored in the storage module are executed, the processing module is used to execute the methods provided in the above aspects.

[0022] In a fourth aspect, a computer-readable storage medium is provided, which stores program code for execution by a device, wherein the program code includes code for executing the methods provided in the above aspects.

[0023] In a fifth aspect, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer is used to execute the methods provided in the above aspects.

[0024] In a sixth aspect, a chip is provided, which includes a processing module and a communication interface. The processing module reads instructions stored in a memory through the communication interface to execute the methods provided in the above aspects.

[0025] Optionally, as an implementation method, the chip may further include a storage module, in which instructions are stored. The processing module is used to execute the instructions stored on the storage module. When the instructions are executed, the processing module is used to execute the methods provided in the above aspects.

[0026] In a seventh aspect, a chip is provided, which includes a processing core for executing the method provided in the first aspect and a memory management unit for executing the method provided in the second aspect.

[0027] In an eighth aspect, a computer device is provided, which includes the chip shown in the seventh aspect.

[0028] In the ninth aspect, a device is provided, including: a processor and a memory, the memory being used to store programs and data, and the processor being used to call and run programs from the memory to execute the methods provided in the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIG1 is a schematic diagram of a system architecture applicable to an embodiment of the present application.

[0030] FIG2 is a schematic flowchart of the memory management method provided in an embodiment of the present application.

[0031] FIG3 is a schematic diagram of memory allocation speed changes provided in an embodiment of the present application.

[0032] FIG4 is a schematic diagram of memory allocation speed changes provided in an embodiment of the present application.

[0033] FIG5 is a schematic flowchart of the memory management method provided in an embodiment of the present application.

[0034] FIG6 is a schematic block diagram of a memory management apparatus according to an embodiment of the present application.

[0035] FIG7 is a schematic block diagram of a memory management device according to an embodiment of the present application. DETAILED DESCRIPTION

[0036] The memory management method and device provided in the embodiments of the present application can be applied to a computer, which includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer. The hardware layer includes hardware such as a Central Processing Unit (CPU), a Memory Management Unit (MMU), and memory (also known as main memory). The operating system can be any one or more computer operating systems that implement business processing through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an IOS operating system, a Hongmeng operating system, or a Windows operating system. The application layer includes applications such as browsers, address books, word processing software, and instant messaging software. In addition, in the embodiments of the present application, the computer can be a handheld device such as a smartphone, or a terminal device such as a personal computer. This application is not particularly limited, as long as it can process data according to the memory management method of the embodiment of the present application by running a program that records the code of the memory management method of the embodiment of the present application. The execution subject of the memory management method of the embodiment of the present application can be a computer device, or a functional module in a computer device that can call and execute a program.

[0037] In addition, various aspects or features of the present application can be implemented as methods, devices or products using standard programming and / or engineering techniques. The term "product" as used in this application covers computer programs that can be accessed from any computer-readable device, carrier or medium. For example, computer-readable media may include, but are not limited to: magnetic storage devices (e.g., hard disks, floppy disks or tapes, etc.), optical disks (e.g., compact discs (CDs), digital versatile discs (DVDs), etc.), smart cards and flash memory devices (e.g., erasable programmable read-only memories (EPROMs), cards, sticks or key drives, etc.). In addition, the various storage media described herein may represent one or more devices and / or other machine-readable media for storing information. The term "machine-readable medium" may include, but is not limited to, wireless channels and various other media capable of storing, containing and / or carrying instructions and / or data.

[0038] To facilitate understanding, the relevant terms involved in the embodiments of this application are first briefly introduced.

[0039] cloud computing

[0040] Cloud computing refers to the use of cluster applications, network technologies, or distributed file systems to bring together multiple servers in the network to work together, and to provide data storage, data processing, and data analysis functions to the outside world through a system composed of multiple servers.

[0041] Public Cloud

[0042] A public cloud typically refers to a cloud service provided by a third-party provider for users to use. Public clouds are typically accessible via the internet. The core attribute of a public cloud is shared resource services.

[0043] tenants

[0044] In the field of cloud computing, a tenant refers to an account that rents public cloud resources. A tenant is sometimes also called a cloud tenant.

[0045] user

[0046] A user is a sub-account created by a tenant under their account. A user has some of the tenant's permissions. Additionally, tenants can set permissions for resources and operations as needed.

[0047] Virtual Machine

[0048] A virtual machine is a complete computer system emulated through software, with full hardware system functionality, running in a completely isolated environment. It's a logically separate computer. In other words, the virtual machine has its own imaginary hardware, such as the processor, stack, registers, and a corresponding instruction set.

[0049] A virtual machine packages virtual hardware, a kernel (i.e., an operating system), and user space into a new virtual machine, which can then run on top of a physical device using a "hypervisor." Virtual machines rely on a hypervisor, which is typically installed on top of the system hardware, leading to the hypervisor being considered an operating system in some respects. Once the hypervisor is installed, virtual machine instances can be allocated from the available computing resources in the system, and each virtual machine can obtain a unique operating system and applications. In short, a virtual machine first needs to virtualize a physical environment, then build a complete operating system, and then build a layer of runtime for applications to run.

[0050] Taking the virtual machine scenario as an example, multiple independent virtual machines can be established on a physical machine, with each small service running in a separate virtual machine. Specifically, virtual machine software is installed in the operating system (called the host operating system) of the physical machine (called the host machine) and configured using this virtual machine software to form multiple virtual machines (called clients) on the physical machine. As needed, a virtual machine operating system is installed in each virtual machine, and user functions or programs are run on the operating system on the virtual machine (called the guest operating system) to provide the corresponding service. Multiple virtual machines are isolated from each other, do not interfere with each other, and share the physical resources of the physical machine.

[0051] When a function or program runs in a virtual machine, it occupies storage space and resources such as ports managed by the virtual machine. Since the virtual machine only simulates a real machine based on the physical machine, these storage space and resources ultimately point to the storage space and resources on the physical machine.

[0052] container

[0053] Similar to a virtual machine, a container is also a relatively independent operating environment. That is, it isolates applications and their dependencies to create a space that can run anywhere. Multiple containers are established in the host machine, and the multiple containers are isolated from each other and complement each other. At the same time, containers also get rid of the need for physical hardware, allowing us to use computing resources more efficiently.

[0054] However, the main differences between containers and virtual machines are the location of the virtualization layer and how operating system resources are used.

[0055] Simply put, containers don't require a host operating system. Instead, the container layer can be installed directly on the host operating system. Once the container layer is installed, container instances can be allocated from the system's available computing resources, and each containerized application shares the same system operations. A container can be thought of as a virtual machine that hosts a specific set of applications. Alternatively, a container can be considered a special case of a virtual machine that directly utilizes the host kernel, has fewer abstraction layers than a virtual machine, is more lightweight, and boots faster.

[0056] Containers also offer greater resource efficiency. Because containers don't require a separate operating system for each application, each container instance is smaller and faster to create and migrate. This means that a single operating system can accommodate more containers than a virtual machine, allowing for more container instances to be deployed on the same hardware.

[0057] In the embodiments of the present application, virtual machines or containers may be collectively referred to as service instances.

[0058] With the increasing maturity and rapid development of cloud technology, the continuous expansion of scale, improving allocation rate and reducing operating costs have gradually become the focus of cloud vendors. Memory pooling and memory reuse are important means to improve memory allocation rate and utilization rate. However, unlike the time-division reuse of CPU computing power, memory resources are space-reused. The data in the memory must be retained and is complete and secure. When the memory is insufficient, the program cannot continue to run. At present, in order to reduce costs, low-cost and low-performance storage media such as hard disks and non-volatile memory (NVM) can be used as swap partitions. When the memory is insufficient, the swap partition is virtualized as memory to replace the temporarily unused data in the memory with the swap partition. However, the above method has the following problems: (1) Providing additional hardware storage media also increases the cost to a certain extent; (2) Due to the poor read and write performance of non-volatile memory and hard disks, the overall performance will be affected; (3) When performing data migration, due to the poor read and write performance of non-volatile memory and hard disks, the migration time is long. Therefore, there is an urgent need for a memory management method that can reduce the migration time and ensure the reliability of the business.

[0059] The following describes the embodiments of the present application in conjunction with the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present application, rather than all the embodiments. Those skilled in the art will appreciate that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0060] FIG1 shows a system architecture applicable to an embodiment of the present application, which includes a computing node cluster 100 and a memory pool node cluster 200. For example, the computing node cluster 100 may include one or more computing nodes, such as computing node 110, computing node 120, and so on (two computing nodes are shown in FIG1 , but not limited to two computing nodes). For example, the memory node cluster 200 includes one or more memory nodes, such as memory node 210, memory node 220, and memory node 230 (three memory nodes are shown in FIG1 , but not limited to three memory nodes), and each memory node can be interconnected.

[0061] In an embodiment of the present application, the computing node cluster 100 and the memory node cluster 200 can be configured in the same physical device. In this case, as an example and not a limitation, the system architecture can also include a bus. The computing node cluster 100 can be connected to the bus via a communication interface, and the memory node cluster 200 can be connected to the bus via a communication interface. Thus, the computing node cluster 100 and the memory node cluster 200 can achieve communication connection through the bus.

[0062] By way of example and not limitation, the bus may include a data bus.

[0063] Optionally, the bus may also include a power bus, a control bus, a status signal bus, etc. In this case, the communication interface of the computing node cluster 100 may be a communication interface between components within the computer device. Similarly, the communication interface of the memory node cluster 200 may be a communication interface between components within the computer device.

[0064] In an embodiment of the present application, the computing node cluster 100 and the memory node cluster 200 may be configured in different devices. In this case, the computing node cluster 100 and the memory node cluster 200 may be connected to each other via a wired or wireless communication method. For example, a communication cable (e.g., an optical fiber or a copper wire, etc.) may be provided between the computing node cluster 100 and the memory node cluster 200 (specifically, between the communication interface of the computing node cluster 100 and the communication interface of the memory node cluster 200) to achieve a wired communication connection between the computing node cluster 100 and the memory node cluster 200. In this case, the communication interface of the computing node cluster 100 may be a communication interface of a computer device for communicating with an external device. Similarly, the communication interface of the memory node cluster 200 may be a communication interface of a computer device for communicating with an external device.

[0065] In addition, in the embodiment of the present application, the computing nodes in the computing node cluster 100 can be configured in the same physical device (for example, a server), or the computing nodes in the computing node cluster 100 can also be configured independently, which is not particularly limited in the embodiment of the present application.

[0066] It should be noted that in an embodiment of the present application, the computing node cluster 100 configured in the same physical device can be connected through a bus (for example, a PCIE bus), that is, signaling or data transmission between the computing node clusters in the same physical device can be achieved through the bus.

[0067] In addition, computing nodes deployed in different physical devices can communicate with each other by deploying a transceiver (for transmitting information or signals) connected to the computing node in each physical device, and connecting the transceivers in each physical device via a transmission cable to implement signaling or data transmission between the computing nodes deployed in different physical devices. Alternatively, wireless communication can be used between the transceivers in each physical device.

[0068] Taking computing node 110 as an example, computing node 110 may include one or more service instances. These one or more service instances can be allocated to tenants to meet their service needs. As shown in Figure 1, computing node 110 includes service instance 111 and service instance 112. In the embodiments of the present application, a service instance can be a virtual machine or a container.

[0069] The computing node 110 may further include a memory management module 113 , which is configured to request memory from the memory pool node cluster 200 and manage memory allocation for each service instance in the computing node 110 .

[0070] In the embodiment of the present application, the computing node 110 may be a physical computing node. That is, in the embodiment of the present application, the computing node 110 may be a computer device having a processor. As an example and not a limitation, the processor may be a central processing unit (CPU).

[0071] In addition, the computing node 110 may also include components such as a bus, a transceiver, and a memory.

[0072] The memory may include a memory controller and a storage unit (or storage medium). The storage unit, which may also be referred to as a storage space, is a medium for storing a certain discontinuous physical quantity. As an example and not a limitation, the storage unit may be a memory chip, and the material of the storage unit may be a semiconductor, a magnetic core, a magnetic drum, a magnetic tape, a laser disc, or other mature materials in the art. The type of the storage unit may be a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage medium types in the art. The storage controller is used to assign a physical address to the storage unit, access the storage unit according to the physical address, and perform data storage operations on the storage unit.

[0073] In the embodiment of the present application, the computing node can access the memory of the memory node cluster through remote direct memory access (RDMA) technology.

[0074] The memory node 210 is taken as an example for introduction. The memory node 210 can be understood as a server, a desktop computer, etc.

[0075] Optionally, in some embodiments, the memory node cluster 200 may further include a management module 240. The management module 240 is configured to create and manage a memory pool. After the memory pool is created, the management module 240 may manage the memory in the memory node cluster 200.

[0076] Optionally, in some embodiments, the management module 240 can create a central memory pool, that is, a single memory pool provides memory for multiple computing nodes. In this case, the memory pool node cluster 200 also includes multiple node memory management modules, which correspond to the computing nodes and are used to manage the memory of the computing nodes.

[0077] As shown in Figure 1, the memory node 210 includes at least a control unit 211, a processor 212 and a memory 213. Among them, the processor 212 can be, for example, a central processing unit (CPU), which is used to process data from outside the memory node 210, or data generated inside the memory node 210. Memory storage (memory) refers to a device for storing data. Memory refers to an internal memory that directly exchanges data with the processor. It can read and write data at any time and at a very high speed. It serves as a temporary data storage for the operating system or other running programs. Memory includes at least two types of memory. For example, memory can be either random access memory or read-only memory (ROM). For example, random access memory can be dynamic random access memory (DRAM) or storage class memory (SCM).

[0078] DRAM is a type of semiconductor memory, and like most random access memory (RAM), it is a volatile memory device. Storage-class memory (SCM) is a hybrid storage technology that combines the characteristics of traditional storage devices and memory. While offering faster read and write speeds than hard drives, it has slower access speeds than DRAM and is also more affordable.

[0079] However, DRAM and SCM are merely exemplary in this embodiment, and the memory may also include other random access memories, such as static random access memory (SRAM). As for read-only memory, for example, it may be programmable read only memory (PROM), erasable programmable read only memory (EPROM), etc. In addition, the memory may also be a dual in-line memory module or a dual in-line memory module (DIMM), that is, a module composed of dynamic random access memory (DRAM). In this application, the memory node 210 may also include other types of memory, such as an external memory (hard disk).

[0080] FIG2 shows a schematic flow chart of a memory management method 200 provided in an embodiment of the present application. As shown in FIG2 , the method 200 includes:

[0081] S210, in response to satisfying the first trigger condition, memory allocation rate limit is performed on N computing nodes, N ≥ 1 and is an integer, the N computing nodes are associated with the first memory pool, and the N computing nodes are deployed with M business instances, M ≥ 1 and is an integer.

[0082] Specifically, when determining that the first trigger condition is met, the management module of the first memory pool can respond to the trigger condition and limit the memory allocation rate of N computing nodes so that the N computing nodes limit the memory allocation rate of the business instances deployed on the N computing nodes. The N computing nodes are associated with the first memory pool.

[0083] For example, computing node #1 applies for 20MB of memory from the first memory pool. Before the memory allocation speed limit is set, the management module can allocate memory to computing node #1 at a memory allocation speed of 50MB / s. When the trigger condition is met, the management module can limit the memory allocation speed of computing node #1 and reduce the memory allocation speed from 50MB / s to 10MB / s.

[0084] When N computing nodes limit the memory allocation rate of business instances deployed on the N computing nodes, the memory allocation rate can be limited for all business instances deployed on the N computing nodes, or for some business instances deployed on the N computing nodes.

[0085] In the embodiment of the present application, the first trigger condition is not limited, and different trigger conditions can be set according to different system architectures. For example, the first trigger condition can be one or more of the following possible implementation methods.

[0086] In a possible implementation, the first trigger condition is that a usage rate of the first memory pool is greater than or equal to a first threshold.

[0087] The management module of the first memory pool may limit the memory allocation rate of the N computing nodes when detecting that the usage rate of the first memory pool is greater than or equal to a first threshold (eg, 90%).

[0088] In a possible implementation, the first trigger condition is that the number of cold pages in the first memory pool is greater than or equal to a second threshold.

[0089] The management module of the first memory pool may limit the memory allocation rate of the N computing nodes when detecting that the number of cold pages in the first memory pool exceeds a second threshold.

[0090] A cold page can be understood as a memory page where the number of times any data in the same memory page is accessed is less than a threshold within a unit cycle.

[0091] In a possible implementation, the first trigger condition is that the number of hot pages in the first memory pool is greater than or equal to a third threshold.

[0092] The management module of the first memory pool may limit the memory allocation rate of the N computing nodes when detecting that the number of hot pages in the first memory pool exceeds a third threshold.

[0093] A hot page can be understood as a memory page in which any data in the same memory page is accessed more than a threshold number of times within a unit cycle.

[0094] In a possible implementation, the first trigger condition is that the remaining memory in the first memory pool is less than or equal to a fourth threshold.

[0095] In a possible implementation, the first trigger condition is that the remaining rate of the first memory pool is less than or equal to a fifth threshold.

[0096] In an embodiment of the present application, the management module can manage the memory allocation of the computing nodes, so that the memory allocation rate can be limited for N computing nodes.

[0097] It should be noted that the N computing nodes may be some of the computing nodes associated with the first memory pool, or may be all of the computing nodes associated with the first memory pool.

[0098] For example, the first memory pool is associated with five computing nodes in total. The management module may limit the memory allocation rate of the five computing nodes when determining that the first trigger condition is met.

[0099] For another example, the first memory pool is associated with a total of 7 computing nodes. When the management module determines that the first trigger condition is met, it can limit the memory allocation speed of 5 of the 7 computing nodes. The remaining 2 computing nodes can be subject to memory allocation speed limit when the management module determines that other trigger conditions are met, or the memory allocation speed may not be limited. That is, different trigger conditions can be set to dynamically adjust the memory allocation speed of the computing nodes.

[0100] When the management module limits the memory allocation speed, the following possible situations may be included.

[0101] In one possible scenario, when performing memory allocation speed limiting, the management module may limit the memory allocation speeds corresponding to different computing nodes to the same memory allocation speed.

[0102] For example, before the memory allocation speed is restricted, the memory allocation speed corresponding to compute node #1 is 50 MB / s, and the memory allocation speed corresponding to compute node #2 is 35 MB / s. After the memory allocation speeds corresponding to compute node #1 and compute node #2 are restricted, the memory allocation speeds corresponding to compute node #1 and compute node #2 are both reduced to 20 MB / s.

[0103] As shown in (a) in Figure 3, before the memory allocation speed is restricted, the memory allocation speed corresponding to computing node #1 is 50MB / s, and the memory allocation speed corresponding to computing node #2 is 35MB / s. Taking the trigger condition that the usage rate of the first memory pool is greater than or equal to threshold #1 as an example, when the management module determines that the usage rate of the first memory pool is equal to threshold #1, the management module can simultaneously reduce the memory allocation speed of computing node #1 and computing node #2, reducing the memory allocation speed corresponding to computing node #1 from 50MB / s to 20MB / s, and reducing the memory allocation speed corresponding to computing node #2 from 35MB / s to 20MB / s.

[0104] In one possible scenario, when performing memory allocation speed limiting, the management module may limit the memory allocation speeds corresponding to different computing nodes to different memory allocation speeds.

[0105] For example, before the memory allocation speed is restricted, the memory allocation speed corresponding to compute node #1 is 50 MB / s, and the memory allocation speed corresponding to compute node #2 is 35 MB / s. After the memory allocation speeds corresponding to compute node #1 and compute node #2 are restricted, the memory allocation speed corresponding to compute node #1 becomes 20 MB / s, and the memory allocation speed corresponding to compute node #2 becomes 10 MB / s.

[0106] As shown in (b) in Figure 3, before the memory allocation speed is restricted, the memory allocation speed corresponding to computing node #1 is 50MB / s, and the memory allocation speed corresponding to computing node #2 is 35MB / s. Taking the trigger condition that the usage rate of the first memory pool is greater than or equal to threshold #1 as an example, when the management module determines that the usage rate of the first memory pool is equal to threshold #1, the management module can simultaneously reduce the memory allocation speed of computing node #1 and computing node #2, reducing the memory allocation speed corresponding to computing node #1 from 50MB / s to 20MB / s, and reducing the memory allocation speed corresponding to computing node #2 from 35MB / s to 10MB / s.

[0107] Optionally, in some embodiments, the number of computing nodes associated with the first memory pool is Q, where Q>N and is an integer. The N computing nodes may be determined by the following possible implementations:

[0108] In a possible implementation, the N computing nodes are pre-set.

[0109] For example, the first memory pool is associated with a total of 5 computing nodes, namely computing node #1, computing node #2, computing node #3, computing node #4 and computing node #5. It can be pre-set that when the first trigger condition is met, the memory allocation speed of computing node #1, computing node #2 and computing node #4 is limited.

[0110] In one possible implementation, N computing nodes are determined based on the service instances running in the Q computing nodes.

[0111] Specifically, the services processed by the service instances running on different computing nodes may be different, so the N computing nodes may be determined based on the service instances running on the Q computing nodes.

[0112] For example, the first memory pool is associated with a total of 5 computing nodes, namely computing node #1, computing node #2, computing node #3, computing node #4 and computing node #5. Business instance #1 is running on computing node #1, business instance #2 is running on computing node #2, business instance #3 is running on computing node #3, business instance #4 is running on computing node #4, and business instance #5 is running on computing node #5. Among them, business instances #1, #2 and #3 have small memory requirements, while business instances #4 and #5 have large memory requirements. Therefore, the management module can limit the memory allocation speed of computing nodes #1, #2 and #3.

[0113] In one possible implementation, N computing nodes are determined based on requests for memory size used in the Q computing nodes.

[0114] For example, the first memory pool is associated with a total of 5 computing nodes, namely computing node #1, computing node #2, computing node #3, computing node #4 and computing node #5. The memory sizes used by the 5 computing nodes are 500MB, 300MB, 550MB, 150MB and 700MB respectively. The management module can select computing nodes #4, #2, and #1 in order from small to large for memory allocation speed limit, or the management module can select computing nodes #5, #3, and #1 in order from large to small for memory allocation speed limit.

[0115] It should be noted that the above possible implementation methods are only examples and should not be understood as specific limitations on the embodiments of the present application. Selecting some computing nodes from multiple computing nodes by other means to implement the memory management method provided in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.

[0116] Optionally, in some embodiments, when the management module limits the memory allocation rate of N computing nodes, it may limit the memory allocation rate of the N computing nodes according to the memory allocation rate limit policies corresponding to the N computing nodes. The memory allocation rate limit policies corresponding to the N computing nodes may be the same or different, and the embodiments of the present application are not limited to this.

[0117] For example, if the memory allocation speed is based on the target value of the speed reduction, in the example shown in (a) of Figure 3, the memory allocation speed limit strategies of computing node #1 and computing node #2 are the same, that is, both are reduced to 20MB / s. In the example shown in (b) of Figure 3, the memory allocation speed limit strategies of computing node #1 and computing node #2 are different, that is, computing node #1 is reduced to 20MB / s, and computing node #2 is reduced to 10MB / s.

[0118] For another example, if the memory allocation speed is based on the reduction rate, in the example shown in (a) in Figure 3, the memory allocation speed limit strategies of computing node #1 and computing node #2 are different, the reduction rate of computing node #1 is 30MB / s, and the reduction rate of computing node #2 is 15MB / s. In the example shown in (b) in Figure 3, the memory allocation speed limit strategies of computing node #1 and computing node #2 are different, the reduction rate of computing node #1 is 30MB / s, and the reduction rate of computing node #2 is 25MB / s.

[0119] As mentioned above, N computing nodes may correspond to the same memory allocation rate limit policy or different memory allocation rate limit policies. For example, the memory allocation rate limit policies corresponding to the N computing nodes may be determined in the following ways:

[0120] In a possible implementation, N memory allocation rate limit policies corresponding to the N computing nodes are preset.

[0121] For example, the memory allocation speed limit policy of computing node #1 is pre-set to that when the first trigger condition is met, the memory allocation speed of computing node #1 is 20MB / s. When the management module determines that the first trigger condition is met, the memory allocation speed of computing node #1 can be reduced to 20MB / s. The original memory allocation speed of computing node #1 is not limited in this memory allocation speed limit policy.

[0122] In a possible implementation, the N memory allocation rate limit policies corresponding to the N computing nodes are determined according to the priorities of the N computing nodes.

[0123] Specifically, the computing nodes may correspond to different priorities, and the memory allocation rate limit strategy may be determined according to the priorities of the computing nodes.

[0124] For example, the priorities corresponding to computing node #1 and computing node #2 are priority #1 and priority #2 respectively, where priority #1 is higher than priority #2. When the memory allocation rate limit policy is determined based on the priorities of computing node #1 and computing node #2, since priority #1 is higher than priority #2, when determining and executing the memory allocation rate limit policy for computing node #1 and computing node #2, the memory allocation rate of computing node #1 can be greater than the memory allocation rate of computing node #2, or the magnitude of the reduction in the memory allocation rate of computing node #1 is smaller than the magnitude of the reduction in the memory allocation rate of computing node #2.

[0125] It should be noted that the description of the priority of the computing nodes can be found below and will not be elaborated here.

[0126] In a possible implementation, the N memory allocation rate limit policies corresponding to the N computing nodes are determined according to the size of the memory used by the N computing nodes.

[0127] Specifically, the management module may determine the memory allocation rate limit policy for the N computing nodes in ascending or descending order according to the sizes of the memories used by the N computing nodes.

[0128] For example, the memory size used by computing node #1 is 200MB, and the memory size used by computing node #2 is 300MB. Before the speed limit is implemented, the memory allocation speed of computing node #1 is 30MB / s, and the memory allocation speed limit of computing node #2 is 20MB / s. Since the memory used by computing node #2 is greater than the memory used by computing node #1, when the memory allocation speed limit policy is determined and executed, the memory allocation speed of computing node #1 can be reduced to 10MB / s, and the memory allocation speed of computing node #2 can be reduced to 15MB / s. In other words, in this case, the more memory the computing node uses, the less the memory allocation speed is reduced.

[0129] For another example, the memory size used by computing node #1 is 200MB, and the memory size used by computing node #2 is 300MB. Before the speed limit, the memory allocation speed of computing node #1 is 20MB / s, and the memory allocation speed limit of computing node #2 is 30MB / s. Since the memory used by computing node #1 is less than the memory used by computing node #2, when determining and executing the memory allocation speed limit policy, the memory allocation speed of computing node #1 can be reduced to 15MB / s, and the memory allocation speed of computing node #2 can be reduced to 10MB / s. In other words, in this case, the more memory the computing node uses, the more the memory allocation speed is reduced.

[0130] It should be noted that the above method of determining the memory allocation rate limit strategy of the computing node is only an example and should not be understood as a specific limitation on the embodiments of the present application.

[0131] S220, when performing memory allocation speed limit on N computing nodes, migrate first data to the first computing node, and / or migrate P business examples out of M business examples to the second computing node to relieve the pressure on the first memory pool, the first data being data stored in the first memory pool.

[0132] Specifically, when the management module performs memory allocation speed limit on N computing nodes, the management module can migrate the first data stored in the first memory pool to the first computing node, or migrate P business examples out of M business examples in the first computing node to the second computing node to reduce the memory pressure of the first memory pool, where M≥P≥1, and P is an integer.

[0133] For example, the first memory pool has a total of 100GB of memory and 95GB of memory has been used. The first computing node itself has 20GB of memory and 10GB of memory has been used. The management module can migrate 5GB of data in the first memory pool to the first computing node, so that the remaining memory size in the first memory pool is 10GB, thereby alleviating the pressure on the first memory pool.

[0134] For another example, the first memory pool has a total of 100GB of memory and 95GB of memory has been used. The first computing node uses the memory of the first memory pool to run M business instances. The M business instances use a total of 20GB of memory resources. The management module can migrate P business instances to the second memory pool to relieve the pressure on the first memory pool.

[0135] It should be noted that the first computing node may be one of the N computing nodes, or may not be a computing node among the N computing nodes.

[0136] For example, the management module performs memory allocation speed limit on three computing nodes (computing node #1, computing node #2, and computing node #3), and the management module may determine one computing node from the three computing nodes as the first computing node.

[0137] For another example, the first memory pool is associated with a total of 5 computing nodes. When the management module determines that the first trigger condition is met, it limits the memory allocation rate of 3 of the 5 computing nodes, and when limiting the memory allocation rate, determines one computing node from the remaining 2 computing nodes as the first computing node.

[0138] For the first case, the first computing node is a computing node among N computing nodes. Exemplarily, there are the following possible implementations for determining the first computing node from the N computing nodes.

[0139] A possible implementation manner: the first computing node is preset.

[0140] The description of this method can be found above and will not be repeated here.

[0141] A possible implementation manner: the first computing node is determined according to the priorities of the N computing nodes.

[0142] For example, if the management module determines to migrate the first data to the first computing node, the computing node with the lowest priority among the N computing nodes may be determined as the first computing node.

[0143] For another example, if the management module determines to migrate the service instance in the first computing node to the second computing node, the computing node with the highest priority among the N computing nodes may be determined as the first computing node.

[0144] It should be understood that the above is only an example. In other embodiments, if the management module determines to migrate the first data to the first computing node, the computing node with the highest priority among the N computing nodes may also be determined as the first computing node.

[0145] In a possible implementation, the first computing node is determined according to the size of the remaining memory of the N computing nodes themselves.

[0146] For example, if the management module determines to migrate the first data to the first computing node, the computing node with the largest remaining memory among the N computing nodes may be determined as the first computing node.

[0147] For another example, if the management module determines to migrate the service instance in the first computing node to the second computing node, the computing node with the least remaining memory among the N computing nodes may be determined as the first computing node.

[0148] As described above, determining the memory allocation rate limit measurement and determining the first computing node can be done by using the priority of the computing node. Exemplarily, the priority of the computing node can be determined by the following possible implementation methods:

[0149] In one possible implementation, the priorities of the computing nodes are pre-set.

[0150] The description of this method is similar to the description of the memory allocation rate limit policy being pre-set above, and will not be repeated here.

[0151] In one possible implementation, the priority of a computing node is determined based on the service instance running on the computing node.

[0152] Specifically, the services running on the service instances deployed on the computing nodes may be different, so the priority of the computing nodes may be determined according to the service instances of the computing nodes.

[0153] For example, if the service instance on computing node #1 has a high real-time requirement, while the service instance on computing node #2 has a low real-time requirement, it can be determined that the priority of computing node #1 is higher than that of computing node #2.

[0154] In one possible implementation, the priority of a computing node is determined according to the hardware capability of the computing node.

[0155] Specifically, the hardware capabilities of different computing nodes may be different, so the priority of the computing nodes may be determined according to the hardware capabilities of the computing nodes.

[0156] For example, if the hardware capability of a computing node is strong, the priority of the computing node may be determined to be high, and if the hardware capability of a computing node is weak, the priority of the computing node may be determined to be low.

[0157] Exemplarily, the hardware capabilities of the computing node include, but are not limited to: the processing capability of the processor of the computing node, the size of the memory of the computing node, and the like.

[0158] It should be noted that when limiting the memory allocation rate of a computing node, a variety of rate limiting algorithms can be adopted, such as a multi-sliding window algorithm, a multi-token bucket algorithm, etc., which is not limited in the embodiments of the present application.

[0159] In an embodiment of the present application, when there is a hot spot in the first memory pool (for example, the remaining memory in the memory pool is insufficient), the memory allocation speed of the computing node is limited, which can extend the time for the first memory pool to be full, and during the memory allocation speed limit, part of the data in the first memory pool is migrated to the first computing node, and / or the business instance of the first computing node is migrated to the second computing node to relieve the pressure on the first memory pool. Since the memory allocation speed is limited for the computing node, there is more time to perform the above actions, preventing the first memory pool from bursting, avoiding system jams, and ensuring the operation of important businesses. In addition, since NVM is not used as a swap partition in the embodiment of the present application, it will not affect the speed of data migration and business instance migration.

[0160] Optionally, in some embodiments, the method further comprises:

[0161] In response to satisfying the second trigger condition, memory allocation rate limit is performed on L computing nodes, where L≥N and L is an integer, and the L computing nodes are associated with the first memory pool.

[0162] As shown in (a) in Figure 4, before the memory allocation speed is restricted, the memory allocation speed corresponding to computing node #1 is 50 MB / s, and the memory allocation speed corresponding to computing node #2 is 35 MB / s. Taking the first trigger condition that the usage rate of the first memory pool is greater than or equal to threshold #1, and the second trigger condition that the usage rate of the first memory pool is greater than or equal to threshold #2 as an example, when the management module determines that the usage rate of the first memory pool is equal to threshold #1, the management module can perform memory allocation speed reduction processing on computing node #1, and reduce the memory allocation speed corresponding to computing node #1 from 50 MB / s to 20 MB / s. When the usage rate of the first memory pool is equal to threshold #2, the management module performs memory allocation speed reduction processing on computing node #1 and computing node #2, and reduces the memory allocation speed corresponding to computing node #2 from 35 MB / s to 20 MB / s, and further reduces the memory allocation speed corresponding to computing node #1 from 20 MB / s to 10 MB / s. Threshold #1 is greater than threshold #2. In other words, the management module can first perform memory allocation deceleration on computing node #1. When the usage rate of the first memory pool further decreases, the memory allocation deceleration can be performed on computing node #2 and the memory allocation speed of computing node #1 can be further reduced. In this example, when the memory allocation deceleration is performed on computing node #1 from threshold #1 to threshold #2, it is not directly reduced from 20MB / s to 10MB / s, but satisfies a specific functional relationship. It can be understood that the computing node #1 shown in (a) of Figure 4 satisfies the specific functional relationship when decelerating, which is a linear function, but the embodiments of the present application are not limited to this.

[0163] For another example, as shown in (b) in Figure 4, before the memory allocation speed is restricted, the memory allocation speed corresponding to computing node #1 is 50 MB / s, and the memory allocation speed corresponding to computing node #2 is 35 MB / s. Taking the first trigger condition being that the usage rate of the first memory pool is greater than or equal to threshold #1, and the second trigger condition being that the usage rate of the first memory pool is greater than or equal to threshold #2 as an example, when the management module determines that the usage rate of the first memory pool is equal to threshold #1, the management module can perform memory allocation speed reduction processing on computing node #1, reducing the memory allocation speed corresponding to computing node #1 from 50 MB / s to 20 MB / s. When the usage rate of the first memory pool is equal to threshold #2, the memory allocation speed of the computing node #2 process is reduced and further memory allocation speed limit processing is performed on computing node #1, reducing the memory allocation speed corresponding to computing node #2 from 35 MB / s to 10 MB / s, and further reducing the memory allocation speed corresponding to computing node #1 to 10 MB / s, and threshold #1 is greater than threshold #2. In other words, the management module may first perform memory allocation deceleration processing on computing node #1, and when the usage rate of the first memory pool further decreases, the management module may perform memory allocation deceleration processing on computing node #2.

[0164] In the memory management method described above, a memory pool is used as an application scenario. In other embodiments of the present application, the memory management method provided in the embodiment of the present application can also be used to manage the memory of a computing node. FIG5 shows another memory management method provided in the embodiment of the present application. As shown in FIG5 , the method includes:

[0165] S510 : In response to a first trigger condition being met, limit the memory allocation rate for X service instances, where X is greater than or equal to 1 and is an integer.

[0166] Specifically, the first computing node may limit the memory allocation rate for X business instances when the first trigger condition is met, where X is greater than or equal to 1 and is an integer, and the X business instances are business instances deployed on the computing node.

[0167] It should be understood that the description of limiting the memory allocation rate of the service instance for the first computing node is similar to the description of limiting the memory allocation rate of the computing node for the management module above. For the sake of brevity, it will not be repeated here.

[0168] Illustratively, the first trigger condition may be one or more of the following possible implementations.

[0169] In a possible implementation, the first trigger condition is that the memory usage of the first computing node is greater than or equal to a first threshold.

[0170] The first computing node may limit the memory allocation rate for the X service instances when detecting that the usage rate of its memory is greater than or equal to a first threshold (eg, 90%).

[0171] In a possible implementation, the first trigger condition is that the remaining memory of the first computing node is less than or equal to a fourth threshold.

[0172] In a possible implementation, the first trigger condition is that the remaining rate of the memory of the first computing node is less than or equal to a fifth threshold.

[0173] In a possible implementation, the memory application speed of the X business instances is greater than or equal to a sixth threshold.

[0174] It should be noted that the X business instances may be some of the business instances deployed on the first computing node, or may be all of the business instances deployed on the first computing node.

[0175] Optionally, in some embodiments, when the first computing node performs memory allocation rate limiting on X business instances, it may perform memory allocation rate limiting on the X business instances according to the memory allocation rate limiting policies corresponding to the X business instances. The memory allocation rate limiting policies corresponding to the X business instances may be the same or different, and this embodiment of the present application is not limited to this.

[0176] In a possible implementation, X memory allocation rate limit policies corresponding to the X business instances are preset.

[0177] In one possible implementation, the X memory allocation rate limit policies corresponding to the X business instances are determined according to the priorities of the X business instances.

[0178] Specifically, X business instances may correspond to different priorities, and the memory allocation rate limit strategy may be determined according to the priorities of the business instances.

[0179] In one possible implementation, the X memory allocation rate limit policies corresponding to the X business instances are determined according to the sizes of the memories used by the X business instances.

[0180] For example, the priority of a service instance may be determined by the following possible implementation methods:

[0181] In one possible implementation, the priority of the service instance is pre-set.

[0182] In one possible implementation, the priority of a business instance is determined based on the amount of memory used by the business instance. For example, a business instance that uses more memory has a higher priority, while a business instance that uses less memory has a lower priority.

[0183] S520 : When executing the memory allocation rate limit, migrate Y business instances among the X business instances to the second computing node, where X≥Y≥1 and Y is an integer.

[0184] Specifically, when the first computing node performs memory allocation rate limiting, Y business instances out of X business instances may be migrated to the second computing node, thereby alleviating memory hotspots on the first computing node.

[0185] In the embodiment of the present application, when there is a hot spot in the computing node (for example, the remaining memory in the memory pool is insufficient), the memory allocation speed of the business instance in the computing node is limited, which can extend the time when the first computing node is fully occupied. During the period of memory allocation speed limit, the business instance of the first computing node is migrated to the second computing node to relieve the pressure on the first computing node. Since the memory allocation speed limit is applied to the business instance, there is more time to perform the above actions, preventing the memory of the first computing node from bursting, avoiding system jams, and ensuring the operation of important businesses. In addition, since NVM is not used as a swap partition in the embodiment of the present application, the speed of business instance migration will not be affected.

[0186] The memory management method provided by the embodiment of the present application is described in detail above with reference to Figures 2 to 5. Next, the memory management apparatus and device provided by the embodiment of the present application is described in detail with reference to Figures 6 and 7.

[0187] FIG6 shows a schematic block diagram of a memory management apparatus 600 according to an embodiment of the present application. The memory management apparatus 600 may correspond to (e.g., be configured in or constitute) the management module described in the aforementioned systems 100 and methods 200 and 500, and each module or unit in the apparatus 600 is respectively configured to execute the functions and actions or processes of the aforementioned management module. Detailed descriptions thereof are omitted herein to avoid redundancy.

[0188] Figure 7 shows a schematic block diagram of a memory management device 700 according to an embodiment of the present application. The device 700 includes: a processor. Optionally, the device 700 also includes a memory and / or a transceiver, and the memory and / or the transceiver can be connected to the processor. Further optionally, the device 700 includes a bus. The processor, the memory, and the transceiver can be connected via a bus, the memory can be used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive information or signals, so that the device 700 performs the functions of the management module in the above-mentioned systems 100, methods 200 and 500, and the various actions or processing processes performed. The device 700 can correspond to (for example, be configured in or itself be) the above-mentioned control node, and each module or unit in the device 700 is respectively used to perform the functions of the above-mentioned control node and the various actions or processing processes performed. Here, in order to avoid redundancy, its detailed description is omitted.

[0189] It should be noted that the embodiments of the present application can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, the steps of the above-mentioned method embodiments can be completed by hardware integrated logic circuits in the processor or by software instructions. The above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above-mentioned method.

[0190] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0191] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0192] It should be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0193] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of this application.

[0194] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0196] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0197] In addition, each functional unit in the embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0198] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0199] The above description is merely a specific implementation of the embodiments of the present application, but the scope of protection of the embodiments of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in the embodiments of the present application should be included in the scope of protection of the embodiments of the present application. Therefore, the scope of protection of the embodiments of the present application should be based on the scope of protection of the claims.

Claims

1. A method of memory management, It is characterized in that The method comprises: In response to satisfying a first trigger condition, memory allocation rate limiting is performed on N computing nodes so that the N computing nodes perform memory allocation rate limiting on business instances deployed on the N computing nodes, N ≥ 1 and is an integer, the N computing nodes are associated with a first memory pool, and the N computing nodes are deployed with M business instances, M ≥ 1 and is an integer; When performing memory allocation speed limit on the N computing nodes, migrate the first data to the first computing node, and / or migrate P business instances among the M business instances to the second computing node, where M≥P≥1 and P is an integer, the second computing node is associated with a second memory pool, and the first data is data stored in the first memory pool.

2. The method according to claim 1, It is characterized in that The first trigger condition includes one or more of the following: The usage rate of the first memory pool is greater than or equal to a first threshold; The number of cold pages in the first memory pool is greater than or equal to a second threshold; The number of hot pages in the first memory pool is greater than or equal to a third threshold; The remaining memory of the first memory pool is less than or equal to a fourth threshold; The remaining rate of the first memory pool is less than or equal to a fifth threshold.

3. The method according to claim 1 or 2, It is characterized in that The memory allocation speed limit for the N computing nodes includes: Determine N memory allocation rate limit strategies corresponding to the N computing nodes; Memory allocation speed is limited for the N computing nodes according to the N memory allocation speed limit strategies.

4. The method according to claim 3, It is characterized in that The N memory allocation speed limit policies corresponding to the N computing nodes are preset; or The N memory allocation speed limit strategies corresponding to the N computing nodes are determined according to the priorities of the N computing nodes; or The N memory allocation speed limit strategies corresponding to the N computing nodes are determined according to the size of the memory used by the N computing nodes.

5. According to the method of any one of claims 1 to 4, the first computing node is a computing node among the N computing nodes, and when the memory allocation speed limit is executed, before migrating the first data to the first computing node, the method further include: The first computing node is determined from the N computing nodes.

6. The method according to claim 5, It is characterized in that The first computing node is preset; or The first computing node is determined according to the priorities of the N computing nodes; or The first computing node is determined according to the size of the remaining memory of the N computing nodes themselves.

7. The method according to claim 4 or 6, It is characterized in that The priorities of the N computing nodes are preset; or The priorities of the N computing nodes are determined according to the service instances running on the N computing nodes; or The priorities of the N computing nodes are determined according to the hardware capabilities of the N computing nodes.

8. A method of memory management, It is characterized in that The method is applied to a first computing node, and the method comprises: In response to satisfying the first trigger condition, limiting the memory allocation rate for X service instances, where X ≥ 1 and is an integer; When the memory allocation rate limit is executed, Y business instances among the X business instances are migrated to the second computing node, where X≥Y≥1, and Y is an integer.

9. The method according to claim 8, It is characterized in that The first trigger condition includes one or more of the following: The memory usage of the first computing node is greater than or equal to a first threshold; The remaining memory of the first computing node is less than or equal to a fourth threshold; The remaining rate of the memory of the first computing node is less than or equal to a fifth threshold; The memory application speed of the X business instances is greater than or equal to a sixth threshold.

10. The method according to claim 8 or 9, It is characterized in that The memory allocation speed limit for X business instances includes: Determine X memory allocation rate limit strategies corresponding to the X business instances; Memory allocation speed is limited for the X business instances according to the X memory allocation speed limit policies.

11. The method according to claim 10, It is characterized in that The X memory allocation speed limit policies corresponding to the X business instances are preset; or The X memory allocation rate limit strategies corresponding to the X business instances are determined according to the priorities of the X business instances; or The X memory allocation rate limit strategies corresponding to the X business instances are determined according to the size of the memory used by the X business instances.

12. The method according to any one of claims 8 to 11, It is characterized in that The Y service instances are preset; or The Y service instances are determined according to the priorities of the X service instances; or The Y service instances are determined according to the memory sizes used by the X service instances.

13. A device, It is characterized in that include: A processor and a memory, the memory being used to store programs and data, the processor being used to call and run the program from the memory to execute the method according to any one of claims 1 to 7 or 8 to 12.

14. A computer-readable storage medium, It is characterized in that The method comprises a computer program which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7 or 8 to 12.

15. A chip, It is characterized in that The chip includes a processor and a data interface, and the processor reads instructions stored in a memory through the data interface to execute the method as claimed in any one of claims 1 to 7 or 8 to 12.

Citation Information

Patent Citations

  • Control method and device and Hadoop system

    CN105487928A

  • Method for managing memory of computing resources, apparatus for managing memory of computing resources, and computer program product

    CN111459649A

  • Memory allocation method, device and equipment

    CN115421924A

  • Memory management method and device

    CN116643876A

  • Methods, systems, and apparatus to prioritize computing devices for virtualization

    US20120131573A1

Cited By

  • Business processing method and device based on AI data lake, medium and electronic equipment

    CN122412167A