Two-stage data pool data loading method based on CXL memory architecture

By adopting latency caching strategies and adaptive caching algorithms in the CXL memory architecture, cold data is stored in CXL memory and cached to DRAM when data is frequently used, the collaboration of CXL memory and DRAM memory and hot and cold data management are solved. Problem, efficient data access and system performance improvement have been achieved.

CN119473952AInactive Publication Date: 2025-02-18ZHEJIANG UNIV +1

Patent Information

Application Number
CN202411447447.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-02-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively collaborate with CXL memory and server DRAM memory, and cannot dynamically identify and manage hot and cold data. Traditional cache algorithms are difficult to cope with dynamically changing data access patterns.

Method used

Using a multi-node high-performance data sharing indexing method based on CXL memory architecture, cold data is stored in CXL memory through delay caching strategy and adaptive caching algorithm, and cached it to the server DRAM when the data is frequently used. At the same time, a history list and decision-making regret strategy are introduced, and the use weight of the cache strategy is dynamically adjusted.

Benefits of technology

It realizes that CXL memory and DRAM memory are fully collaborated on the premise of ensuring performance, improving data access speed and system performance. Through adaptive caching algorithms and delayed caching strategies, the system can effectively identify and manage hot and cold data, which improves the system's reasonable flow and efficient utilization of different data states.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119473952A_ABST
    Figure CN119473952A_ABST
Patent Text Reader

Abstract

The invention discloses a two-stage data pool data loading method based on a CXL memory architecture. According to the method, a CXL memory serves as a cold data pool to store data with low use frequency, and a DRAM memory of a server node serves as a hot data pool to store data with high use frequency. When data in a CXL memory is used for many times, the data monitor judges whether the data can be transferred into hot data or not through a delay caching strategy and caches the hot data. In addition, a self-adaptive caching strategy is adopted to keep the hot data in a server for a certain time through a hot data pool, so that the application performance is improved. And dynamically learning a caching strategy by the hot data pool. And when the hot data is added or expelled every time, a caching strategy is selected according to the weight of the LRU-S, the weight of the LFU-S and the weight of the FIFO expert. And meanwhile, the hot data pool comprises a historical list, the decision regret expelling behavior of the cache strategy is allowed, and wrong decisions are punished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a two-level data pool data loading method based on a CXL memory architecture. Background Art

[0002] The two-level data pool solution divides the memory into different levels to achieve more efficient memory management. Usually, the first-level memory pool is managed using a cache algorithm to accelerate data access and reduce access latency by storing copies of frequently accessed data. The cache can be implemented through a variety of strategies and algorithms, such as common replacement algorithms including LRU (least recently used), LFU (least frequently used) and FIFO (first in, first out).

[0003] CXL (Compute Express Link) is an emerging memory interconnect technology designed to provide higher bandwidth and lower latency memory access capabilities. The two-level memory pool solution based on CXL usually includes two main parts: high-performance but limited capacity server DRAM, which is used to store hot data; and large-capacity but low-performance CXL memory, which is used to store cold data. The advantage of this architecture is that it can balance performance and cost, and dynamically adjust the location of data through a multi-level adaptive cache algorithm, so that the system can fully utilize the large-capacity CXL memory while maintaining high performance. However, CXL memory is limited by the PCIe bus and has a large difference in memory throughput compared to DRAM.

[0004] At present, similar implementation solutions mainly include Intel's Optane persistent memory, which uses persistent memory technology, and CXL, which achieves faster data transmission and access through efficient memory interconnection. In addition, some high-performance computing systems also adopt multi-level memory management strategies, such as Apache Hadoop's HDFS, which is a distributed file system widely used in big data processing. HDFS uses hierarchical storage of memory and disk to optimize data access performance. The memory cache of HDFS can speed up the reading of frequently accessed data, while infrequently accessed data is stored on disk. The cache strategy of HDFS also includes some intelligent scheduling algorithms, such as strategies based on access frequency and data importance, to dynamically manage data migration between memory and disk.

[0005] In addition, there are some solutions in the industry that focus on memory tiering and caching, such as Intel's DAOS and IBM's GPFS. These solutions all adopt similar multi-level storage pools and caching strategies to optimize system performance and resource utilization by dynamically adjusting the location of data between storage media at different levels. However, unlike the present invention, most of these solutions rely on traditional storage media (such as SSDs and HDDs), while the present invention utilizes CXL memory, an emerging hardware technology, and achieves more efficient data access and management through an adaptive caching algorithm. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention provides a multi-node high-performance data sharing indexing method based on the CXL memory architecture.

