A hierarchical cache system, method and server

CN117785034BActive Publication Date: 2026-09-22JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311685339.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-07
Publication Date
2026-09-22
Estimated Expiration
2043-12-07

AI Technical Summary

Technical Problem

[0005]本申请提供一种分级缓存系统、方法及服务器,以解决现有技术降低了存储系统的吞吐性能等缺陷

Benefits of technology

[0042]本申请提供一种分级缓存系统、方法及服务器,该系统包括:第一缓存器和第二缓存器;所述第一缓存器用于缓存当前已存储至预设硬盘的热点数据,并按照预设淘汰标准,在已缓存的热点数据中筛选一般数据,将所述一般数据淘汰至所述第二缓存器;所述第二缓存器用于缓存所述第一缓存器淘汰的一般数据;所述第一缓存器还用于接收用户发送的数据读请求,以确定用户的待读数据,当所述热点数据不包括所述待读数据时,从所述第二缓存器读取所述待读数据,其中,第一缓存器采用内存缓存器,第二缓存器采用NVMe缓存器,第一缓存器为系统一级缓存,第二缓存器为系统二级缓存。上述方案提供的系统,通过采用第一缓存器和第二缓存器实现热点数据的分级管理,使用户发送的I/O请求大概率命中缓存器,减少预设硬盘的I/O次数,提高了存储系统的吞吐性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117785034B_ABST
    Figure CN117785034B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and discloses a hierarchical cache system, a hierarchical cache method and a server, the system comprising: a first cache and a second cache; the first cache is used for caching hot data which has been stored to a preset hard disk, and according to a preset elimination standard, general data is screened from the cached hot data, and the general data is eliminated to the second cache; the second cache is used for caching the general data eliminated by the first cache; the first cache is also used for receiving a data reading request sent by a user, determining to-be-read data of the user, and reading the to-be-read data from the second cache when the hot data does not include the to-be-read data. Through the hierarchical management of the first cache and the second cache, the I / O request sent by the user can be hit in the cache with a high probability, the I / O times of the preset hard disk are reduced, and the throughput performance of the storage system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a hierarchical caching system, method and server. Background Technology

[0002] With the development of solid-state storage technology, solid-state storage devices such as NVMe and SSD have been widely used. However, due to the limited cost of the devices, solid-state storage devices can only exist in storage systems as small-capacity high-speed cache devices.

[0003] In existing technologies, flash servers are typically composed of solid-state storage devices and large-capacity low-speed storage devices. Generally, high-speed storage devices are used to create a high-speed cache pool, and low-speed storage devices are used to create a slow pool. Different object storage device (OSD) processes are used to manage the cache disk and the low-speed disk respectively.

[0004] However, dual storage pools require dual-pool binding, and the I / O path becomes longer due to proxy forwarding, which reduces the throughput performance of the storage system. Summary of the Invention

[0005] This application provides a hierarchical caching system, method, and server to address the shortcomings of existing technologies, such as reduced throughput performance of storage systems.

[0006] The first aspect of this application provides a hierarchical caching system, including: a first cache and a second cache;

[0007] The first cache is used to cache hot data that has been stored on a preset hard disk, and to filter general data from the cached hot data according to a preset elimination standard, and eliminate the general data to the second cache.

[0008] The second buffer is used to cache general data that has been evicted from the first buffer;

[0009] The first buffer is also used to receive data read requests sent by users to determine the user's data to be read. When the hot data does not include the data to be read, the data to be read is read from the second buffer.

[0010] The first cache is a memory cache, the second cache is an NVMe cache, the first cache is a system level 1 cache, and the second cache is a system level 2 cache.

[0011] In an optional implementation, the first buffer is further configured to:

[0012] When the hot data includes some data to be read, extract the target data fragment from the hot data;

[0013] Read the remaining data segments from the second buffer and / or the preset hard disk;

[0014] The target data segment and the remaining data segments are assembled to obtain the data to be read, and the data to be read is then fed back to the user.

[0015] In one alternative implementation, the first buffer is used for:

[0016] Retrieve data write requests sent by the user;

[0017] According to the data write request, the data to be written is stored in the preset hard disk;

[0018] If the data to be written is determined to be hot data, then after storing the data to be written to the preset hard disk, the data to be written is cached as hot data.

[0019] In an optional implementation, the first buffer is further configured to:

[0020] Based on the attribute characteristics of the data to be written, determine whether the data to be written is hot data.

[0021] In one alternative implementation, the second buffer is used for:

