RAID card static cache management method and device based on data popularity
By dividing popular areas, intermediate areas and unpopular areas in the RAID card, combining LRU strategy and neural network model, dynamically managing cache resources, the performance degradation of traditional cache management methods in complex access mode is solved, and efficient cache management and performance optimization is achieved.
Patent Information
- Application Number
- CN202510390743.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-18
AI Technical Summary
Traditional cache management methods are difficult to meet the performance requirements of storage systems when facing complex access modes and high concurrent workloads, especially when data heat distribution is uneven and frequent access mode changes, resulting in a degradation of cache performance.
By dividing the cache space into popular zones, intermediate zones and unpopular zones, dynamically manage cache resources based on data popularity, use RAID controllers to predict data access probability, dynamically adjust cache strategies, and optimize the storage location and update mechanism of data blocks in the cache space.
Significantly improve cache hit rate, reduce cache replacement overhead, optimize storage system performance, improve I/O performance and improve resource utilization, and adapt to complex data access modes.
Smart Images

Figure CN120335719A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage and processing, and particularly to a method and device for static cache management of a RAID card based on data heat. Background Art
[0002] With the rapid development of information technology, storage systems have become increasingly important in enterprise-level applications and high-performance computing environments. As an important means of optimizing storage systems, cache management directly affects the performance and resource utilization rate of the systems. Against this background, RAID (Redundant Array of Independent Disks) technology has been widely applied due to its advantages of improving data reliability and fault tolerance. At the same time, how to more efficiently manage cache capacity and improve cache hit rate has become a key issue in enhancing the overall performance of storage systems.
[0003] Although RAID technology and cache management strategies have played an important role in enhancing storage performance, in the face of complex access patterns and high-concurrency workloads, traditional cache management methods may be difficult to meet the growing performance requirements. Especially in the case of uneven data heat distribution and frequent changes in access patterns, the traditional LRU (Least Recently Used) algorithm is prone to cause a decline in cache performance, thereby affecting the response speed and efficiency of the entire system. Summary of the Invention
[0004] To solve the technical problems existing in the prior art, the present invention proposes a method and device for static cache management of a RAID card based on data heat. By dividing the cache space into a hot area, an intermediate area, and a cold area and dynamically managing it according to content heat, this method can more effectively allocate cache resources, improve cache hit rate, reduce cache replacement overhead, and thus optimize the performance of storage systems.
[0005] The first object of the present invention is to provide a method for static cache management of a RAID card based on data heat.
[0006] The second object of the present invention is to provide a computer device.
[0007] The first object of the present invention can be achieved by adopting the following technical solutions:[[]]
[0008] A method for static cache management of a RAID card based on data heat includes the following steps:[[]]
[0009] S1. Receive and analyze read-write requests of a file system, and obtain the physical location of data blocks to be accessed in an SSD array according to the read-write requests.
[0010] S2. Build a cache management model, collect the historical data access information of the RAID card and generate a historical data set, and use the historical data set to train a neural network model to obtain the cache management model;
[0011] S3. According to the historical data and the current system state, predict and output the data blocks that may be accessed in the future and their access probabilities through the cache management model;
[0012] S4. The RAID controller dynamically adjusts the cache policy according to the prediction results output by the cache management model and the read / write requests of the file system, and combines the LRU strategy to optimize the storage location and update mechanism of the data blocks in the cache space;
[0013] S5. Real-time monitor the hit rate and storage efficiency of the cache area. When the hit rate or data access efficiency does not reach the preset value, adjust the parameters of the cache policy and update the cache policy.
[0014] Specifically, the building of the cache management model, collecting the historical data access information of the RAID card and generating a historical data set, and using the historical data set to train a neural network model to obtain the cache management model includes:
[0015] Continuously record the data access information of each data block on the RAID card through the RAID controller, and collect the historical data access information of each data block on the RAID card;
[0016] Generate a historical data set according to the collected historical data access information of the data blocks;
[0017] Use the historical data set to train an RNN recurrent neural network to obtain the cache management model. The cache management model is used to predict the future data access pattern and predict the probability that each data block will be accessed in the future period of time.
[0018] Specifically, the data access information of the data block includes: the read / write frequency of the data block, the timestamp of the last access, and the access order.
[0019] Specifically, the predicting and outputting of the data blocks that may be accessed in the future and their access probabilities according to the historical data and the current system state through the cache management model includes:
[0020] Continuously monitor the current read / write requests of the RAID card system through the RAID controller to obtain the current system state information;
[0021] Combine the historical data set and the current system state information into a feature vector X, extract the key features from the feature vector X, and use the key features as the final feature vector input to the cache management model;
[0022] The key features are input into the cache management model, and the cache management model outputs prediction results, which include the data blocks that may be accessed and their access probabilities.
[0023] Specifically, a feature vector X is combined from the historical data set and the current system state information, and the key features are extracted from the feature vector X, including: extracting the key features from the feature vector X through principal component analysis (PCA) or convolutional neural network (CNN). The extracted key features include: weighted values of the short-term and long-term access frequencies of the data blocks, the current and historical access time differences, whether the data block currently resides in the cache, its relationship with the current cache hit rate, the current IO load level of the system, the read / write ratio feature, the access heat index, and the periodicity index of the historical access pattern.
[0024] Specifically, the RAID controller dynamically adjusts the cache policy according to the prediction results output by the cache management model and the read / write requests of the file system, and optimizes the storage location and update mechanism of the data blocks in the cache space, including:
[0025] Combining the LRU cache management method to divide the cache space into three regions: the hot region, the middle region, and the cold region;
[0026] Dividing the priorities of the data blocks according to the predicted access probability sizes of each data block. The priorities of the data blocks include high priority, medium priority, and low priority; the priorities of the data blocks can be mapped to the cache regions. High-priority data blocks correspond to the hot region of the cache, medium-priority data blocks correspond to the middle region of the cache, and low-priority data blocks can be located in the cold region of the cache or be evicted;
[0027] Dynamically adjusting the position of the data block in the cache space according to the priority of the data block, storing the high-priority data blocks in the hot region, moving the low-priority data blocks out of the hot region and transferring them to the cold region or directly deleting them from the cache.
[0028] Specifically, the hot region is located at the head of the LRU linked list and contains data blocks with high access frequencies; the middle region is located in the middle of the LRU linked list and contains data blocks with lower access frequencies; the cold region is located at the tail of the LRU linked list and contains the least recently accessed or lowest-frequency accessed data blocks.
[0029] The second object of the present invention can be achieved by adopting the following technical solutions:
[0030] A computer device, including a processor and a memory for storing processor-executable programs, characterized in that when the processor executes the programs stored in the memory, it implements the above-mentioned RAID card static cache management method based on data heat.
[0031] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0032] The present invention provides a method and device for static cache management of a RAID card based on data heat. The RAID controller dynamically adjusts the cache policy according to the prediction result output by the cache management model and the read / write requests of the file system, combines the LRU strategy to optimize the storage location and update mechanism of data blocks in the cache space, divides the cache space into a hot area, an intermediate area, and a cold area, and allocates and manages the content according to the data access frequency and heat. The present invention can effectively identify and retain hot data with high access frequency, thereby reducing unnecessary cache replacement operations. By dynamically evaluating the heat of the cache content, placing new data in a suitable cache area, and preferentially deleting the data with the lowest heat from the cold area, the present invention can significantly improve the hit rate of the RAID card cache, enhance the data access efficiency, and further improve the performance of the entire storage system. The present invention can effectively reduce the data access latency, improve the I / O performance of the RAID system, and optimize the utilization rate of existing resources without increasing hardware resources. Aiming at the performance bottleneck of the existing SSD RAID system, the present invention utilizes the synergistic effect of data heat analysis and the LRU algorithm to intelligently manage cache resources, significantly improving the overall performance and efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on the structures shown in these drawings.
[0034] Figure 1 is a flowchart of the steps of a method for static cache management of a RAID card based on data heat in an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of an LRU chain based on heat differentiation in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] The following will further describe the technical solutions of the present invention in detail with reference to the drawings and embodiments. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. The embodiments of the present invention are not limited thereto. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.
[0037] Embodiment 1:
[0038] AsFigure 1 As shown in the figure, the present invention provides a method for static cache management of a RAID card based on data heat, and the method includes:
[0039] S1. Receive and analyze the read / write requests of the file system, and obtain the physical location of the data block to be accessed in the SSD array according to the read / write requests.
[0040] S11. The RAID controller receives the read / write requests issued by the file system.
[0041] When the file system issues read / write requests, the RAID controller first receives these requests. The read / write requests include detailed information of the data blocks to be accessed, such as the logical address of the data block, data size, request time, etc. The RAID controller determines the actual storage location of the data on the solid-state drive (SSD) based on this information and conveys it to the subsequent cache management module. Among them, the logical address (Logical Block Address, LBA) of the data block: is the address of the specified data block in the file system, indicating the specific location in the logical volume. Data size: indicates the size of the data block involved in the current read / write operation, usually in bytes. Request time: records the timestamp when the request arrives at the RAID controller. This timestamp is particularly important when analyzing data access patterns and predicting future data hotspots.
[0042] S12. The RAID controller parses the received requests, obtains the logical address of the data block to be accessed, and determines the physical location of the data block on the SSD array, which specifically includes the following steps:
[0043] Map the logical address to the physical address. The RAID controller uses an internal mapping table to convert the logical address into the physical address on the SSD. This mapping relationship is dynamically managed and changes continuously with data write and erase operations.
[0044] Check the RAID level. Different RAID configurations (such as RAID 0, RAID 1, RAID 5, etc.) are different in data distribution and redundancy management. The controller needs to determine how the data is distributed on multiple SSDs according to the current RAID level of the system to locate the data block. Combining the logical address and the RAID configuration, the RAID controller finally determines the physical location of the data block on the SSD and passes the physical location of the data block on the SSD to the cache management module. The cache management module decides whether to store the data block in the cache based on the physical location of these data blocks on the SSD and determines its priority and storage policy in the cache.
[0045] S2. Build a cache management model, collect the historical data access information of the RAID card and generate a historical data set, and use the historical data set to train a neural network model to obtain the cache management model.
[0046] S21. Continuously record the data access information of each data block on the RAID card through the RAID controller, and collect the historical data access information of the data blocks on the RAID card.
[0047] Specifically, the RAID controller continuously recording the data access information of each data block on the RAID card includes: the read / write frequency of the data block, the timestamp of the most recent access, and the access order. Among them, the read / write frequency records the number of times each data block is read and written. Data blocks with a high frequency may be hot data of the system and should be given priority for caching. The timestamp of the most recent access. RAID controller logs usually contain timestamps. By parsing the logs, the most recent access time of each data block can be extracted. A timestamp is attached to each access operation to record the time point of the access. Timestamps help analyze the time distribution of data access and can be used to predict future access patterns. The access order records the access order of data blocks for analyzing access patterns, such as which data blocks are accessed continuously and which are accessed randomly. The process of collecting this data access information requires the system to continuously monitor and record to form a detailed historical data set. Assume the historical data set is H = h1, h2, …, h n , where each h i represents the access information of the i-th data block.
[0048] S22. Generate a historical data set based on the collected historical data access information of the data blocks.
[0049] This data set includes not only the read / write frequency of each data block, the timestamp of the most recent access, the access order, the correlation between data blocks, and periodic access characteristics, etc. The data set can be represented as a matrix D, where each row represents the access information of a data block and contains the following content: D[i, 1]: the read / write frequency of data block i, D[i, 2]: the most recent access time of data block i, D[i, 3]: the access order of data block i,....
[0050] S23. Use the historical data set to train an RNN recurrent neural network to obtain a cache management model. The cache management model is used to predict future data access patterns and predict the probability that each data block will be accessed within a certain period of time in the future.
[0051] After obtaining the historical data set, by training an RNN (Recurrent Neural Network) or its improved version, the LSTM (Long Short-Term Memory Network), the historical data is learned and analyzed to mine data access patterns and rules. The trained neural network model is used to predict future data access patterns and predict the probability of each data block being accessed within a certain period in the future.
[0052] S3. According to the historical data and the current system state, the cache management model predicts and outputs the data blocks that may be accessed in the future and their access probabilities. By predicting the data blocks that may be accessed in the future, it can help the RAID card load the data blocks that may be frequently accessed into the cache in advance, thereby improving the cache hit rate and reducing data read latency.
[0053] S31. Continuously monitor the current read and write requests of the RAID card system through the RAID controller to obtain the current system state information.
[0054] The current system state information includes the current cache usage rate, the current system load, the access order of the current data blocks, the current read-write ratio, whether the data blocks currently reside in the cache, etc. Specifically, the current cache usage rate, such as the ratio of the used cache capacity to the total capacity. The current system load, such as the total number of read and write requests per unit time. The access order of the current data blocks, that is, the order of requests in the current time window. The current read-write ratio, such as the ratio of read requests to write requests. A set of state variables can be defined according to the current access pattern information. A set of state variables S = s1, s2, …, s m , and these variables include the current cache usage, the access frequency of data blocks, the access order, the time stamp, the read-write ratio, etc.
[0055] S32. Combine the historical data set and the data of the current system state into a feature vector X, extract the key features (the most useful features for prediction) useful for prediction from the feature vector X, and use the key features as the final feature vector input to the cache management model.
[0056] Specifically, combining the historical data set and the data of the current system state into a feature vector X includes: constructing a multi-dimensional numerical feature vector by means of unified coding, normalization, etc. for the above historical data set features and current system state information. The feature vector X includes information such as the historical access frequency, the most recent access time, and the current system load of each data block.
[0057] Specifically, key features useful for prediction are extracted from the feature vector X. The key features can be extracted from the feature vector X through principal component analysis (PCA) or convolutional neural network (CNN), and these key features can be expressed as Φ(X), which is the final feature vector input to the prediction model. Among them, the PCA extraction method includes linear dimensionality reduction of high-dimensional feature data, calculation of the main feature components through the covariance matrix, and retention of several principal components with the largest variance in the data for constructing the compressed feature subspace; the CNN extraction method includes end-to-end feature extraction of the input feature matrix through structures such as convolutional layers and pooling layers, and automatically learning the high-order features most discriminative for prediction.
[0058] Specifically, the extracted key features include, but are not limited to: weighted values of the short-term and long-term access frequencies of data blocks, the current and historical access time differences (time decay features), whether the data block currently resides in the cache (logical state features), its relationship with the current cache hit rate, the current IO load level of the system, read-write ratio features (whether it is read-intensive or write-intensive), access heat index (statistical through a sliding window), periodicity indicators of historical access patterns (whether there is a fixed-interval access trend), etc.
[0059] S33. Use the key features as the input to the cache management model, and the cache management model outputs the prediction results, which include the data blocks that may be accessed and their access probabilities.
[0060] Assume the cache management model is P(Φ(X)), and the output result is a set of data blocks that may be accessed and their access probabilities. The output of the cache management model can be expressed as:
[0061] P(Y|Φ(X))
[0062] Among them, Y is the set of data blocks to be accessed in the future. For each data block y i , the predicted access probability is:
[0063] P(y i |y(X))
[0064] The predicted access probability indicates the likelihood that the data block will be accessed in a future period of time.
[0065] S4. The RAID controller dynamically adjusts the cache policy according to the prediction results output by the cache management model and the read-write requests of the file system, and combines the LRU (Least Recently Used) policy to optimize the storage location and update mechanism of data blocks in the cache space.
[0066] S41. Divide the cache space into three regions: the hot region, the middle region, and the cold region in combination with the LRU cache management method.
[0067] The LRU cache management method is a cache eviction strategy. When the cache is full, the least recently used element needs to be removed. For the data blocks in the cache area, they are arranged according to the time order of their recent accesses. When the cache space is insufficient, the data block that has not been accessed for the longest time is preferentially evicted to ensure that the cache space is always used to store the currently most valuable data.
[0068] As Figure 2 shown, it is a schematic diagram of the LRU chain based on popularity differentiation. In this embodiment, in combination with the LRU cache management method, in the cache management module of the RAID card, all cached data blocks are organized into an LRU linked list according to the order of access time. This linked list represents the data blocks from the most recently accessed to the least recently accessed from head to tail. As time goes by, the data blocks will move in the linked list according to the access situation. According to the position of the data blocks in the LRU linked list, the cache space is divided into three regions to better optimize the storage and access strategies of the data blocks. Among them:
[0069] The hot area is located at the head of the LRU linked list and contains data blocks with high access frequencies. These data blocks are preferentially saved in the cache area due to their high access frequencies to improve the cache hit rate.
[0070] The middle area is located in the middle section of the LRU linked list and contains data blocks with lower access frequencies. Compared with the hot area, the data blocks in the middle area are accessed less frequently, but still have a certain probability of being accessed. Therefore, these data blocks are saved in the secondary cache area.
[0071] The cold area is located at the tail of the LRU linked list and contains the data blocks that have not been accessed for the longest time or have the lowest access frequencies. These data blocks are considered low-priority data and will therefore be transferred to the low-speed storage area or be preferentially evicted when the cache space is insufficient.
[0072] S42. Divide the priorities of the data blocks according to the predicted access probability sizes of each data block. The priorities of the data blocks include high priority, medium priority, and low priority. The priorities of the data blocks can be mapped to the cache areas. High-priority data blocks correspond to the hot area of the cache, medium-priority data blocks correspond to the middle area of the cache, and low-priority data blocks can be located in the cold area of the cache or be evicted. By combining priority division and area management, refined scheduling of the cache space is achieved, and data access efficiency is improved.
[0073] Specifically, set a high threshold and T h low threshold T l , when the access probability P)y i |Φ(X)) is greater than the high threshold T h , then the priority of the data block is defined as high priority; when the access probability P(y j|Φ(X)) is lower than the low threshold T l , the priority of the data block is defined as low priority; when the access probability P(y j |Φ(X)) is greater than or equal to the low threshold T l and less than or equal to the high threshold T h , the priority of the data block is defined as normal priority. The RAID controller receives the predicted data block set y1, y2, …, y according to the prediction result output by the cache management model k and their corresponding access probabilities P(y i |Φ(X)). The data blocks are sorted according to the predicted access probability of each data block, from high to low as y1, y2, …, y k . A large predicted access probability (i.e., high priority) indicates that it may be frequently accessed in the future for a period of time.
[0074] S43. Dynamically adjust the position of the data block in the cache space according to the priority of the data block, store the high-priority data blocks in the hot area, move the low-priority data blocks out of the hot area and transfer them to the cold area or directly delete them from the cache. The storage layout of the data blocks can be optimized to achieve dynamic adjustment of the cache policy.
[0075] In this embodiment, when the capacity of the hot area reaches the upper limit, the RAID controller will decide which data blocks to move out according to the replacement policy, and preferentially retain those data blocks with high access frequency and large predicted access probability.
[0076] For each data block y i , when its corresponding access probability P(y i |Φ(X)) > T h , it is put into the hot area, and the capacity constraint of the hot area is:
[0077]
[0078] where size(y i ) is the size of the data block t i (the unit is usually byte, KB or MB). Since different data blocks may have different sizes (such as 4KB, 8KB), the cache management needs to consider the total capacity. represents the total space occupied by all the data blocks currently put into the hot cache area C h . C h represents the total capacity limit of the hot area cache space (such as 100MB, 1GB, etc.).
[0079] For each data block y j , if P(y j |Φ(X)) < T l, it will be removed from the hot zone, transferred to the cold zone or deleted.
[0080] In this embodiment, when the RAID controller receives a new read / write request, it will dynamically adjust the position of the requested data block in the cache space according to its position in the LRU linked list. If the accessed data block is in the cold zone or the middle zone, the data block will move towards the head of the linked list according to the LRU policy and may be migrated to the middle zone or the hot zone. When the data blocks in the cold zone are frequently accessed, the system will migrate them to the middle zone or the hot zone to ensure that the data blocks with high-frequency access can obtain cache resources preferentially. As time goes by, if a data block is not accessed for a long time, it will gradually move towards the tail in the LRU linked list and may be migrated from the hot zone to the middle zone or the cold zone.
[0081] By preferentially storing the data blocks with high access probability in the hot zone, the average latency time T of data reading can be significantly reduced. avg . Dynamically adjusting the cache policy can maximize the cache utilization rate U. cache , while balancing the storage of high-frequency and low-frequency data blocks and optimizing the overall system performance.
[0082] S5. Real-time monitor the hit rate and storage efficiency of the cache area. When the hit rate or data access efficiency does not reach the preset value, adjust the parameters of the cache policy and update the cache policy.
[0083] To adapt to the changing data access patterns, the RAID controller periodically monitors the actual cache hit rate and data access efficiency. By analyzing the difference between the actual access situation and the predicted results, the system continuously updates the cache management model to ensure that its prediction of future access patterns is more accurate.
[0084] In actual operation, the RAID controller real-time monitors the hit rate and storage efficiency of the cache area. If it is found that the hit rate decreases, the system will adjust the parameters of the cache policy through feedback information, including the thresholds T h and T l . Based on the feedback information, dynamically update the cache policy to ensure that the cache hit rate H final can reach the optimal level under different workloads.
[0085] Specifically, in step S5, in order to adapt to the changing data access patterns, the RAID controller periodically monitors the actual cache hit rate and data access efficiency, and updates the cache management model by analyzing the difference between the actual access situation and the predicted results to ensure that its prediction of future access patterns is more accurate.
[0086] S51. Real-time monitor the actual cache hit rate and evaluate the effectiveness of the current cache policy.
[0087] Cache hit rate monitoring, which records and calculates the cache hit rate H(t) in real time, that is, the ratio of the number of requests directly hit by the cache to the total number of requests within time T. This ratio can directly reflect the effectiveness of the current cache policy. By monitoring the average latency time T avg (t) and the throughput R io (t) of I / O operations to evaluate data access efficiency. These metrics reflect the performance of the current system in processing read and write requests.
[0088] S52. Compare the actually accessed data blocks with the set of data blocks predicted by the cache management model, and calculate the prediction accuracy A pred , for example, calculate the proportion of correctly predicted data blocks.
[0089] If A pred is lower than the set threshold T accuracy , the system will analyze the error between the prediction result and the actual access pattern, identify the high-frequency data blocks not covered in the prediction or misjudged low-frequency data blocks, and record this information for reference when updating the model.
[0090] S53. Update the cache management model. When the hit rate or data access efficiency does not reach the preset value, the RAID controller gradually adjusts the parameters of the cache management model to optimize the cache policy to adapt to the new data access pattern.
[0091] The RAID controller compares the prediction result with the actual access situation to generate feedback information, and dynamically adjusts the parameters of the prediction model according to the feedback information to update and optimize the cache management model. By updating and optimizing the cache management model, the model can continuously adapt to the changing access pattern and ensure that the model can maintain a high prediction accuracy under different workloads.
[0092] Specifically, according to the monitoring data, the RAID controller will gradually adjust the parameters of the cache management model, update the high-frequency access threshold T h and the low-frequency removal threshold T l , and optimize the cache policy to adapt to the new data access pattern. The specific formula is as follows:
[0093] Updated high-frequency access threshold: T h = T h + α * ΔH, where α is the learning rate and ΔH is the difference between the actual cache hit rate and the target hit rate.
[0094] Updated low-frequency removal threshold: T l = T l β * ΔH, where β is the adjustment parameter.
[0095] Retrain or fine-tune the cache management algorithm (such as LRU, LFU, etc.) based on new data to ensure that the model is more adaptable to access patterns. The system may adopt an online learning method to continuously obtain feedback from new data to optimize the model.
[0096] Specifically, it is also possible to judge whether the updated cache policy is effective according to the performance monitoring results after each adjustment. When the hit rate or data access efficiency does not reach the preset value, the system will further adjust the cache management model until the performance reaches a stable optimal state. For the dynamic adjustment period, the RAID controller dynamically sets the monitoring and model update period T according to the change frequency of the workload update , so as to avoid the computational overhead caused by frequent adjustments while maintaining the accuracy of the model.
[0097] Over time, through continuous monitoring and updating, the cache management model can more accurately predict future data access patterns, ensuring that the system can still maintain an efficient cache policy in the face of changing access requirements. Through continuous updating and optimization, the system can adaptively learn and adjust to improve its ability to handle complex data access patterns, ultimately enhancing the overall performance and stability of the system. Through the above steps, the RAID controller can effectively monitor and update the cache management model to ensure that its prediction of future data access patterns is more accurate, thereby improving the system performance and resource utilization rate.
[0098] The present invention can significantly improve the hit rate of the RAID card cache, enhance the data access efficiency, and further improve the performance of the entire storage system by dynamically evaluating the popularity of cache content, placing new data in the appropriate cache area, and preferentially deleting the data with the lowest popularity from the cold area. The present invention can effectively reduce the data access latency, improve the I / O performance of the RAID system, and optimize the utilization rate of existing resources without increasing hardware resources. Aiming at the performance bottleneck of the existing SSD RAID system, the present invention utilizes the synergistic effect of data popularity analysis and the LRU algorithm to intelligently manage cache resources, significantly improving the overall performance and efficiency of the system.
[0099] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement methods and are all included in the protection scope of the present invention.
Claims
1. A static cache management method for RAID cards based on data heat, characterized in that It includes the following steps: S1. Receive and analyze the read / write requests of the file system, and obtain the physical locations of the data blocks to be accessed in the SSD array according to the read / write requests; S2. Build a cache management model, collect the historical data access information of the RAID card and generate a historical data set, and use the historical data set to train a neural network model to obtain the cache management model; S3. According to the historical data and the current system status, predict and output the data blocks that may be accessed in the future and their access probabilities through the cache management model; S4. The RAID controller dynamically adjusts the cache policy according to the prediction results output by the cache management model and the read / write requests of the file system, and combines with the LRU policy to optimize the storage location and update mechanism of the data blocks in the cache space; S5. Monitor the hit rate and storage efficiency of the cache area in real time. When the hit rate or data access efficiency does not reach the preset value, adjust the parameters of the cache policy and update the cache policy.
2. The static cache management method of a RAID card based on data heat according to claim 1, characterized in that The building of the cache management model, collecting the historical data access information of the RAID card and generating a historical data set, and using the historical data set to train a neural network model to obtain the cache management model includes: Continuously record the data access information of each data block on the RAID card through the RAID controller, and collect the historical data access information of each data block on the RAID card; Generate a historical data set according to the collected historical data access information of the data blocks; Use the historical data set to train an RNN recurrent neural network to obtain the cache management model. The cache management model is used to predict the future data access pattern and predict the probability of each data block being accessed within a certain period in the future.
3. The static cache management method of a RAID card based on data heat according to claim 2, characterized in that The data access information of the data block includes: the read / write frequency of the data block, the timestamp of the last access, and the access order.
4. A method for static cache management of a RAID card based on data heat, as claimed in claim 2, wherein The predicting and outputting the data blocks that may be accessed in the future and their access probabilities through the cache management model according to the historical data and the current system status includes: Continuously monitor the current read / write requests of the RAID card system through the RAID controller to obtain the current system status information; Combine the historical data set and the current system status information into a feature vector X, extract the key features from the feature vector X, and use the key features as the final feature vector input to the cache management model; Use the key features as the input to the cache management model, and the cache management model outputs the prediction results. The prediction results include the data blocks that may be accessed and their access probabilities.
5. The static cache management method of a RAID card based on data heat according to claim 1, characterized in that, The combining the historical data set and the current system status information into a feature vector X and extracting the key features from the feature vector X includes: extracting the key features from the feature vector X through principal component analysis PCA or convolutional neural network CNN. The extracted key features include: the weighted values of the short-term and long-term access frequencies of the data block, the current and historical access time differences, whether the data block currently resides in the cache, the relationship between the current cache hit rate and it, the current IO load level of the system, the read / write ratio feature, the access popularity index, and the periodicity index of the historical access pattern.
6. A RAID card static cache management method based on data heat according to claim 1, characterized in that The RAID controller dynamically adjusts the cache policy according to the prediction result output by the cache management model and the read / write requests of the file system, and optimizes the storage location and update mechanism of data blocks in the cache space, including: Dividing the cache space into three regions: a hot region, an intermediate region, and a cold region in combination with the LRU cache management method; Dividing the priority levels of data blocks according to the predicted access probability of each data block. The priority levels of data blocks include high priority, medium priority, and low priority. The priority levels of the data blocks can be mapped to the cache regions. High-priority data blocks correspond to the hot region of the cache, medium-priority data blocks correspond to the intermediate region of the cache, and low-priority data blocks can be located in the cold region of the cache or be evicted; Dynamically adjusting the position of the data block in the cache space according to the priority level of the data block, storing high-priority data blocks in the hot region, moving low-priority data blocks out of the hot region and transferring them to the cold region or directly deleting them from the cache.
7. A method for static cache management of a RAID card based on data heat, as claimed in claim 6, wherein The hot region is located at the head of the LRU linked list and contains data blocks with high access frequencies; the intermediate region is located in the middle of the LRU linked list and contains data blocks with lower access frequencies; the cold region is located at the tail of the LRU linked list and contains data blocks that have not been accessed for the longest time or have the lowest access frequencies.
8. A method for static cache management of a RAID card based on data heat, as claimed in claim 6, wherein Dividing the priority levels of data blocks according to the predicted access probability of each data block. The priority levels of data blocks include high-priority data blocks and low-priority data blocks, including: Set a high threshold and T h Low threshold T l , when the access probability P(y i |Φ(X)) of the data block is greater than the high threshold T h , the priority of the data block is defined as high priority; when the access probability P(y j |Φ(X)) of the data block is lower than the low threshold T l , the priority of the data block is defined as low priority; when the access probability P(y j |Φ(X)) of the data block is greater than or equal to the low threshold T l and less than or equal to the high threshold T h , the priority of the data block is defined as medium priority.
9. The static cache management method of a RAID card based on data heat as claimed in claim 8, wherein Dynamically adjusting the position of the data block in the cache space according to the priority level of the data block, storing high-priority data blocks in the hot region, moving low-priority data blocks out of the hot region and transferring them to the cold region or directly deleting them from the cache, including: For each data block y i , when its corresponding access probability P(y i |Φ(X)) > T h , it is placed in the hot area, and the capacity constraint of the hot area is: Among them, represents the total space occupied by all data blocks currently placed in the popular cache area C h , where size(y i ) is the size of the data block y i , and C h represents the total capacity limit of the cache space in the popular area; For each data block y j , if P(y j |Φ(X)) < T l , then move it out of the popular area and transfer it to the cold area or delete it.
10. A computer device, comprising a processor and a memory for storing processor-executable programs, characterized in that, When the processor executes the program stored in the memory, it implements a static cache management method for a RAID card based on data heat as described in any one of claims 1 to 9.
Citation Information
Cited By
Efficient memory management method and system based on SOC chip
CN120832332A
An efficient memory management method and system based on an SOC chip
CN120832332B
Storage system optimization method and device, electronic equipment, medium and product
CN120909532A
Method, device, electronic equipment, medium and product for optimizing storage system
CN120909532B
Data storage method and device, electronic equipment and storage control chip
CN120973315A