[0007] The present invention comprises the following steps: Step 1: The application reads memory data from the cold data pool to the server and uses it; the data monitor starts the delay cache strategy and records the data information in the delay list; Step 2: The requested data meets the hot data requirement and is marked as hot data. The data monitor caches the data in the main cache of the hot data pool and selects a cache strategy for the requested data. Step 3: When there is no remaining cache space in the main cache area of ​​the hot data pool, the data will be evicted and put into the history list. At this time, the data will be marked as pre-eviction data, and the cache policy will be allowed to regret the eviction behavior. Step 4: When the data in the history list is requested again, the decision regret operation is performed and the expert weight of the cache strategy is adaptively updated; Step 5: When there is no remaining cache space in the cache area of ​​the history list, the pre-eviction data stored there will be gradually evicted, and at this time the data is actually evicted from the hot data pool.

[0008] Compared with the prior art, the present invention has the following beneficial effects: In order to solve the problem of how to fully cooperate CXL memory and server DRAM memory, the present invention stores all cold data in CXL memory for preservation, which can fully utilize the high capacity advantage of CXL memory and ensure long-term reliable preservation of data. When data is frequently used, the present invention will cache it in server DRAM memory to utilize the high speed advantage of DRAM to accelerate data access speed, thereby improving overall system performance.

[0009] In view of the problem that traditional cache algorithms are difficult to cope with dynamically changing data access patterns, the present invention adopts three different types of cache algorithms and can adaptively adjust the usage weight of each cache strategy according to application requests. In this way, the most suitable cache algorithm can be automatically selected and updated for different data access scenarios, ensuring that the system can maintain optimal performance under various complex access patterns.

[0010] In order to solve the problem that hot and cold data cannot be dynamically identified, the present invention introduces a delayed cache and decision regret strategy. For the accessed cold data, the present invention will not immediately convert it into hot data, but manage it through a delayed list. Only when the data reaches a sufficient access frequency will it be marked as hot data. At the same time, for the expelled hot data, the present invention allows decision regret operations to be performed so that it will not be immediately downgraded to cold data, thereby avoiding misjudgment and frequent data state switching. This strategy effectively improves the system's ability to identify and manage hot and cold data, ensuring the reasonable flow and efficient use of data in different states. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical scheme and advantages of the present invention clearer, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings. Examples of these preferred embodiments are illustrated in the accompanying drawings. The embodiments of the present invention shown in the accompanying drawings and described according to the accompanying drawings are merely exemplary, and the present invention is not limited to these embodiments.

[0013] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0014] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.

[0015] With the explosive growth of data volume, it has become impractical to rely solely on server DRAM to store all data. Although DRAM is fast, it is expensive and has limited capacity. CXL memory has a larger capacity but is slightly slower. This makes the two complementary. However, how to fully cooperate CXL memory and DRAM memory while ensuring performance has become a challenge.

[0016] CXL memory has low throughput, performs poorly in multi-threaded and high-concurrency states, and has high latency when accessing data entirely through CXL memory. Dividing data into hot data and cold data and storing them on different memory media requires an efficient cache mechanism to reduce latency when accessing cold data. Traditional cache algorithms may not be able to fully adapt to dynamically changing data access patterns, so an adaptive cache algorithm is needed to provide optimal performance in different access scenarios.

[0017] In different application scenarios, the access pattern of data may change significantly. How to intelligently identify and manage hot and cold data and dynamically adjust their location between DRAM and CXL memory according to actual conditions is a complex technical problem. An intelligent, multi-level adaptive cache management system is required to monitor and adjust the location of data in real time to ensure that the system is always in the best state.

[0018] Based on the above-mentioned deficiencies in the prior art, the present invention provides a two-level storage pool optimization solution based on the CXL memory architecture. The present invention uses the CXL memory as a cold data pool to store data with low usage frequency, and the DRAM memory of the server node as a hot data pool to store data with high usage frequency. When the data on a CXL memory is used multiple times, the data monitor will determine whether it can be transferred to hot data and cache it through a delayed cache strategy. The present invention also adopts an adaptive cache strategy to retain hot data on the server for a certain period of time through the hot data pool to improve application performance. The hot data pool dynamically learns the cache strategy. Each time hot data is added or expelled, the cache strategy will be selected based on the LRU-S, LFU-S and FIFO expert weights. At the same time, the hot data pool contains a history list, which allows the cache strategy to regret the expulsion decision and punish wrong decisions.