[0022] Monitor the water level of the second buffer;

[0023] The data caching strategy is determined based on the second buffer level.

[0024] In one alternative implementation, the second buffer is used for:

[0025] When the water level of the second buffer exceeds the preset upper limit, only the general data that has been evicted from the first buffer is cached.

[0026] When the water level of the second buffer is lower than the preset upper limit but higher than the preset lower limit, the general data and the first target data corresponding to the target data request that were evicted by the first buffer are cached.

[0027] When the water level of the second buffer is lower than the preset water level limit, the general data that the first buffer has evicted and the second target data corresponding to all the data requests are cached.

[0028] The target data request includes a target data read request and a target data write request. The target data read request is a data read request with a read data volume less than a preset threshold. The target data write request is a data write request with a write data volume less than a preset threshold. The first target data includes first target read data and first target write data. The second target data includes second target read data and second target write data. Neither the first target data nor the second target data includes hot data already cached in the first cache.

[0029] In one alternative implementation, the first buffer is used for:

[0030] When the access frequency of any of the hot data in the first cache reaches the preset elimination standard, the hot data is determined to be general data.

[0031] While caching the general data in the second cache, the general data is deleted from the first cache to evict the general data to the second cache.

[0032] In one alternative implementation, the second buffer is used for:

[0033] When the access frequency of any of the general data in the second cache reaches the preset deletion standard, the general data is deleted from the second cache.

[0034] A second aspect of this application provides a hierarchical caching method, comprising:

[0035] Cache the currently stored hot data on the preset hard drive to the first cache;

[0036] According to a preset elimination standard, general data is filtered from the cached hot data and eliminated to the second cache; wherein, the second cache is used to cache the general data eliminated by the first cache;

[0037] Receive data read requests sent by users to determine the data to be read by the users;

[0038] When the hot data currently cached by the first cache does not include the data to be read, the data to be read is read from the second cache.

[0039] The first cache is a memory cache, the second cache is an NVMe cache, the first cache is a system level 1 cache, and the second cache is a system level 2 cache.

[0040] A third aspect of this application provides a server comprising: a hierarchical caching system as described in the first aspect and various possible designs of the first aspect.

[0041] The technical solution of this application has the following advantages:

[0042] This application provides a hierarchical caching system, method, and server. The system includes a first cache and a second cache. The first cache caches currently stored on a preset hard disk for hot data, and filters general data from the cached hot data according to a preset eviction standard, evicting the general data to the second cache. The second cache caches the general data evicted by the first cache. The first cache also receives data read requests from users to determine the data to be read. When the hot data does not include the data to be read, the data to be read is read from the second cache. The first cache is a memory cache, and the second cache is an NVMe cache. The first cache is a system level 1 cache, and the second cache is a system level 2 cache. The system provided by the above solution achieves hierarchical management of hot data by using a first cache and a second cache, increasing the probability that user-sent I / O requests will hit the cache, reducing the number of I / O operations on the preset hard disk, and improving the throughput performance of the storage system. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.

[0044] Figure 1 This is a schematic diagram of the structure of a hierarchical caching system provided in an embodiment of this application;

[0045] Figure 2 This is a network structure diagram of a hierarchical caching system provided in an embodiment of this application;

[0046] Figure 3 This is a schematic diagram of the user interaction process provided in the embodiments of this application;

[0047] Figure 4 A schematic diagram illustrating the data caching process of an exemplary second buffer provided in this application embodiment;

[0048] Figure 5 A flowchart illustrating the hierarchical caching method provided in this application embodiment;

[0049] Figure 6 This is a schematic diagram of the server structure provided in an embodiment of this application.

[0050] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the present disclosure in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0052] Furthermore, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. In the following descriptions of embodiments, "a plurality of" means two or more, unless otherwise explicitly defined.

[0053] With the development of solid-state storage technology, solid-state storage devices (such as NVMe and SSDs) have entered the storage market as the next generation of storage devices. However, due to cost constraints, solid-state storage devices cannot completely replace traditional mechanical storage devices (HDDs) and can only exist as small-capacity high-speed cache devices in storage systems. Based on the classification of storage devices in storage servers, current storage servers can generally be divided into three categories: all-flash (all high-speed devices such as SSDs and NVMe), hybrid flash (composed of high-speed SSDs or NVMe and low-speed HDDs), and all-HDD (all low-speed HDDs). Storage servers using all HDDs often have poor system throughput due to the performance limitations of the HDDs; all-flash servers can improve storage performance by relying on the excellent response latency of NVMe drives, but at a higher cost. Therefore, considering both system performance and cost, users often consider using storage servers with hybrid flash configurations.

