A multi-node high-performance data sharing index method based on a CXL memory architecture

By binding CXL memory to the server nodes and building a hash index table, the problems of cross-node data access and low utilization are solved, achieving efficient memory sharing and querying, and improving system performance.

CN119473650BActive Publication Date: 2025-12-19ZHEJIANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411447448.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-12-19
Estimated Expiration
2044-10-16

AI Technical Summary

Technical Problem

Traditional memory architectures struggle to support high-speed data access and data consistency across nodes, and CXL suffers from low memory utilization and inefficient querying.

Method used

By using NUMA binding, CXL memory is mounted to the server node, establishing a shared region and address mapping, constructing the CXL data index area and hash index table, optimizing the hash function, reducing hash collisions, and improving memory utilization and query efficiency.

Benefits of technology

It enables efficient memory sharing across nodes, simplifies system architecture, reduces latency, improves performance, and enhances memory utilization and query efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473650B_ABST
    Figure CN119473650B_ABST
Patent Text Reader

Abstract

The application discloses a kind of multi-node high-performance data sharing index methods based on CXL memory architecture, in the application main server node is used to build CXL data index area and data storage area.Each server node is connected CXL memory device, through NUMA binding mode CXL memory device is mounted to server node, and shared area is specified, and the shared access of CXL physical memory data to multiple nodes is realized.After being connected to CXL memory, the main server node builds CXL data index area and shared storage area, and supports the data storage and query of multiple nodes through hash index table.When query request, the position of data in hash table is located through hash function, and query and match in data hash index table, finally locate the memory area where data is located.After finding data, server node loads data from CXL memory to local memory for use, and realizes the data sharing across server node.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of computers, and particularly relates to a multi-node high-performance data sharing index method based on a CXL memory architecture. BACKGROUND

[0002] With the rapid development of big data and artificial intelligence applications, data centers are facing increasing data processing demands and memory capacity demands, and traditional memory architectures have been difficult to meet these high-bandwidth and low-latency demands. Therefore, new memory technologies and architectures are emerging to improve the performance and scalability of memory systems.

[0003] CXL is an open standard interconnection technology that aims to achieve high-performance interconnection between computing devices through an efficient cache and memory access protocol. CXL utilizes the PCIe physical layer to provide low-latency, high-bandwidth connections, supports memory sharing and cache consistency, and enables multiple processors or accelerators to efficiently access shared memory. The introduction of the CXL memory architecture provides a new solution to the memory bottleneck problem in large-scale data centers and high-performance computing.

[0004] In traditional memory systems, data is usually distributed in the local memory of each server node, which leads to limitations in data access and complex memory management. In particular, when multiple nodes need to share data, the traditional memory architecture is difficult to effectively support high-speed data access across nodes and is prone to data consistency problems. Therefore, how to efficiently utilize CXL memory to achieve cross-node data sharing and high-performance access has become a difficult point. SUMMARY

[0005] In view of the deficiencies of the prior art, the application provides a multi-node high-performance data sharing index method based on a CXL memory architecture.

[0006] The application comprises the following steps:

[0007] Step 1: mount the CXL memory to each server node, specify the shared area and establish a one-to-one mapping between the CXL memory address and the node virtual memory address to achieve shared access to CXL physical memory data between multiple nodes;

[0008] Step 2: the master server node constructs a CXL data index area and a CXL data shared storage area, and then constructs a CXL data hash index table to provide support for multi-node data storage and query;

[0009] Step 3: when a query request arrives, use the first hash function to calculate the hash value of the element, and get the first position by taking the modulus. If the element is not found in the position, use the second hash function to calculate the second position, and check whether the position contains the data information of the element.

[0010] Step 4: After locating the slot where the data is located, index the memory area where the data is located;

[0011] Step 5: The server node loads the memory area where the data is located from the CXL memory into the local memory for use, realizing data sharing and use between server nodes.

[0012] Compared with the prior art, the beneficial effects of the present application are:

[0013] For the problem of cross-node memory sharing, the present application mounts the CXL memory on each server node through NUMA binding, establishes a shared area and address mapping, and realizes efficient cross-node memory sharing, thereby simplifying the system architecture, reducing the delay, and improving the overall performance.

[0014] For the problem of low query efficiency, the present application uses a CXL data hash index table, optimizes the hash function and index structure, reduces hash conflicts and avoids using a linked list structure, reduces the access frequency to the CXL memory, improves the query efficiency, and reduces the delay.

[0015] For the problem of low utilization rate of CXL memory loading, the present application uses metadata fields and address offsets to reduce the memory space occupied by address pointers, improve memory utilization, and realize efficient management and accurate positioning of large-scale data. BRIEF DESCRIPTION OF DRAWINGS

[0016] Figure 1 The flowchart of the method of the present application. DETAILED DESCRIPTION

[0017] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application will be described in detail below with reference to the drawings. The examples of these preferred embodiments are illustrated in the drawings. The embodiments of the present application shown in the drawings and described according to the drawings are merely exemplary, and the present application is not limited to these embodiments.

[0018] Here, it should also be noted that, in order to avoid obscuring the present application due to unnecessary details, only structures and / or processing steps closely related to the scheme according to the present application are shown in the drawings, and other details not closely related to the present application are omitted.

[0019] The present application will be further described using the following drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present application and not to limit the scope of the present application.

[0020] In traditional memory architecture, implementing memory sharing between different server nodes is a complex and inefficient task. In a multi-node system, data transmission and access between nodes usually rely on network communication, which not only increases the delay but also reduces the overall performance of the system. How to achieve efficient memory sharing across nodes has become an important technical problem.

[0021] In large-scale data storage, how to efficiently manage and quickly query data is a major challenge. Traditional data management methods are prone to hash collisions and uneven data distribution when dealing with large-scale data, resulting in low query efficiency. Especially in the process of storing hash indexes, hash collisions are inevitable, and using linked lists to alleviate conflicts will lead to frequent access to CXL memory. Therefore, it is necessary to avoid using linked list structure.

[0022] In traditional memory management methods, data address pointers occupy a large amount of memory, resulting in low utilization of CXL memory during loading. In large-scale data storage, efficient use of memory is crucial. It is necessary to design a memory management method that can accurately locate data and reduce the memory space occupied by address pointers to improve memory utilization.

[0023] Based on the above existing technical deficiencies, the present application provides a multi-node high-performance data sharing index method based on CXL memory architecture. The present application is based on CXL memory sharing of multi-server nodes, which will be divided into master server nodes and slave server nodes. The master server node is used to build a CXL data index area and a data storage area. After connecting the CXL memory device to each server node, the CXL memory device is mounted to the server node through the NUMA binding method, and the shared area is specified to realize the shared access of the CXL physical memory data of multiple nodes. After connecting to the CXL memory, the master server node builds a CXL data index area and a shared storage area, and supports multi-node data storage and query through a hash index table. When querying, the position of the data in the hash table is located through a hash function, and the query and matching are performed in the data hash index table, and finally the memory area where the data is located is located. After finding the data, the server node loads the data from the CXL memory to the local memory for use, realizing the data sharing across server nodes.

[0024] The specific process of the present application is shown in Figure 1 , including the following steps:

[0025] Step 1: CXL memory is mounted to each server node through NUMA binding, and then the shared area is specified and a one-to-one mapping between CXL memory address and node virtual memory address is established to realize the shared access of CXL physical memory data between multiple nodes.

[0026] When a piece of CXL memory is connected to the server motherboard through the PCIe slot, the CXL memory will be managed. At this time, the CXL memory device will be mounted on the server node through the NUMA binding method. After binding, the CXL memory device will be regarded as a NUMA node of the server node, and the server node can directly access the CXL memory device through the memory controller in its NUMA architecture.

