Remote memory centralized management method based on software and hardware collaboration
By introducing P4 programmable switches to the data center for centralized management, dynamic memory pooling management is implemented, and the problem of unbalanced memory resource allocation in existing remote memory implementations is solved, and memory utilization and overall performance of the data center are improved.
Patent Information
- Application Number
- CN202510006447.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-11
AI Technical Summary
The existing remote memory implementation lacks a dynamic pooling management mechanism, resulting in unbalanced memory resource allocation and problems of waste and resource competition.
A centralized management method based on soft and hard collaboration is adopted, and a P4 programmable switch is used as a management node to realize dynamic memory pooling management. This method optimizes the allocation and use of memory resources through dynamic conversion of node roles, memory recycling mechanisms and rental table entry management.
It realizes efficient utilization of memory resources, reduces resource competition and waste, improves the performance of memory-intensive machines in the data center, and reduces deployment costs.
Smart Images

Figure CN119814704A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data, and in particular to a centralized remote memory management method based on software and hardware collaboration. Background Art
[0002] In the era of big data, data-intensive applications are increasing, and memory demand is growing. However, applications often overestimate their memory requirements, or directly request memory according to peak usage, which causes serious waste in data centers. When some machines are in a state of low memory usage under normal load, some machines may have memory shortages due to peak loads. This imbalance is not uncommon. In this case, remote memory mechanisms have been developed. Remote memory accesses remote memory through high-speed networks or new protocols.
[0003] Some work at the hardware level attempts to use new hardware (such as CXL) to help completely separate the CPU and memory and configure the memory as a memory pool, but since it requires new architectures, new hardware, and protocol designs, it is still a long way from being available in data centers.
[0004] Some work at the logical level attempts to take advantage of the peak time difference between servers. Since the peak load does not last long and is not common, the machines in the rack rarely reach the peak at the same time, so there is an opportunity for the machine with the peak load to access the free memory of the non-peak machine. Due to the development of high-speed networks (such as RDMA), and the fact that access within the rack is only one hop, the performance of remote access is only one to two orders of magnitude slower than local access. Compared with the disk that originally served as swap space, the performance of using remote memory will be much better. There is no need to design new hardware and protocols. It can be used between ordinary servers in the rack, which has lower deployment costs for data centers and higher feasibility.
[0005] For most logical decomposition work, the architecture is that a fixed computing node in the rack is directly connected to a fixed memory node. The computing node mainly stores hot memory locally and cold memory remotely, and the work will optimize the performance of remote access as much as possible. However, such a one-to-one architecture is not perfect. In actual applications, the node that serves as a memory node will also have local tasks. When memory is tight, local and remote competition for memory resources will occur. If the memory node is configured as a node without local tasks, it will also cause a lot of waste, which goes against the original intention of borrowing memory between peak and non-peak machines.
[0006] Therefore, technicians in this field are committed to developing a centralized remote memory management method based on software and hardware collaboration. When the load is low, ordinary servers in data centers can "lend" idle memory to form a memory pool for use by servers with insufficient memory in the rack. Each node may be a lender or a borrower as the load changes. Such "dynamic memory pool management" is assisted by a centralized management node to balance this part of management and performance. Summary of the invention
[0007] In view of the above-mentioned defects of the prior art, the technical problem to be solved by the present invention is to realize dynamic pooling management of remote memory.
[0008] To achieve the above objectives, the present invention provides a centralized remote memory management method based on software and hardware collaboration, which uses a centralized management node to perform dynamic memory pooling management.
[0009] Furthermore, the management node is a P4 programmable switch.
[0010] Furthermore, the P4 programmable switch collects memory information and distributes it in a load-balanced manner.
[0011] Furthermore, the P4 programmable switch responds to memory demands and provides transparent virtual remote memory for use.
[0012] Furthermore, the node roles are dynamically switched according to the load.
[0013] Furthermore, the node roles include lenders and borrowers.
[0014] Furthermore, a memory recovery mechanism is included to migrate memory data to another lender, and the original lender reclaims the memory.
[0015] Further, the following steps are included:
[0016] Step 1: The idle memory node registers with the management node control plane and provides the available memory length and memory virtual address information;
[0017] Step 2: The management node control plane receives the request and processes it, adding the memory information and node information to the table entry, and the idle memory node becomes the lender;
[0018] Step 3: The node with insufficient memory registers with the management node control plane and requests the required memory length;
[0019] Step 4: The management node control plane receives the request and processes it, and the node with insufficient memory becomes the borrower;
[0020] Step 5: The management node control plane forms a lease entry and establishes a borrowing and lending relationship;
[0021] Step 6: The management node control plane sends the lease table entry to the management node data plane for use during RDMA remote access;
[0022] Step 7: The borrower accesses the remote memory through unilateral RDMA. After being checked and modified by the management node data plane, the data packet is sent to the correct lender node, completing the transparent and unaware access to the borrower.
[0023] Step 8: The borrower load decreases and no longer needs to borrow memory. The borrower deregisters the role from the management node control plane and exits the borrower role.
[0024] Step 9: The management node control plane receives the request and processes it, deletes the lease entry, releases the memory originally occupied by the borrower, and puts it back into the memory pool for use by other nodes.
[0025] Furthermore, the rental table entry includes node information, memory information, and information required from the borrower to the lender of the lender and the borrower.
[0026] Further, the following steps are included:
[0027] Step 1: The idle memory node registers with the management node control plane and provides the available memory length and memory virtual address information;
[0028] Step 2: The management node control plane receives the request and processes it, adding the memory information and node information to the table entry, and the idle memory node becomes the lender;
[0029] Step 3: The node with insufficient memory registers with the management node control plane and requests the required memory length;
[0030] Step 4: The management node control plane receives the request and processes it, and the node with insufficient memory becomes the borrower;
[0031] Step 5: The management node control plane forms a lease entry and establishes a borrowing and lending relationship;
[0032] Step 6: The management node control plane sends the lease table entry to the management node data plane for use during RDMA remote access;
[0033] Step 7: The borrower accesses the remote memory through unilateral RDMA. After being checked and modified by the management node data plane, the data packet is sent to the correct lender node, completing the transparent and unaware access to the borrower.
[0034] Step 8: The lender load increases and it is no longer able to lend memory. The lender deregisters its role from the management node control plane and exits the lender role.
[0035] Step 9: The management node control plane receives the request and processes it, allocates available memory on other lenders, and performs memory migration;
[0036] Step 10: The management node control plane monitors the memory migration, and after completion, sends the new lease table entry;
[0037] Step 11: The lender successfully cancels the account;
[0038] Step 12: The borrower accesses the memory on the new lender without noticing.
[0039] The existing remote memory framework is not practical. It adopts an architecture where a single fixed memory node corresponds to a single fixed computing node, which is impractical. The present invention proposes dynamic memory pooling management, which is assisted by a centralized management node. The present invention adds a centralized management node in the network implemented by a P4 programmable switch to the original architecture. The present invention does not damage the original performance, but increases the scalability of the architecture and the practicality in the data center.
[0040] Existing remote memory implementations do not take into account the dynamically changing load conditions of data center nodes. The present invention proposes dynamic node role conversion, where the role of each node can change with the load, and may be a lender or a borrower. The present invention adds a node load monitoring and change mechanism to the original architecture. The architecture of the present invention can change dynamically with the node load, increasing flexibility and practicality.
[0041] The existing remote memory implementation does not take into account the memory resource competition between local tasks of memory nodes and remote access. The present invention proposes a memory recovery mechanism to migrate memory data to the next memory node, and the original memory node can reclaim its own memory. The present invention adds a memory migration mechanism to the original architecture. The present invention reduces resource competition and performance loss between nodes.
[0042] Compared with the prior art, the present invention has the following obvious substantial features and significant advantages:
[0043] 1. The present invention does not require the use of newly designed hardware or protocols, but only uses commercial network cards and commercial switches, which are large-scale products with low deployment costs and can be widely used in data centers.
[0044] 2. The present invention does not require the use of a new operating system, and most of the implementations are on programmable switches. The deployment is non-invasive and non-destructive, which facilitates large-scale application in data centers.
[0045] 3. The present invention is used to manage memory sharing between common servers in a data center, helping nodes to share free memory within a rack without adding new memory, thereby improving memory utilization and the performance of machines with limited memory, thereby helping data centers reduce costs and increase efficiency.
[0046] 4. The present invention has a highly scalable and customizable architecture, can perform dynamic management and monitoring as the memory load of each node changes, and has excellent practicality.
[0047] The concept, specific structure and technical effects of the present invention will be further described below in conjunction with the accompanying drawings to fully understand the purpose, characteristics and effects of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a system overall architecture diagram of a preferred embodiment of the present invention;
[0049] Figure 2 It is a flow chart of a preferred embodiment of the present invention;
[0050] Figure 3 It is a schematic diagram of a segmented flow chart of a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following describes several preferred embodiments of the present invention with reference to the drawings in the specification, so that the technical content is clearer and easier to understand. The present invention can be embodied in many different forms of embodiments, and the protection scope of the present invention is not limited to the embodiments mentioned in the text.
[0052] In the drawings, components with the same structure are indicated by the same numerical reference numerals, and components with similar structures or functions are indicated by similar numerical reference numerals. The size and thickness of each component shown in the drawings are arbitrarily shown, and the present invention does not limit the size and thickness of each component. In order to make the illustration clearer, the thickness of the components is appropriately exaggerated in some places in the drawings.
[0053] like Figure 1 As shown, the present invention uses a P4 programmable switch located in the center of the rack to perform centralized management of software and hardware collaboration. From the perspective of the memory lender, the switch is responsible for collecting memory information and distributing it in a load-balanced manner; from the perspective of the memory borrower, the switch is responsible for responding to memory needs and providing transparent virtual remote memory for use. Figure 2 It is a flow chart; Figure 3 It is a segmented process diagram.
[0054] Normally, the entire memory access process is as follows:
[0055] Step 1: Through the dynamic role conversion mechanism, nodes with free memory register with the control plane of the central switch and provide information such as available memory length (in G granularity) and memory virtual address.
[0056] Step 2: The switch control plane receives the request and processes it, adding the memory information and node information to the table entry, indicating that this part of the memory is available and the node becomes the lender.
[0057] Step 3: Through the dynamic role switching mechanism, the node with tight memory registers with the switch control plane and provides the required memory length (also in G granularity).
[0058] Step 4: The switch control plane receives the request and processes it. The memory of a lender node may be used by multiple borrower nodes, and a borrower may use the memory of multiple lender nodes. In order to ensure load balancing, the remaining memory of each lender node will be kept as close as possible, and the memory on the lender with more remaining memory will be allocated first;
[0059] Step 5: The borrowing and lending relationship is successfully established, and the control plane forms a "lease table entry", which contains the node information (IP, MAC address, etc.) of the lender and borrower, memory information (starting address, memory length, etc.), and the information that the borrower needs to fill in from the lender (rkey, qpnum, etc. required for unilateral RDMA requests);
[0060] Step 6: The control plane of the programmable switch sends the "lease table entry" to the data plane of the programmable switch for use in subsequent RDMA remote access, thereby realizing a management mechanism that combines software and hardware. The control plane can modify the table entries sent at any time and perform dynamic management; the data plane processes data packets at line speed according to the table entries sent, taking into account performance losslessness and perfectly balancing the difficulties of management and performance;
[0061] Step 7: The borrower accesses the remote memory through unilateral RDMA. It does not know who the lender is. However, after being checked and modified by the programmable switch data plane, the data packet will be sent to the correct lender node, completing the transparent access without the borrower's awareness.
[0062] Case 1:
[0063] Step 8.1: The load of a borrower decreases and no longer needs to borrow memory. Through the dynamic role conversion mechanism, the borrower cancels the role to the control plane of the central switch and exits the borrower role;
[0064] Step 9.1: The switch control plane receives the request and processes it, deleting the "lease table entry", releasing the memory originally occupied by the borrower, and putting it back into the memory pool for use by other nodes in the rack, thereby achieving dynamic node role conversion and dynamic memory pooling management effects, with excellent flexibility and practicality.
[0065] Case 2:
[0066] Step 8.2: When the load of a lender increases and it is no longer able to lend memory, it deregisters its role to the control plane of the central switch through a dynamic role conversion mechanism and exits the lender role;
[0067] Step 9.2: The switch control plane receives the request and processes it, allocates available memory on other lenders, and notifies the node to perform memory migration;
[0068] Step 10.2: The switch control plane monitors the memory migration and, after completion, sends the new "lease table entry";
[0069] Step 11.2: The lender successfully cancels the registration and cancellation mechanism, which brings great scalability, flexibility and practicality to the architecture;
[0070] Step 12.2: The borrower accesses the memory on the new lender without any perception. This does not affect the performance of the borrower (computing node) or the local tasks of the lender (memory node). It flexibly utilizes other available resources to reduce resource competition and performance loss.
[0071] The preferred specific embodiments of the present invention are described in detail above. It should be understood that ordinary technicians in the field can make many modifications and changes based on the concept of the present invention without creative work. Therefore, all technical solutions that can be obtained by technicians in the technical field based on the concept of the present invention through logical analysis, reasoning or limited experiments on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A centralized remote memory management method based on software and hardware collaboration, characterized in that: Use centralized management nodes for dynamic memory pooling management.
2. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 1, characterized in that: The management node is a P4 programmable switch.
3. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 2, characterized in that: The P4 programmable switch collects memory information and distributes it in a load-balanced manner.
4. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 2, characterized in that: The P4 programmable switch responds to memory demands and provides transparent virtual remote memory for use.
5. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 1, characterized in that: Node roles change dynamically with load.
6. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 5, characterized in that: The node roles include lender and borrower.
7. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 1, characterized in that: Includes a memory recycling mechanism that migrates memory data to another lender and allows the original lender to reclaim the memory.
8. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 1, characterized in that: The following steps are involved: Step 1: The idle memory node registers with the management node control plane and provides the available memory length and memory virtual address information; Step 2: The management node control plane receives the request and processes it, adding the memory information and node information to the table entry, and the idle memory node becomes the lender; Step 3: The node with insufficient memory registers with the management node control plane and requests the required memory length; Step 4: The management node control plane receives the request and processes it, and the node with insufficient memory becomes the borrower; Step 5: The management node control plane forms a lease entry and establishes a borrowing and lending relationship; Step 6: The management node control plane sends the lease table entry to the management node data plane for use during RDMA remote access; Step 7: The borrower accesses the remote memory through unilateral RDMA. After being checked and modified by the management node data plane, the data packet is sent to the correct lender node, completing the transparent and unaware access to the borrower. Step 8: The borrower load decreases and no longer needs to borrow memory. The borrower deregisters the role from the management node control plane and exits the borrower role. Step 9: The management node control plane receives the request and processes it, deletes the lease entry, releases the memory originally occupied by the borrower, and puts it back into the memory pool for use by other nodes.
9. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 8, characterized in that: The rental table entry includes node information, memory information, and information required from the borrower to the lender of the lender and the borrower.
10. The centralized remote memory management method based on software and hardware collaboration as claimed in claim 1, characterized in that: The following steps are involved: Step 1: The idle memory node registers with the management node control plane and provides the available memory length and memory virtual address information; Step 2: The management node control plane receives the request and processes it, adding the memory information and node information to the table entry, and the idle memory node becomes the lender; Step 3: The node with insufficient memory registers with the management node control plane and requests the required memory length; Step 4: The management node control plane receives the request and processes it, and the node with insufficient memory becomes the borrower; Step 5: The management node control plane forms a lease entry and establishes a borrowing and lending relationship; Step 6: The management node control plane sends the lease table entry to the management node data plane for use during RDMA remote access; Step 7: The borrower accesses the remote memory through unilateral RDMA. After being checked and modified by the management node data plane, the data packet is sent to the correct lender node, completing the transparent and unaware access to the borrower. Step 8: The lender load increases and it is no longer able to lend memory. The lender deregisters its role from the management node control plane and exits the lender role. Step 9: The management node control plane receives the request and processes it, allocates available memory on other lenders, and performs memory migration; Step 10: The management node control plane monitors the memory migration, and after completion, sends the new lease table entry; Step 11: The lender successfully cancels the account; Step 12: The borrower accesses the memory on the new lender without noticing.
Citation Information
Patent Citations
EMS memory sharing system, device and method
CN101158927A
Method for sharing memory among cluster system nodes on demand based on RDMA (Remote Direct Memory Access)
CN114756388A
Switch, memory sharing method and system, computing equipment and storage medium
CN117118930A
Routing method based on programmable switch and container state information unloading
CN117579550A
Online aggregation task scheduling system and method based on space-time compatibility
CN118869810A