[0054] In distributed storage systems employing hybrid flash servers, a "tiered data storage" approach is often used. High-speed devices store frequently accessed hot data, maximizing storage within limited space to reduce read latency. Lower-performance HDDs store infrequently accessed data, leveraging their large capacity and low cost to maximize hardware resource utilization. For hybrid flash servers, mainstream vendors typically manage flash memory using a dual-pool approach: a high-speed cache pool created from flash drives and a slow pool from HDDs. This dual-pool approach uses different OSD processes to manage the cache and slow disks separately; a Cache Pool manages the cache disk for hot data, while a Storage Pool manages the slow disk for non-hot data. However, dual-pooling implies more Placement Groups (PGs, used to store objects) and requires binding between the two pools. Business I / O becomes longer due to proxy forwarding, reducing storage performance.

[0055] To address the aforementioned issues, this application provides a hierarchical caching system, method, and server. The system includes a first cache and a second cache. The first cache caches currently stored hot data on a preset hard drive and, according to a preset eviction standard, filters out general data from the cached hot data, evicting the general data to the second cache. The second cache caches the general data evicted by the first cache. The first cache also receives data read requests from users to determine the data to be read. When the hot data does not include the data to be read, the data to be read is read from the second cache. The first cache is a memory cache, and the second cache is an NVMe cache. The first cache is a system level-one cache, and the second cache is a system level-two cache. The system provided by the above solution achieves hierarchical management of hot data by employing a first cache and a second cache, increasing the probability that user-sent I / O requests will hit the caches, reducing the number of I / O operations on the preset hard drive, and improving the throughput performance of the storage system.

[0056] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present invention will now be described with reference to the accompanying drawings.

[0057] This application provides a hierarchical caching system for hierarchically caching user I / O data.

[0058] like Figure 1The diagram shown is a structural schematic of a hierarchical caching system provided in an embodiment of this application. The system includes a first cache and a second cache. The first cache is a memory cache, and the second cache is an NVMe cache. The first cache is the system's first-level cache, and the second cache is the system's second-level cache.

[0059] The first cache is used to cache hot data that has been stored on a preset hard disk and to filter general data from the cached hot data according to a preset elimination standard, and to eliminate the general data to the second cache. The second cache is used to cache the general data eliminated by the first cache. The first cache is also used to receive data read requests sent by users to determine the data to be read by the users. When the hot data does not include the data to be read, the data to be read is read from the second cache.

[0060] Among them, such as Figure 2 The diagram shown illustrates the network structure of the hierarchical caching system provided in this embodiment. The first cache can be a write cache (RAM), and the second cache can be an NVMe disk cache (NVMe). The preset hard disk specifically refers to an HDD. Service I / O can directly access the first cache, the second cache, and the preset hard disk. The first and second caches cache data in a single-copy manner, meaning the data cached by the first and second caches does not overlap. The first cache caches data on an object-by-object basis and does not guarantee data persistence; it needs to be re-identified and reloaded after a power outage.

[0061] Specifically, I / O data can be tiered and cached based on its frequency of use. When a user initiates a write request, the memory, while responding by writing the data to a preset hard drive, determines whether the data being written is hot data. If it is determined to be hot data, it is saved as hot data in the first cache after being written to disk (as clean data). Since the first cache itself has limited storage space, it can filter out general data from the cached hot data according to a preset eviction standard, evicting general data to the second cache. General data has a lower frequency of use than hot data. When a user sends a read request, the request is first sent to the first cache. The first cache determines the data to be read based on the received read request, and then checks whether its cached hot data includes the data to be read. If it does, it directly sends the data to be read to the user; otherwise, it reads the data from the second cache.

[0062] Specifically, in one embodiment, a first buffer is used to acquire data write requests sent by users; based on the data write requests, the data to be written is stored to a preset hard disk; if it is determined that the data to be written is hot data, then after storing the data to be written to the preset hard disk, the data to be written is cached as hot data. Hot data identification is performed on an object-by-object basis, and the popularity statistics are implemented based on a Bloom filter.

[0063] Specifically, in one embodiment, the first cache can determine whether the data to be written is hot data based on the attribute characteristics of the data to be written.

[0064] Specifically, after receiving a data write request from a user, the system can determine the popularity index of the data to be written based on the source address, destination address, data type, and size of the data to be written. Based on the level of the popularity index, the system can determine whether the data to be written is hot data.