[0019] The specific process of the present invention is as follows Figure 1 As shown, the following steps are included: Step 1: The application reads the memory data from the cold data pool to the server and uses it. The data monitor starts the delayed cache strategy and records the data information in the delayed list. Specifically: After the application sends a data request, the data monitor will first check whether the hot data pool has cached the relevant data. The hot data pool maintains a hot data hash table to record all the data cached in the hot data pool. If the corresponding data information is not found in the hot data hash table, it means that the data currently only exists in the cold data pool. At this time, the application will go to the CXL cold data pool to load the required memory data into the server memory and use it.

[0020] Subsequently, the data monitor will implement a delayed caching strategy for the memory data. When a piece of data is loaded from the cold data pool of CXL to the server, it will not be immediately identified as hot data, but will be observed to implement delayed caching. The delayed cache determines when a request data can become hot data by the usage frequency of the request data in the delay list. At this time, the data monitor will store the metadata information of the request data in the delay list, which becomes preheated data.

[0021] Furthermore, the metadata mainly includes the name of the requested data, the starting address of the requested data in the CXL memory, the memory size of the requested data, etc. At the same time, the usage frequency of the data will continue to be recorded in subsequent requests.

[0022] Furthermore, the specific content of the data will not be cached in the hot data pool, but will be directly garbage collected when the application does not need it. When the number of times this state is used reaches the hot data usage frequency threshold, it will become hot data. The delay list is a FIFO queue. When the delay list is full of delayed data, the data that entered the delay list first will be deleted. Therefore, if the data information is stored in the delay list during its life cycle, if it does not successfully become hot data, it will be expelled from the list. The next time the data is requested, its usage frequency will be re-recorded.

[0023] Step 2: The requested data meets the hot data requirement and is marked as hot data. The data monitor caches it in the main cache area of ​​the hot data pool and selects a cache strategy for the requested data. Specifically: When the requested data reaches the hot data usage frequency threshold requirement, the data monitor marks the data as hot data. At this time, all its metadata will be removed from the delay list, and the data monitor will formally cache the requested data in the main cache area of ​​the hot data pool on the server side, and record the cache item in the hot data hash table. The application can subsequently access the data directly through the hot data hash table index, without having to go to the cold data pool in the CXL memory to load the data.

[0024] Subsequently, the data monitor will select a cache strategy for the data. The cache strategy of the hot data pool is an adaptive multi-cache strategy, which consists of an LRU-S cache strategy, an LFU-S cache strategy, and a FIFO cache strategy.

[0025] Assuming the requested data is k, LRU-S and LFU-S add data memory usage to the original LRU and LFU cache strategies. factor indicators.

[0026] Furthermore, LRU uses the last time the data was used. To make cache decisions, LRU-S is used Make cache decisions. LFU uses the cached usage frequency Make decisions, while LFU-S adopts Make decisions.

[0027] When the cache memory of data is too large, even if it is used more frequently than recently, it will still occupy the living space of small data, thereby reducing the overall data hit rate. In this way, decisions can be made fairly for each piece of memory.

[0028] Furthermore, each cache strategy has an expert weight value, denoted as W LRU-S , W LFU-S , W FIFO The weight value will be automatically adjusted in step 4 as the request changes; where W LRU-S , W LFU-S and W FIFO The sum of is 1. The data monitor will randomly select a cache strategy for the cached data according to the weight ratio of each cache strategy for subsequent data cache eviction decisions.

[0029] Step 3: When there is no remaining cache space in the main cache area of ​​the hot data pool, the data will be evicted and put into the history list. At this time, the data will be marked as pre-eviction data, and the cache strategy will be allowed to regret this eviction behavior. Specifically: When the data monitor caches new data, there is no remaining cache space in the main cache of the hot data pool. At this time, the data monitor will randomly select a cache strategy according to the expert weight ratio of the three cache decisions, and evict a data by this cache strategy. At this time, the data will become pre-eviction data, removed from the main cache, and moved to the history list.

[0030] The present invention allows the cache decision to have a behavior of regretting the eviction decision, so at this time the pre-eviction data is not actually evicted from the hot data pool, but the cache content of the data is transferred from the main cache area to the history list.

[0031] Furthermore, in order to avoid the history list maintaining an additional hash index to record the pre-eviction data and its memory space, the hot data hash table still stores the data information. In the history list, the cache content of the pre-eviction data will be saved, and the cache decision type that evicts it will be recorded.

[0032] Step 4: When the data in the history list is requested again, the decision regret operation is performed and the expert weight of the cache strategy is adaptively updated. Specifically: When the data is in the life cycle of the history list, the application requests the data again. It will still follow the normal process and first retrieve it from the hot data hash table of the hot data pool. At this time, the data can be directly indexed. Subsequently, the data monitor finds that the data belongs to pre-eviction data. The data will be removed from the history list and put back into the main cache. At the same time, the cache decision realizes that the previous eviction decision was a wrong decision and will adaptively update the expert weight.

