Persistent memory system and device

By introducing data crash consistency guarantee, data reliability and load balancing mechanism into the persistent memory system, the performance gap problem of traditional storage architecture in data processing speed and durability is solved, efficient data management and access are achieved, and the System stability and performance.

CN118689644APending Publication Date: 2024-09-24SHANGHAI JIAOTONG UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410744103.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

There are performance gaps and differences in access patterns in traditional storage architectures in terms of data processing speed, capacity, and durability, making it difficult to meet the needs of cloud computing, big data analysis, and high-performance computing. The design of the existing persistent memory availability subsystem for software and hardware collaboration is not yet mature. .

Method used

Designed a persistent memory availability system with software and hardware collaboration, including data crash consistency guarantee mechanism, data reliability mechanism, load balancing and life extension mechanism, using low-overhead incremental checkpoint technology, WAL log and memory erasure coding Collaboration, cross-CXL device memory allocation and scheduling, lazy recycling and other technologies enable efficient management and access of persistent memory.

Benefits of technology

It achieves millisecond-level recovery capabilities for system crashes and increases persistent memory life by more than 40%, ensuring the atomicity, integrity and consistency of data, and improving system availability and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118689644A
    Figure CN118689644A
Patent Text Reader

Abstract

The invention discloses a persistent memory system, which comprises a data crash consistency guarantee mechanism module used for realizing a persistent memory check point in-situ creation and reconstruction function, an increased check point management function, a low-overhead detection and construction function, and a cross-node consistent application feature-based data mapping, rapid reconstruction and ordered reconstruction function. And the data reliability mechanism module is used for realizing a differential access control mechanism of metadata and data, a persistent management method of a persistent memory system, a low-overhead data reliability mechanism and the atomicity, integrity and consistency of PMEM data. And the load balancing and life prolonging mechanism module is used for realizing cross-CXL persistent memory dynamic allocation and scheduling, data cold and hot distribution of a heterogeneous memory system, persistent memory application memory access frequency, multi-granularity memory block fusion and segmentation, a lazy recovery mechanism and a multi-PMEM write absorption method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer systems, and in particular, relates to a persistent memory system and device. Background Art

[0002] In today's data-driven world, whether in cloud computing, big data analysis, artificial intelligence or high-performance computing, the demand for data processing speed, capacity and persistence is growing. There is a clear performance gap and access mode difference between traditional storage architectures, such as DRAM-based main memory and non-volatile storage devices such as hard disks and SSDs. To meet this challenge, a new persistent memory availability subsystem with software and hardware collaboration is needed.

[0003] Persistent Memory is a new storage technology that combines the high-speed access characteristics of traditional DRAM with the data persistence advantages of non-volatile storage (such as flash memory). At the hardware level, persistent memory is usually directly inserted into the memory slot of the server in the form of DIMM, and achieves access speeds close to DRAM through new memory media (such as 3D XPoint, ReRAM, etc.), while maintaining data without loss after power failure. At the software level, operating systems, file systems, database management systems, etc. need to be deeply optimized to fully utilize the characteristics of persistent memory and achieve efficient data management and access. At present, the design of persistent memory availability subsystems that collaborate with software and hardware is in its infancy.

[0004] The present disclosure involves the following technical terms.

[0005] DRAM: Dynamic Random Access Memory, which is the memory widely used at this stage. Its characteristic is that information is lost after power failure, and theoretically the read and write life is unlimited.

[0006] PMEM: Persistent Memory, non-volatile memory or persistent memory. STTRAM, PCM, and RRAM are all PMs. Their characteristics are that information is not lost after power failure and they are byte-addressable. However, the number of read and write times is limited, and the read and write are asymmetric. Depending on the material, the traditional PM write time is about 2 to 4 times the read time, and the PM read time is 1 to 3 times slower than DRAM.

[0007] CXL protocol: Compute Express Link, is a new open interconnect technology standard that enables high-speed and efficient interconnection between CPU and GPU, FPGA or other accelerators, thus meeting the requirements of high-performance heterogeneous computing. As an advanced interconnect technology, CXL promotes efficient collaboration between CPU and various accelerators and storage devices by providing a high-speed, low-latency and cache-consistent interface, which is of great significance to improving data center performance, optimizing AI / ML workflows, achieving large-scale memory expansion, and building a more flexible computing architecture.