[0065] Specifically, in one embodiment, the first buffer is further configured to extract a target data segment from the hot data when the hot data includes part of the data to be read; read the remaining data segment from the second buffer and / or the preset hard disk; assemble the target data segment and the remaining data segment to obtain the data to be read, and feed the data to be read back to the user.

[0066] Specifically, such as Figure 3 The diagram illustrates a user interaction flow provided in this application embodiment. The data pool includes a first cache, a second cache, and a preset hard disk. A user sends a data read request to the data pool. Upon receiving a data read request, the data pool OSD first determines whether the data to be read is cached in the first cache. If so, it directly reads the data from the first cache. If the first cache does not cache the data, it further determines whether the data is cached in the second cache. If so, it reads the data from the second cache. If the second cache also does not cache the data, it reads the data from the preset hard disk. During this step-by-step determination process, if the first cache is found to have cached part of the data to be read, that part of the data (target data segment) is read first. Then, it determines whether the second cache contains remaining data segments. If so, the remaining data segments are read from the second cache. The target data segment and the remaining data segments are then assembled to obtain the complete data to be read. If the second cache only contains part of the remaining data segments, only that part of the remaining data segments is read from the second cache, and the other remaining data segments are read from the preset hard disk. Finally, the data segments are assembled. When data needs to be read from the preset hard disk (HDD), if caching is required, a local object is constructed to handle the transaction and a write request is sent to the Store layer.

[0067] Furthermore, in one embodiment, when the data requested by the user is not considered hot data, while returning the data to the user, it is determined whether the data is hot data. If it is determined to be hot data, the data is cached in the first cache. Specifically, the popularity index of the data can be calculated based on characteristics such as the access frequency of the data.

[0068] Specifically, in one embodiment, a first cache is configured to determine any hot data as general data when the access frequency of any hot data in the first cache reaches a preset elimination standard; while caching the general data to a second cache, the general data is deleted from the first cache to eliminate the general data to the second cache.

[0069] Furthermore, in one embodiment, the second buffer is configured to delete general data in the second buffer when the access frequency of any general data in the second buffer reaches a preset deletion criterion.

[0070] Specifically, the data eviction policy for the first buffer can be implemented using TwoQCache, which has three cache queues. `buffer_hot` stores hot data, `buffer_warm_in` stores the most recently added hot data, and `buffer_warm_out` stores data evicted from `buffer_warm_in`. Redundant data is deleted starting from the end of the `buffer_warm_in` queue, and the deleted data is directly added to the head of `buffer_warm_out`. `buffer_warm_in` can be implemented using a Least Recently Used queue, etc. When the first buffer's water level reaches 85%, data needs to be evicted, and data is gradually evicted from `buffer_warm_out`, freeing up cache space in the first buffer. The data eviction policy for the second buffer is basically the same as that of the first buffer, except that the first buffer caches evicted data in the second buffer, while the second buffer directly deletes the evicted data (general data).

[0071] Based on the above embodiments, since the cache space of the second cache is also limited, in order to further improve the rationality of data caching, as an implementable approach, in one embodiment, the second cache is used to monitor the second cache level; and to determine the data caching strategy based on the second cache level.

[0072] It should be noted that the second buffer level represents the proportion of space occupied by the second buffer.

[0073] Specifically, in one embodiment, the second buffer is configured to cache only the general data eliminated by the first buffer when the second buffer level exceeds a preset upper limit; cache the general data eliminated by the first buffer and the first target data corresponding to the target data request when the second buffer level is lower than the preset upper limit but higher than the preset lower limit; and cache the general data eliminated by the first buffer and the second target data corresponding to all data requests when the second buffer level is lower than the preset lower limit.

[0074] The target data request includes a target data read request and a target data write request. The target data read request is a data read request whose read data volume is less than a preset threshold. The target data write request is a data write request whose write data volume is less than a preset threshold. The first target data includes the first target read data and the first target write data. The second target data includes the second target read data and the second target write data. Neither the first target data nor the second target data includes hot data that has been cached in the first cache.

[0075] Specifically, such as Figure 4 The diagram illustrates an exemplary data caching process for a second buffer provided in this application embodiment. Upon receiving a data read / write request from a client, the buffer first checks its water level. If the water level exceeds a preset upper limit, it is considered a high water level. If the water level is below the preset upper limit but above the preset lower limit, it is considered a medium water level. If the water level is below the preset lower limit, it is considered a low water level. At a low water level, all second target data generated by data read / write requests can be written to the second buffer. At a medium water level, it determines whether the current data read / write request to be written is a target data request. If so, the generated second target data is written to the second buffer. At a high water level, not only is general data evicted from the first buffer cached, but also data exchanged by data read / write requests for hot data is cached.