[0027] Further, in order to realize that the data on the CXL physical memory can be shared among multiple server nodes, the CXL device memory is divided, and a certain memory area is designated as a shared area. After connecting the CXL memory device to the server node, a one-to-one mapping relationship between the CXL physical memory address and the server node virtual memory address of the region memory needs to be established. First, the CXL memory is mapped to the physical address space of the server node. Next, these physical addresses are directly corresponding to a fixed virtual address space of the server node. At the same time, a new set of CXL memory allocators is established for this memory space, so that the CXL memory and the local memory allocation method of the server node have differences, which is convenient for directly specifying the data access of the CXL memory. In actual use of this shared memory, the server node accesses data through its local virtual memory address, and the request is converted by the operating system into an access operation to the CXL physical memory. So that each server node can access the CXL data index area and the CXL data shared storage area on the CXL memory established in step 2.

[0028] Step 2: After connecting to the CXL memory, the host server node constructs the CXL data index area and the CXL data shared storage area, and then constructs the CXL data hash index table to provide support for multi-node data storage and query.

[0029] The CXL memory needs to be manually physically connected to the server node, so for the server that is first connected to the CXL memory device, the application establishes it as the host server node. After connecting to the CXL memory, the host server node will immediately construct the CXL data index area and the CXL data shared storage area on the CXL memory device. The CXL data index area is allocated from the low address space of the shared area; the CXL data shared storage area is opened from the high address space of the shared area, and is mainly used to store the actual data content. The length of the CXL data index area is not fixed, and it will be expanded later as the data volume increases.

[0030] Then the CXL data hash index table is built, which is composed of fixed-size arrays. Each array element occupies 64 bytes of memory space, and exists as a bucket. Each bucket contains four slots, and each slot occupies 8 bytes of memory space, and exists as a data item. When a hash collision occurs, the role of the slot is to alleviate this operation. The memory space in the slot does not store the actual content of the data, but stores the metadata information of the data. At this time, all buckets and slots in the hash table are allocated memory and initialized to empty or NULL. The size of the hash table is usually pre-set, which will be decided by the user. After the CXL data hash index table is built, all server nodes insert and store data therein. When storing data, the data is first stored in the CXL data storage area through the CXL memory allocator, and then the data metadata is inserted into the CXL data hash index table. The application adopts a similar data insertion method as the cuckoo hash table. Through this process, data storage operations can be realized, which facilitates subsequent query requests of each node.

[0031] Step 3: When a query request arrives, first use the first hash function to calculate the hash value of the element, and get the first position by taking the modulus. If the element is not found in the position, the second position will be calculated using the second hash function, and the position will be checked to see if it contains the data information of the element. Specifically:

[0032] When a query request arrives, for an element data x that needs to be found. First, use the first hash function h1 to calculate the hash value h1(x) of the element x relative to the hash function h1. If the number of bucket items of the CXL data hash index table is n, the first position p1(x) in the hash table is obtained by taking the modulus.

[0033] After calculating the position p1(x), the 64-byte bucket memory at this index position is read to the local memory of the server node DRAM, and then the four slot items stored above are checked in turn. The first metadata on each slot item is the identification field, which is the hash value f(x) of the element x obtained according to the fingerprint function f, which will be compressed into a byte, used to identify the slot corresponding to the element x. The application will calculate the identification field of the element x in advance, and match it with the four slots on the bucket. If the match is successful, it means that the element x can be located. If the element x is not found on this bucket, it means that the element x does not exist in the CXL data hash index table or is stored in another position.

[0034] To further confirm whether the element x exists, the first position information and the fingerprint function are used to calculate at this time to locate the second position p2(x). The specific process is p2(x) = (p1(x) xor h2(f(x))) mod n, wherein h2 is the second hash function. Then the second position on the table is accessed to obtain the bucket memory, and it is checked whether the slot on the storage bucket contains the data information of the element x. This involves another memory reading operation. If the element x is found at this position, step 4 is performed. If the element x is still not found on the second bucket, it can be determined that the element x does not exist in the table. At this time, the query process ends, and the result of not being found is returned.

[0035] Step 4: After locating the slot where the data is located, the data memory area is indexed.