[0008] PCIe: Peripheral Component Interconnect Express, is a high-speed serial computer expansion bus standard. It is a high-speed serial point-to-point dual-channel high-bandwidth transmission. The connected devices are allocated exclusive channel bandwidth and do not share bus bandwidth.

[0009] WAL: Write-Ahead Logging is a technology used in database systems to ensure the atomicity and durability of transactions. In the WAL mechanism, all data modifications must be written to the log file before being submitted. The purpose of this is to ensure that in the event of a system crash or other failure, the log file can be used to recover the data, thereby ensuring data consistency and integrity. Summary of the invention

[0010] One of the embodiments of the present disclosure is a persistent memory availability system with software and hardware collaboration, which includes a data crash consistency guarantee mechanism module, a data reliability mechanism module, and a load balancing and life extension mechanism module.

[0011] The data crash consistency guarantee mechanism module is used to implement the in-situ creation and reconstruction functions of persistent memory checkpoints, incremental checkpoint management functions, low-overhead detection and construction functions, cross-node consistent data mapping based on application characteristics, fast reconstruction and orderly reconstruction functions,

[0012] The data reliability mechanism module is used to implement the differential access control mechanism for metadata and data, the persistent management method of the persistent memory system, the low-overhead data reliability mechanism, and the atomicity, integrity and consistency of PMEM data.

[0013] The load balancing and life extension mechanism module is used to realize dynamic allocation and scheduling of persistent memory across CXL, hot and cold data distribution of heterogeneous memory systems, memory access frequency of persistent memory applications, multi-granularity memory block fusion and segmentation, lazy recycling mechanism and multiple PMEM write absorption methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0015] Figure 1 An overall framework diagram of a software-hardware collaborative persistent memory availability subsystem according to one embodiment of the present invention.

[0016] Figure 2 A framework diagram of a data crash consistency assurance mechanism according to one embodiment of the present invention.

[0017] Figure 3 A data reliability mechanism framework diagram according to one embodiment of the present invention.

[0018] Figure 4 A framework diagram of a load balancing and life extension mechanism according to one embodiment of the present invention.

[0019] Figure 5 A block diagram of an overall solution of a persistent memory availability subsystem according to one embodiment of the present invention. DETAILED DESCRIPTION

[0020] The present disclosure proposes a persistent memory availability subsystem with software and hardware collaboration to optimize the stability and performance of the persistent memory device controller. This subsystem is a subsystem relative to the entire persistent memory computing device. Its characteristics and advantages are: ① Low-overhead incremental checkpoint technology, using the persistence characteristics of PMEM, incremental checkpoint incremental backup, to ensure availability at a low cost. ② Memory allocation and scheduling across CXL devices, multi-data granularity analysis of application characteristics to achieve multi-level load balancing. ③ WAL log and memory erasure code collaborative reliability guarantee mechanism, balancing replica high availability and erasure code low overhead. ④ Multi-dimensional tail latency optimization with data access characteristics as the core, combined with the performance differences of different media to optimize data placement / prefetching strategies. Its principle is to ensure data crash consistency based on the checkpoint data crash consistency guarantee mechanism; low-overhead data reliability mechanism to ensure the atomicity, integrity, and consistency of persistent data; cross-CXL area responsibility balancing and life extension mechanism together form a persistent memory availability subsystem.

[0021] According to one or more embodiments, a persistent memory availability subsystem with software and hardware collaboration including three modules. Specifically including a data crash consistency guarantee mechanism module, a data reliability mechanism module and a load balancing and life extension mechanism. Specifically, it studies the data crash consistency guarantee mechanism based on checkpoints, designs a low-opening data reliability mechanism, and ensures the atomicity, integrity and consistency of persistent data. Load balancing and life extension mechanism across CXL regions. It can ensure the crash consistency of the secure persistent memory system, achieve millisecond-level response to system crashes and increase the persistent memory life by more than 40%, such as Figure 1 shown.

[0022] The data crash consistency guarantee mechanism module includes persistent memory checkpoint in-situ creation and reconstruction technology, incremental checkpoint management technology, low-overhead detection construction technology, cross-node consistency, data mapping mechanism based on application characteristics, and fast reconstruction and orderly reconstruction, such as Figure 2 shown.

[0023] The data reliability mechanism module includes a differential access control mechanism for metadata and data, a persistent management method for a persistent memory system, a low-overhead data reliability mechanism, the atomicity of PMEM data, the integrity of PMEM data, and the consistency of PMEM data, such as Figure 3 shown.