[0076] For example, with a preset upper limit of 75% and a preset lower limit of 25%, when the second cache level reaches 80%, it is determined that the second cache level exceeds the preset upper limit. At this time, the second cache only caches general data evicted from the first cache. When the second cache level reaches 50%, it is determined that the second cache level is lower than the preset upper limit but higher than the preset lower limit. At this time, the second cache caches general data evicted from the first cache, as well as the first target read data and the first target write data generated by target data read requests and target data write requests with a data size of less than 256k. When the second cache level reaches 15%, the preset lower limit of the second cache level is determined. At this time, the second cache caches general data evicted from the first cache and the second target data corresponding to all data requests. That is, when the second cache level is low (below the preset lower limit), no data filtering is performed. Specifically, when write I / O (target write data) needs to be cached, the write cache writes the data into the second cache through a background task after the data is written to the data pool; when read I / O (target read data) needs to be cached, the data to be read is returned to the client (user), and then the data is written into the second cache through a background task.

[0077] Furthermore, in one embodiment, when an OSD failure occurs in the system, it is necessary to clean up the dirty data in the second buffer. When a PG undergoes a master-slave switchover, the hot_oid corresponding to the PG that underwent the master-slave switchover is identified, and the corresponding hot_oid is added to the background hot data deletion queue to delete the hot data. When an OSD is powered on, the previously retained hot data cache is invalidated by default. The hot data is cleaned up during the power-on process. The hot data cache function of the corresponding PG can only be effective after all the hot data of the corresponding PG has been cleaned up. When a PG is deleted, all data cached in the corresponding second buffer under that PG is deleted.

[0078] The hierarchical caching system provided in this application includes: a first cache and a second cache; the first cache is used to cache hot data currently stored on a preset hard disk, and according to a preset eviction standard, filters general data from the cached hot data and evicts the general data to the second cache; the second cache is used to cache the general data evicted by the first cache; the first cache is also used to receive data read requests sent by users to determine the data to be read by the user, and when the hot data does not include the data to be read, read the data to be read from the second cache. The first cache is a memory cache, and the second cache is an NVMe cache. The first cache is a system level-one cache, and the second cache is a system level-two cache. The system provided by the above solution achieves hierarchical management of hot data by using a first cache and a second cache, making it more likely that user I / O requests will hit the cache, reducing the number of I / O operations on the preset hard disk, and improving the throughput performance of the storage system. Furthermore, by implementing hot data identification and caching management of hot data according to the device caching strategy, it ensures that user business I / O hits the cache as much as possible, reducing the number of I / O operations on the HDD disk and improving the throughput performance of the storage system.

[0079] This application provides a hierarchical caching method for hierarchically caching user I / O data. The execution subject of this application embodiment is an electronic device, such as a server, desktop computer, laptop computer, tablet computer, or other electronic devices that can be used for hierarchical caching of user I / O data.

[0080] like Figure 5 The diagram shown is a flowchart of a hierarchical caching method provided in an embodiment of this application. The method includes:

[0081] Step 501: Cache the currently stored hot data on the preset hard drive into the first cache;

[0082] Step 502: According to the preset elimination criteria, filter general data from the cached hot data and eliminate the general data to the second cache; wherein, the second cache is used to cache the general data eliminated by the first cache.

[0083] Step 503: Receive a data read request sent by the user to determine the user's data to be read;

[0084] Step 504: When the hot data currently cached in the first cache does not include the data to be read, read the data to be read from the second cache.

[0085] The first cache is a memory cache, and the second cache is an NVMe cache. The first cache is the system's level 1 cache, and the second cache is the system's level 2 cache.

[0086] Regarding the hierarchical caching method in this embodiment, the specific implementation methods of each step have been described in detail in the embodiments related to the system, and will not be elaborated here.

[0087] The hierarchical caching method provided in this application is used to implement the hierarchical caching system provided in the above embodiments. Its implementation method and principle are the same, and will not be described again.

[0088] This application provides a server for deploying the hierarchical caching system provided in the above embodiments.

[0089] like Figure 6 The diagram shown is a structural schematic of a server provided in an embodiment of this application. The server includes the hierarchical caching system provided in the above embodiment.