[0036] When the slot where the requested data element is located is found, a slot includes two parts, namely an identification field and a metadata field. The identification field is a 1-byte hash value corresponding to a fingerprint function; the metadata field includes a 4-byte data address offset and a 3-byte data memory page number. The 4-byte data address offset is combined with the starting address of the CXL data shared storage area to splice a new address, so as to truly locate the memory address of the data element in the memory.

[0037] Further, in order to avoid that the data address pointer occupies too many bytes, causing the bucket item memory to occupy too much. Therefore, the CXL data shared storage area will open a continuous memory space to store data elements, and the CXL address of the data element will also be composed of the data address offset and the starting address of the CXL data shared storage area. Each data element is stored in units of pages, and the 3-byte data memory page number will prompt the memory space that needs to be loaded. Then according to the memory page number in the slot, it is judged that the memory area where the data is stored.

[0038] Step 5: The server node loads the memory area where the data is located from the CXL memory to the local memory for use, realizing the data sharing and use between the server nodes.

[0039] It should be noted that in the present specification, “including”, “containing” or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such a process, method, article or device. Without more limitations, the element defined by the statement “including one...” does not exclude the presence of another identical element in the process, method, article or device including the element.

[0040] It should be understood that although the present specification describes only one embodiment for convenience, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that those skilled in the art can understand.

Claims

1. A multi-node high-performance data sharing indexing method based on a CXL memory architecture, characterized by The method comprises the following steps: Step 1: mounting the CXL memory to each server node, specifying a shared area and establishing a one-to-one mapping between the CXL memory address and the node virtual memory address to realize shared access to the CXL physical memory data among multiple nodes; Step 2: the master server node constructs a CXL data index area and a CXL data shared storage area, and then constructs a CXL data hash index table to provide support for multi-node data storage and query; Step 3: when a query request arrives, a first hash function is used to calculate the hash value of the element, and a first position is obtained by taking the modulus; if the element is not found in the position, a second hash function is used to calculate a second position, and it is checked whether the position contains the data information of the element; Step 4: after locating the slot where the data is located, the memory area where the data is located is indexed; Step 5: the server node loads the memory area where the data is located from the CXL memory to the local memory for use, realizing data sharing and use among server nodes.

2. The multi-node high performance data sharing indexing method of claim 1, wherein: The CXL memory in step 1 is mounted to each server node through NUMA binding.

3. The multi-node high performance data sharing indexing method of claim 1, wherein: The one-to-one mapping between the CXL memory address and the node virtual memory address in step 1 is specifically: mapping the CXL memory to the physical address space of the server node; directly corresponding the physical address to a fixed virtual address space of the server node.

4. The multi-node high-performance data sharing index method according to claim 1, characterized in that: The CXL data index area in step 2 is allocated from the low address space of the shared area; and the CXL data shared storage area is opened from the high address space of the shared area.

5. The multi-node high performance data sharing indexing method of claim 1, wherein: The hash index table in step 2 is composed of fixed-size arrays, each array element occupies 64 bytes of memory space and exists as a storage bucket; each storage bucket contains four slots, and each slot occupies 8 bytes of memory space and exists as a data item.

6. The multi-node high performance data sharing indexing method of claim 1 or 5, wherein: The second position in step 3 is also related to the first position.

7. The multi-node high performance data sharing indexing method of claim 1, wherein: In step 4, the slot where the data is located includes two parts, namely an identification field and a metadata field; The identification field is a 1-byte hash value corresponding to a fingerprint function; The metadata field contains a 4-byte data address offset and a 3-byte memory page number occupied by the data; the 4-byte data address offset and the start address of the CXL data shared storage area are combined to form a new address, thereby truly locating the memory address of the data element in the memory.

8. The multi-node high performance data sharing indexing method of claim 7, wherein: The data element is stored in units of pages, and the 3-byte data memory page number will prompt the memory space that needs to be loaded; according to the memory page number in the slot, the memory area where the data is stored is determined.

Citation Information

Patent Citations

  • Systems and methods for scalable and coherent memory devices

    CN113742256A

  • Data processing method in distributed system, product, equipment and medium

    CN118466866A