[0024] The load balancing and life extension mechanism includes dynamic allocation and scheduling of persistent memory across CXL, data hot and cold distribution characteristics of heterogeneous memory systems, research on memory access frequency of persistent memory applications, multi-granular memory block fusion and segmentation, lazy recycling mechanism and multiple PMEM write absorption methods, such as Figure 4 Show.

[0025] In the data crash consistency guarantee mechanism module:

[0026] Relying on low-overhead incremental checkpoint technology, taking advantage of the persistence characteristics of PMEM, incremental checkpoints and incremental backups ensure availability at a low cost. The core idea is that when generating a checkpoint, only the data that has changed since the last checkpoint is recorded, rather than a complete snapshot of the entire memory state. This approach can significantly reduce the required storage space and I / O operations, thereby reducing the overhead of checkpoints.

[0027] Incremental checkpoints record the location of persisted data: Incremental checkpoints only record the new location or log sequence number (LSN) of all modified data since the last checkpoint, rather than writing all dirty data at once. In this way, the system only needs to track and record the parts that have changed since the last checkpoint, avoiding a large number of unnecessary I / O operations. Maintain dirty page queue: The system maintains a dirty page queue dirty_page_queue, which contains pages that have been modified since the last checkpoint but have not yet been written to stable storage. When performing incremental checkpoints, only the data of the pages in the dirty_page_queue and their corresponding LSNs need to be written to persistent storage. Rolling update: Incremental checkpoints can be updated in a rolling manner, that is, the newly generated dirty pages are continuously and gradually written to PMEM or other persistent storage, rather than waiting until the checkpoint is triggered to write a large amount of data at once. After a system crash, it can be recovered through a checkpoint to ensure data crash consistency.

[0028] In the data reliability mechanism module:

[0029] The reliability guarantee mechanism of WAL log and memory erasure code is used to balance the high availability of replicas and the low overhead of erasure code. WAL requires that any modification to data be recorded in a corresponding log entry in the log file before being written to the actual data storage (such as persistent memory). In this way, even if a failure occurs during the data writing process, since the log has recorded the complete transaction operation, the system can roll back unfinished transactions or redo completed but not yet persisted transactions according to the log when recovering, ensuring the atomicity of the transaction. Since the log files of WAL are stored on PMEM and the log entries are ensured to be persisted to PMEM before the transaction is committed, the submitted transaction information will not be lost even if a power failure or system crash occurs. When the system is restored, the correct state of the data can be rebuilt based on these logs to ensure the persistence of the data.

[0030] WAL can support multiple isolation levels by recording the start and end marks of each transaction and all intermediate operations, preventing cross-interference between transactions and ensuring data consistency. When the system restarts after a crash, by scanning and replaying the WAL log, all submitted transaction operations can be re-executed in the order in which the transactions were submitted, and the data in the persistent memory can be restored to the latest consistent state before the crash, avoiding data inconsistency problems. In large-scale distributed systems, WAL logs can be divided into multiple shards and distributed on different PMEM nodes, and the consistency and availability of the logs can be ensured through consensus algorithms such as Raft and Paxos.

[0031] In the load balancing and life extension mechanism:

[0032] Dynamic allocation and scheduling of persistent memory across CXL requires building a global resource view, achieving efficient distributed resource management, formulating allocation strategies that adapt to different scenarios, supporting data migration and caching, ensuring fault detection and recovery, and providing easy-to-use APIs and programming models to fully utilize the large-scale, high-performance, and uniformly accessible persistent memory resources brought by CXL interconnection technology to serve various application scenarios that require large-scale memory and data-intensive processing. Build a global persistent memory resource pool across nodes, including the total capacity, current usage, and performance characteristics of the persistent memory modules connected to CXL on each node. Implement resource discovery and registration mechanisms to ensure that new or removed persistent memory resources can be reflected in the global view in a timely manner. Support multiple allocation strategies, such as on-demand allocation, pre-allocation, and priority allocation, and dynamically adjust according to the QoS (Quality of Service) requirements of the application, SLA (Service Level Agreement) constraints, and the overall system load. Considering the problem of memory fragmentation across nodes, appropriate memory allocation algorithms such as Buddy System, Slab Allocator, and Region-basedAllocator are used to reduce fragmentation and improve resource utilization. Supports cross-node memory sharing mechanisms, such as remote direct memory access (RDMA) through CXL's memory consistency protocol, so that processes on multiple nodes can transparently share the same persistent memory area, reducing data duplication and improving efficiency.