[0033] The adaptive update of the expert weight of the cache decision in this application is a regret minimization online learning problem. At this time, the data monitor will query the cache strategy for the data to be expelled, and the expert weight of the cache strategy will be penalized.

[0034] Assume that the eviction decision for this data is the cache policy The corresponding expert weight is , the updated expert weight after penalty is: , is the learning rate, is the loss rate. After the penalty is over, the three expert weights need to be normalized to facilitate the data monitor's cache decision selection for new data. In the process of continuous iterative update of the weights, the cache strategy will gradually learn the best data eviction solution.

[0035] Step 5: When there is no remaining cache space in the cache area of ​​the history list, the pre-eviction data stored there will be gradually evicted, and at this time the data is actually evicted from the hot data pool. Specifically: The history list is a FIFO queue. Pre-eviction data enters the queue at the end and exits the queue at the head. When there is no remaining cache space in the cache area of ​​the history list, the data monitor will remove the first pre-eviction data from the head of the history list, remove the information of the data in the hot data hash table, and finally release space in the cache memory area of ​​the hot data pool. At this time, the data is actually removed from the hot data pool and becomes cold data.

[0036] It should be noted that, in this specification, "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0037] It should be understood that although this specification is described according to implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. A two-level data pool data loading method based on CXL memory architecture, characterized in that The method comprises the following steps: Step 1: The application reads memory data from the cold data pool to the server and uses it; the data monitor starts the delay cache strategy and records the data information in the delay list; Step 2: The requested data meets the hot data requirement and is marked as hot data. The data monitor caches the data in the main cache of the hot data pool and selects a cache strategy for the requested data. Step 3: When there is no remaining cache space in the main cache area of ​​the hot data pool, the data will be evicted and put into the history list. At this time, the data will be marked as pre-eviction data, and the cache policy will be allowed to regret the eviction behavior. Step 4: When the data in the history list is requested again, the decision regret operation is performed and the expert weight of the cache strategy is adaptively updated; Step 5: When there is no remaining cache space in the cache area of ​​the history list, the pre-eviction data stored there will be gradually evicted, and at this time the data is actually evicted from the hot data pool.

2. The two-level data pool data loading method according to claim 1 is characterized in that: Before step 1, the data monitor first checks whether the hot data pool has relevant data; the hot data pool maintains a hot data hash table for recording all data cached in the hot data pool; if the corresponding data information is not found in the hot data hash table, the application goes to the CXL cold data pool to load the required memory data into the server memory and use it.

3. The two-level data pool data loading method according to claim 2 is characterized in that: When data is loaded from the CXL cold data pool to the server, a delayed caching strategy is executed; the delayed caching strategy determines whether the requested data becomes hot data at a certain point in time by using the usage frequency of the requested data in the delayed list.

4. The two-level data pool data loading method according to claim 1 is characterized in that: The cache strategy described in step 2 is an adaptive multi-cache strategy, which consists of an LRU-S cache strategy, an LFU-S cache strategy and a FIFO cache strategy; the LRU-S cache strategy and the LFU-S cache strategy are based on the original LRU and LFU cache strategies, and add a factor indicator of data memory usage.

5. The two-level data pool data loading method according to claim 4 is characterized in that: The LRU-S cache strategy, LFU-S cache strategy and FIFO cache strategy have their own expert weight values, and the weight values ​​will be automatically adjusted in step 4 as the request changes.

6. The two-level data pool data loading method according to claim 1 is characterized in that: In step 3, in order to avoid the history list maintaining an additional hash index to record the pre-eviction data and its memory space, the hot data hash table still stores the data information; in the history list, the cache content of the pre-eviction data will be saved, and the cache decision type that evicts it will be recorded.

7. The two-level data pool data loading method according to claim 1 is characterized in that: The adaptive update of the expert weights of the caching decision in step 4 is an online learning problem of regret minimization. At this time, the data monitor will query the caching strategy to evict the data, and the expert weight of the caching strategy will be penalized.

Citation Information

Patent Citations

  • Content caching method and device based on video content characteristics

    CN111491175A

  • Cache page elimination method and device, equipment and medium

    CN113391766A

  • Cache data processing method, deep learning training method and system

    CN117215973A

  • Read cache hotspot recognition elimination method and device, equipment and storage medium

    CN117851294A

  • Memory hotspot elimination method and device based on memory pooling technology

    CN118550846A

Cited By

  • Data processing method, system and equipment based on edge computing and medium

    CN121808344A

  • An edge computing-based data processing method, system, device and medium

    CN121808344B