[0090] The server provided in this application embodiment is used to run the hierarchical caching system provided in the above embodiment. Its implementation method and principle are the same, and will not be described again.

[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A hierarchical caching system, characterized in that, include: First buffer and second buffer; The first cache is used to cache hot data that has been stored on a preset hard disk, and to filter general data from the cached hot data according to a preset elimination standard, and eliminate the general data to the second cache. The second buffer is used to cache general data that has been evicted from the first buffer; The first buffer is also used to receive data read requests sent by users to determine the user's data to be read. When the hot data does not include the data to be read, the data to be read is read from the second buffer. The first cache is a memory cache, the second cache is an NVMe cache, the first cache is a system level 1 cache, and the second cache is a system level 2 cache. The second buffer is used for: Monitor the water level of the second buffer; Determine the data caching strategy based on the second buffer level; Specifically, regarding the determination of the data caching strategy, the second cache is used for: When the water level of the second buffer exceeds the preset upper limit, only the general data that has been evicted from the first buffer is cached. When the water level of the second buffer is lower than the preset upper limit but higher than the preset lower limit, the general data and the first target data corresponding to the target data request that were evicted by the first buffer are cached. When the water level of the second buffer is lower than the preset water level limit, the general data that the first buffer has evicted and the second target data corresponding to all the data requests are cached. The target data request includes a target data read request and a target data write request. The target data read request is a data read request with a read data volume less than a preset threshold. The target data write request is a data write request with a write data volume less than a preset threshold. The first target data includes first target read data and first target write data. The second target data includes second target read data and second target write data. Neither the first target data nor the second target data includes hot data already cached in the first cache.

2. The system according to claim 1, characterized in that, The first buffer is also used for: When the hot data includes some data to be read, extract the target data fragment from the hot data; Read the remaining data segments from the second buffer and / or the preset hard disk; The target data segment and the remaining data segments are assembled to obtain the data to be read, and the data to be read is then fed back to the user.

3. The system according to claim 1, characterized in that, The first buffer is used for: Retrieve data write requests sent by the user; According to the data write request, the data to be written is stored in the preset hard disk; If the data to be written is determined to be hot data, then after storing the data to be written to the preset hard disk, the data to be written is cached as hot data.

4. The system according to claim 3, characterized in that, The first buffer is also used for: Based on the attribute characteristics of the data to be written, determine whether the data to be written is hot data.

5. The system according to claim 1, characterized in that, The first buffer is used for: When the access frequency of any of the hot data in the first cache reaches the preset elimination standard, the hot data is determined to be general data. While caching the general data in the second cache, the general data is deleted from the first cache to evict the general data to the second cache.

6. The system according to claim 1, characterized in that, The second buffer is used for: When the access frequency of any of the general data in the second cache reaches the preset deletion standard, the general data is deleted from the second cache.

7. A hierarchical caching method, characterized in that, include: Cache the currently stored hot data on the preset hard drive to the first cache; According to a preset elimination standard, general data is filtered from the cached hot data and eliminated to the second cache; wherein, the second cache is used to cache the general data eliminated by the first cache; Receive data read requests sent by users to determine the data to be read by the users; When the hot data currently cached by the first cache does not include the data to be read, the data to be read is read from the second cache. The first cache is a memory cache, the second cache is an NVMe cache, the first cache is a system level 1 cache, and the second cache is a system level 2 cache. The second buffer is used for: Monitor the water level of the second buffer; Determine the data caching strategy based on the second buffer level; Specifically, regarding the determination of the data caching strategy, the second cache is used for: When the water level of the second buffer exceeds the preset upper limit, only the general data that has been evicted from the first buffer is cached. When the water level of the second buffer is lower than the preset upper limit but higher than the preset lower limit, the general data and the first target data corresponding to the target data request that were evicted by the first buffer are cached. When the water level of the second buffer is lower than the preset water level limit, the general data that the first buffer has evicted and the second target data corresponding to all the data requests are cached. The target data request includes a target data read request and a target data write request. The target data read request is a data read request with a read data volume less than a preset threshold. The target data write request is a data write request with a write data volume less than a preset threshold. The first target data includes first target read data and first target write data. The second target data includes second target read data and second target write data. Neither the first target data nor the second target data includes hot data already cached in the first cache.

8. A server, characterized in that, include: The hierarchical caching system as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and system of caching management in cluster file system

    CN101377788A

  • Ceph-based hierarchical caching method, device, equipment and product

    CN115454888A