[0033] The lazy recycling mechanism aims to reduce the impact of recycling operations on system performance through delayed marking, incremental recycling, version management, adaptive adjustment and other means, while ensuring data correctness and system stability. Unlike eager garbage collection, lazy recycling is not in a hurry to immediately identify and mark memory areas that are no longer used. Instead, it allows abandoned objects to remain in memory for a period of time until other memory operations (such as writing, allocating new objects, etc.) trigger a check on the corresponding memory area, and then mark them. The memory area marked as recyclable is not recycled immediately, but is put into a list to be recycled, and is recycled at an appropriate time by a background thread or a periodic task without affecting the performance of the main thread. The lazy recycling mechanism only recycles abandoned memory areas that are about to be overwritten by new objects or about to trigger memory allocation failures, avoiding unnecessary recycling of memory areas that still have enough space for the system to use. Recycling operations are usually performed only on a small part of the memory area, rather than a global scan, thereby reducing the impact of the recycling process on the overall performance of the system. Insert a piece of code before the memory write operation to ensure that the reference relationship related to the old data has been correctly processed (such as updating pointers, clearing marks, etc.) before writing new data to maintain the correctness of the data. Maintain object version information and distinguish between new and old data so that the old version of the data can be safely ignored during the recycling process to avoid unnecessary locking and synchronization operations. Set the memory usage threshold mem_threshold that triggers the recycling operation, such as starting recycling when the memory usage reaches a certain ratio. mem_threshold can be dynamically adjusted according to conditions such as system load and memory pressure.

[0034] The disclosed embodiments use low-overhead incremental checkpoint technology, take advantage of the persistence characteristics of PMEM, and perform incremental checkpoints and incremental backups to ensure availability at a low cost. Memory allocation and scheduling across CXL devices, and application feature analysis at multiple data granularities to achieve multi-level load balancing. The reliability guarantee mechanism of WAL log and memory erasure code collaboration balances the high availability of replicas and the low overhead of erasure codes. The overall technical solution and ideas are as follows: Figure 5 shown.

[0035] According to one or more embodiments, it is assumed that the persistent memory device is running in a hybrid memory system, and the current system crashes and needs to be rebuilt. The following specifically describes the working steps as follows:

[0036] Step 1: Determine where the checkpoint data is stored, which is in a specific area of ​​persistent memory itself, namely the specific checkpoint storage area of ​​PMEM.

[0037] Step 2: Verify the integrity of the checkpoint data. The memory controller verifies the checksum and redundant coding or other data integrity protection mechanisms to ensure that the data has not been tampered with or damaged.

[0038] Step 3: Load the checkpoint data from persistent memory into main memory. Since PMEM is directly accessed by the application as part of the memory address space, the loading process may be more efficient than reading from a traditional disk.

[0039] Step 4: Parse the checkpoint data structure and convert it into a form that the application or system can understand. The checkpoint data contains key parts of the system state, such as process context, memory map, file system state, database transaction log position, etc.

[0040] Step 5: Reinitialize or update the relevant data structures in the memory according to the checkpoint data, including the status of the recovery process stack, global variables, cache, etc.

[0041] Step 6: If the checkpoint contains a snapshot at the memory page level, the memory map table (MMT) is needed to determine which pages should be loaded from persistent memory to DRAM and which pages can be used directly.

[0042] Step 7: After the reconstruction is complete, perform consistency verification, including data integrity check and transaction consistency check.

[0043] Step 8: Adjust system parameters, re-establish network connections, synchronize with other nodes, etc. to fully restore the system to normal operation.

[0044] According to one or more embodiments, it is assumed that the persistent memory device runs in a hybrid memory system, and the current system needs to perform lazy collection. The steps are described in detail below:

[0045] Step 1: When an application requests memory allocation, the memory management system first checks the free_memory_list to find a free_block of the appropriate size to satisfy the request.

[0046] Step 2: Assuming a large enough free_block is found, allocate it to the application and update the corresponding memory management data structures allocated_list and free_memory_list.

[0047] Step 3: The application writes and reads the allocated memory to complete the tasks within its life cycle. Step 4: When the object is no longer referenced by the application, it becomes a potential recyclable object, but the recycling operation is not triggered immediately. The state of the object may be marked as garbage, but the memory space it occupies is still retained.

[0048] Step 5: When a subsequent write operation touches the memory area where the abandoned object is located, a check of the area is triggered. Through the Write Barrier technology, a piece of code is inserted before writing to ensure that the reference relationship related to the old data has been correctly processed before writing the new data.

[0049] Step 6: The memory area marked as reclaimable is not reclaimed immediately, but is put into a garbage_list.

[0050] Step 7: The background recycling thread or scheduled task regularly checks garbage_list and recycles the memory areas therein, including releasing internal and external references to objects, freeing memory blocks and returning them to free_memory_list.

[0051] The Chinese meanings of the English words involved in the embodiments of the present disclosure are as follows.

[0052] memory map

[0053] free_memory_list free memory list

[0054] free_block available blocks

[0055] allocated_list Allocated list

[0056] garbageMemory garbage

[0057] Write Barrier

[0058] garbage_list memory garbage list

[0059] It should be understood that in the embodiments of the present invention, the term "and / or" is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0060] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A persistent memory system, characterized in that: The system includes a data crash consistency guarantee mechanism module, a data reliability mechanism module, and a load balancing and life extension mechanism module. The data crash consistency guarantee mechanism module is used to implement the in-situ creation and reconstruction functions of persistent memory checkpoints, incremental checkpoint management functions, low-overhead detection and construction functions, cross-node consistent data mapping based on application characteristics, fast reconstruction and orderly reconstruction functions, The data reliability mechanism module is used to implement the differential access control mechanism for metadata and data, the persistent management method of the persistent memory system, the low-overhead data reliability mechanism, and the atomicity, integrity and consistency of PMEM data. The load balancing and life extension mechanism module is used to realize dynamic allocation and scheduling of persistent memory across CXL, hot and cold data distribution of heterogeneous memory systems, memory access frequency of persistent memory applications, multi-granularity memory block fusion and segmentation, lazy recycling mechanism and multiple PMEM write absorption methods.

2. The persistent memory system according to claim 1, characterized in that: The data crash consistency guarantee mechanism module is based on low-overhead incremental checkpoints, utilizes the persistence characteristics of PMEM, and incremental checkpoints and incremental backups to ensure availability at a low cost.

3. The persistent memory system according to claim 2, characterized in that: When a checkpoint is generated, only the data that has changed since the last checkpoint is recorded.

4. The persistent memory system according to claim 1, wherein: The data reliability mechanism module uses a reliability guarantee mechanism that combines WAL logs with memory erasure codes to balance high availability of replicas and low overhead of erasure codes.

5. The persistent memory system according to claim 4, characterized in that: The WAL log can support multiple isolation levels by recording the start and end marks of each transaction and all intermediate operations, preventing cross-interference between transactions to ensure data consistency.

6. The persistent memory system according to claim 1, characterized in that: The load balancing and life extension mechanism module builds a global resource view when dynamically allocating and scheduling persistent memory across CXL, formulates allocation strategies that adapt to different scenarios, supports data migration and caching, ensures fault detection and recovery, and provides APIs and programming models.

7. The persistent memory system according to claim 6, characterized in that: Build a global resource view and a global persistent memory resource pool across nodes, including the total capacity, current usage, and performance characteristics of the persistent memory modules connected to CXL on each node.

8. The persistent memory system according to claim 6, characterized in that: The load balancing and life extension mechanism module, and its lazy recycling mechanism, reduce the impact of recycling operations on system performance through delayed marking, incremental recycling, version management, and adaptive adjustment means.

9. A persistent memory device, characterized in that: The device includes a data crash consistency guarantee mechanism module, a data reliability mechanism module, and a load balancing and life extension mechanism module. The data crash consistency guarantee mechanism module is used to implement the in-situ creation and reconstruction functions of persistent memory checkpoints, incremental checkpoint management functions, low-overhead detection and construction functions, cross-node consistent data mapping based on application characteristics, fast reconstruction and orderly reconstruction functions, The data reliability mechanism module is used to implement the differential access control mechanism for metadata and data, the persistent management method of the persistent memory system, the low-overhead data reliability mechanism, and the atomicity, integrity and consistency of PMEM data. The load balancing and life extension mechanism module is used to realize dynamic allocation and scheduling of persistent memory across CXL, hot and cold data distribution of heterogeneous memory systems, memory access frequency of persistent memory applications, multi-granularity memory block fusion and segmentation, lazy recycling mechanism and multiple PMEM write absorption methods.

Citation Information

Cited By

  • Resource management method and device based on combination of Slab distributor and Buddy system

    CN121092467A

  • Memory allocation system and method based on execution flow awareness and hardware topology and medium

    CN122777322A