Hybrid fingerprint cache management method, controller and system for deduplicated SSDs

By employing a hybrid fingerprint cache management strategy that combines locality awareness and reference awareness, and adaptively adjusting the cache replacement strategy, the problem of low cache hit rate in existing technologies is solved, deduplication overhead is reduced, and the performance of deduplicated SSDs is improved.

CN115757211BActive Publication Date: 2025-10-31HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211466728.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-10-31
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

Existing fingerprint cache management solutions cannot accurately identify the popularity of fingerprints, resulting in low cache hit rates. Sending a large number of fingerprint searches to flash memory increases deduplication overhead.

Method used

A hybrid fingerprint cache management strategy is adopted, which combines locality-aware and reference-aware strategies. The policy fitness of the cache replacement strategy is calculated periodically, and the cache replacement strategy is switched when the fitness is low. A two-level fingerprint cache structure is also adopted to improve the cache hit rate.

Benefits of technology

It improves cache hit rate, reduces the deduplication overhead of sending fingerprint lookup data to flash memory, and optimizes the performance of deduplicated SSDs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115757211B_ABST
    Figure CN115757211B_ABST
Patent Text Reader

Abstract

This invention discloses a hybrid fingerprint cache management method, controller, and system for deduplicating SSDs, belonging to the field of data deduplication. The method includes: maintaining a fingerprint cache in memory and a fingerprint table in flash memory; the cache replacement strategy is either a locality-aware strategy or a reference-aware strategy; the fingerprint cache includes multiple fingerprint buckets for managing fingerprint entries, and the fingerprint table manages fingerprints in the form of fingerprint entries; periodically calculating the policy fitness of the cache replacement strategy and switching the cache replacement strategy when the policy fitness is less than a preset threshold; data fingerprint insertion includes: determining the corresponding target fingerprint bucket and checking if the corresponding target fingerprint entry exists therein; if so, updating the target fingerprint entry and the target fingerprint bucket, and the insertion ends; otherwise, creating the corresponding fingerprint entry to be inserted and inserting it into the target fingerprint bucket according to the current cache replacement strategy. This invention can improve the fingerprint cache hit rate and reduce deduplication overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of data deduplication, and more specifically, relates to a hybrid fingerprint cache management method, controller and system for deduplicated SSDs. Background Technology

[0002] Solid State Drives (SSDs) based on flash memory have gradually become important storage devices in various storage products and systems, providing stable and efficient service performance due to their advantages such as high storage density, fast access speed, and low power consumption. Despite the rapid development of SSDs, they still cannot meet the storage needs of massive amounts of data. Furthermore, due to the limited number of erase cycles of flash memory, SSDs face serious wear and reliability issues. Data deduplication, as a system-level lossless compression technology, avoids redundant writes by retaining only one copy of the data, effectively reducing the amount of data written. Therefore, deduplication is widely used in SSD storage systems to improve the space utilization of SSD storage and save storage costs. At the same time, the reduced write traffic from deduplication can solve the wear and tear problem of SSDs and extend their lifespan.

[0003] During data deduplication on a solid-state drive (SSD), the deduplication module calculates the fingerprint of the written data using a hash function and attempts to find a matching fingerprint in the fingerprint table to identify whether the current write request is duplicated. When the fingerprint table maintains all fingerprints of the data stored in the SSD, all redundant writes are eliminated. However, the built-in memory space of an SSD is very limited, and the memory overhead of storing all fingerprints is unacceptable. In this case, all fingerprints must be persistently stored in flash memory to achieve the maximum deduplication rate, while some frequently used fingerprints are cached in memory to form a fingerprint cache. The fingerprint cache aims to accelerate fingerprint lookup to mitigate the negative impact of additional I / O overhead on system performance, specifically by reducing fingerprint lookups sent to flash memory and fingerprint migration between memory and flash memory. How the memory fingerprint cache is organized and managed directly affects the lookup overhead of deduplication.

[0004] Existing fingerprint cache management schemes manage fingerprint caches using fixed fingerprint replacement strategies. However, a single and fixed fingerprint management strategy cannot capture the dynamic fingerprint characteristics of all workloads and cannot accurately identify the popularity of fingerprints, resulting in a low fingerprint cache hit rate. Sending a large number of fingerprint looksup requests to flash memory increases deduplication overhead. Summary of the Invention

[0005] In response to the shortcomings and improvement needs of existing technologies, this invention provides a hybrid fingerprint cache management method, controller and system for deduplicated SSDs, with the aim of improving the hit rate of fingerprint cache to reduce deduplication overhead.

[0006] To achieve the above objectives, according to one aspect of the present invention, a hybrid fingerprint cache management method for deduplicated SSDs is provided, comprising:

[0007] A fingerprint cache is maintained in memory, and a fingerprint table is maintained in flash memory. The cache replacement strategy is either a locality-aware strategy or a reference-aware strategy. The fingerprint cache includes multiple fingerprint buckets, and each fingerprint bucket includes an LRU list consisting of multiple fingerprint entries. The fingerprint table manages fingerprints in the form of fingerprint entries. Each fingerprint entry includes the fingerprint of the data, the physical page address, and the address reference count.

[0008] The policy fitness of the cache replacement strategy is calculated periodically, and the cache replacement strategy is switched when the policy fitness is less than a preset threshold. The policy fitness reflects the degree of adaptability between the cache replacement strategy and the load.

[0009] Furthermore, the insertion of data fingerprints includes the following steps:

[0010] (S1) Determine the target fingerprint bucket corresponding to the fingerprint, and determine whether the target fingerprint entry exists in the target fingerprint bucket. If so, update the target fingerprint entry and move it to the head of the LRU list of the target fingerprint bucket, and the insertion ends; otherwise, proceed to step (S2).

[0011] (S2) Create the corresponding fingerprint entry to be inserted, and insert the fingerprint entry to be inserted into the LRU list of the target fingerprint bucket according to the current cache replacement policy.

[0012] Furthermore, the policy fitness of the current periodic cache replacement policy is calculated as follows:

[0013] Calculate the actual benefit (RPB) of the cache replacement strategy in the current cycle. T And according to FPB T =αRPB T +(1-α)FPB T-1 Calculate the projected return FPB for the current period T The difference between the two yields the policy fitness for the current period, FP. T =RPB T -FPB T ;

[0014] Among them, FPB T-1 This represents the predicted return for the previous period, and at the initial time, the predicted return is 0; α is the smoothing constant.

[0015] Furthermore, the actual benefit RPB brought by the current cycle's cache replacement strategy. T This represents the fingerprint cache hit rate within the current period.

[0016] Furthermore, α = 0.7.

[0017] Furthermore, Threshold = -0.02.

[0018] Furthermore, in the fingerprint cache, the hash value of the L-bit prefix in the fingerprint is the fingerprint bucket address;

[0019] Where L = log2(N+1), and N is the total number of fingerprint buckets.

[0020] Furthermore, if the current cache replacement strategy is a locality-aware strategy, then step (S2) includes:

[0021] (S211) Determine whether the target fingerprint bin is full. If so, proceed to step (S212); otherwise, proceed to step (313).

[0022] (S212) Write the fingerprint entry at the end of the LRU list of the target fingerprint bucket back to the flash memory and proceed to step (S213).

[0023] (S213) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted and then proceed to step (S214); otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S214).

[0024] (S214) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket.

[0025] Furthermore, if the current cache replacement strategy is a reference-aware strategy, then step (S2) includes:

[0026] (S221) Determine whether the target fingerprint bin is full. If so, proceed to step (S222); otherwise, proceed to step (S224).

[0027] (S222) Obtain the fingerprint entry with the fewest address reference count in the target fingerprint bucket. If there are multiple fingerprint entries, the fingerprint entry closest to the tail of the LRU list is taken as the sacrifice entry. If there is only one fingerprint entry, it is taken as the sacrifice entry.

[0028] (S223) Write the sacrifice entry back to flash memory;

[0029] (S224) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted and then proceed to step (S225); otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S225).

[0030] (S225) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket.

[0031] According to another aspect of the present invention, a hybrid fingerprint cache management controller for deduplicated SSDs is provided, comprising: a computer-readable storage medium and a processor;

[0032] A computer-readable storage medium contains a computer program;

[0033] The processor is used to read a computer program from a computer-readable storage medium and execute the hybrid fingerprint cache management method for deduplicated SSDs provided by the present invention.

[0034] According to another aspect of the present invention, a deduplication SSD system is provided, comprising: an SSD and the hybrid fingerprint cache management controller for deduplication SSDs provided by the present invention.

[0035] In summary, the above-described technical solutions conceived in this invention can achieve the following beneficial effects:

[0036] (1) This invention employs a locality-aware strategy and a reference-aware strategy to form a hybrid fingerprint cache management strategy. By periodically calculating the fitness between the cache replacement strategy and the characteristics of the load fingerprint, the cache fingerprint strategy is adjusted when the fitness is low. This allows for timely capture of the dynamic fingerprint characteristics of the load, accurate identification of fingerprint heat, and adaptive use of cache replacement algorithms with higher fitness, effectively improving the cache hit rate and reducing the deduplication overhead caused by fingerprint lookup and distribution to flash memory. The hybrid fingerprint cache management strategy of this invention consists of two simple and low-cost cache replacement strategies: the locality-aware strategy is a replacement algorithm based on temporal locality, and the reference-aware strategy is a replacement algorithm based on reference counting. The combination of the two can achieve a high cache hit rate with low overhead. At the same time, this invention implements a two-level fingerprint cache structure through fingerprint buckets. This cache structure enables both cache replacement strategies to be executed efficiently. Therefore, the hybrid fingerprint cache management strategy in this invention avoids the increase of deduplication overhead while ensuring a high cache hit rate.

[0037] (2) In the preferred embodiment of the present invention, the predicted revenue of the current period is calculated based on the exponential smoothing method, and the strategy fitness is further calculated. The quantitative result of the degree of fitness between the current cache replacement strategy and the load fingerprint characteristics can be accurately calculated, which provides an accurate basis for timely adjustment of the cache replacement strategy, effectively improves the cache hit rate, and reduces the deduplication overhead caused by fingerprint lookup being sent to flash memory.

[0038] (3) In the preferred embodiment of the present invention, the smoothing constant is set to α = 0.7. Experimental tests show that this parameter setting can better utilize the temporal locality of the load and calculate the policy fitness more accurately. In the policy fitness discrimination process, the threshold is set to Threshold = -0.02. Experimental tests show that this parameter setting can accurately identify the situation where the cache replacement policy does not match the dynamic characteristics of the load fingerprint, ensuring that the cache replacement policy can be adjusted in a timely and accurate manner and improving the cache hit rate. Attached Figure Description

[0039] Figure 1 This is a flowchart of a hybrid fingerprint cache management method for deduplicated SSDs provided in an embodiment of the present invention;

[0040] Figure 2 This is a schematic diagram of fingerprint storage provided in an embodiment of the present invention;

[0041] Figure 3 The following is a schematic diagram of an application example provided by an embodiment of the present invention; wherein, (a) is the state of fingerprint caching before fingerprinting is executed; (b) is the state of fingerprint caching after the Locality Awareness Policy (LAP) manages the fingerprint caching; and (c) is the state of fingerprint caching after the Reference Awareness Policy (RAP) manages the fingerprint caching. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0043] In this invention, the terms "first," "second," etc. (if present) in the invention and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0044] To address the technical issues of low fingerprint cache hit rate and increased deduplication overhead caused by sending a large number of fingerprint searches to flash memory in existing deduplication SSDs, this invention provides a hybrid fingerprint cache management method, controller, and system for deduplication SSDs. The overall approach includes: using a cache replacement algorithm with low computational overhead and high cache hit rate to construct a hybrid fingerprint cache management strategy, and calculating the policy fitness of the cache replacement algorithm in real time. When the policy fitness is low, the cache replacement algorithm is switched to another cache replacement algorithm to ensure that the dynamic fingerprint characteristics of the load can be captured, and a cache replacement strategy with high fitness is always used to improve the cache hit rate.

[0045] The following is an example.

[0046] Example 1:

[0047] A hybrid fingerprint cache management method for deduplicated SSDs, the process of which is as follows: Figure 1 As shown, it includes:

[0048] The fingerprint cache is maintained in memory, and the fingerprint table is maintained in flash memory.

[0049] Considering that data deduplication in SSDs involves multiple computational steps, each with its own computational overhead, the overhead of fingerprint cache management should be minimized to reduce deduplication overhead. Based on this, this embodiment adopts a locality-aware strategy and a reference-aware strategy to form a hybrid fingerprint cache management strategy. Both of these cache replacement strategies are computationally simple and have low computational overhead. The locality-aware strategy is a replacement algorithm based on temporal locality, and the reference-aware strategy is a replacement algorithm based on reference counting. The combination of the two can achieve a high cache hit rate with relatively low overhead.

[0050] To ensure that the cache replacement strategy adopted by the fingerprint cache can adapt to the dynamic fingerprint characteristics of the load, this embodiment also includes: periodically calculating the policy fitness of the cache replacement strategy, and switching the cache replacement strategy when the policy fitness is less than a preset threshold Threshold; the policy fitness reflects the degree of adaptation between the cache replacement strategy and the load.

[0051] To accurately and efficiently calculate policy fitness, this embodiment employs exponential smoothing during the calculation process. The specific calculation method is as follows:

[0052] Calculate the actual benefit (RPB) of the cache replacement strategy in the current cycle. T Considering that the total number of requests within each time window may vary greatly, the number of fingerprint cache hits within each time window will also vary greatly, while the cache hit rate is relatively stable. Therefore, as a preferred implementation method, this embodiment quantifies the actual benefit brought by the cache replacement strategy in the current period as the fingerprint cache hit rate in the current period to ensure the accuracy of the prediction.

[0053] Calculate the projected return FPB for the current period using exponential smoothing. T The calculation formula is FPB T =αRPB T +(1-α)FPB T-1 FPB T-1 This represents the predicted return for the previous period, and at the initial time, the predicted return is 0; α is the smoothing constant.

[0054] The actual benefit RPB brought by the current period's cache replacement strategy.T Compared with the projected return FPB for the current cycle T The difference is calculated to obtain the policy fitness of the current cache replacement policy: FP T =RPB T -FPB T In this embodiment, the calculated strategy fitness is negative. When the difference between the actual return and the predicted return is large, the strategy fitness value is small, indicating that the actual return does not meet the expected return and a switch to cache replacement strategy is required.

[0055] The research conducted by this invention found that setting the smoothing constant α to 0.7 in the above calculation can better utilize the temporal locality of the load and more accurately calculate the policy fitness. The main reason is that, based on the temporal locality of the load, the load characteristics of two adjacent periods will be more similar, and the real-time policy benefit of the current period should be given greater weight. When the threshold value is -0.02, it can accurately identify situations where the cache replacement policy does not match the dynamic characteristics of the load fingerprint, ensuring that the cache replacement policy can be adjusted in a timely and accurate manner, thereby improving the cache hit rate.

[0056] Based on the above findings, as a preferred implementation, in this embodiment, the smoothing constant is set to α = 0.7 and the threshold is Threshold = -0.02.

[0057] To facilitate rapid switching of cache replacement strategies in practical applications, an access characteristic flag, `access_flag`, is set in this embodiment to indicate the currently used cache replacement strategy. If `access_flag` is 0, the fingerprint replacement strategy is the Locality Awareness Policy (LAP); if `access_flag` is 1, the fingerprint replacement strategy is the Reference Awareness Policy (RAP). Optionally, in this embodiment, `access_flag` is initially set to 0; when a switch of cache replacement strategies is required, the access characteristic flag is updated according to `access_flag = 1 – access_flag`.

[0058] To ensure efficient cache replacement even after a change in the cache replacement algorithm, this embodiment designs a two-level cache structure, such as... Figure 2 As shown, the fingerprint cache includes multiple fingerprint buckets, each fingerprint bucket includes an LRU linked list consisting of multiple fingerprint entries; the total number of fingerprint buckets is N, and the capacity of each fingerprint bucket is M. M and N can be set according to the actual load characteristics.

[0059] Fingerprint tables manage fingerprints in the form of fingerprint entries;

[0060] Each fingerprint entry includes the fingerprint of the data, the physical page address, and the address reference count; where the physical page address is the physical page address of the data in the flash memory, and the address reference count is the number of logical addresses pointing to the data;

[0061] Based on the above fingerprint caching structure and cache fingerprint management strategy, the insertion of data fingerprints in this embodiment includes the following steps:

[0062] (S1) Determine the target fingerprint bucket corresponding to the fingerprint and determine whether the target fingerprint bucket contains the corresponding target fingerprint entry. If so, update the target fingerprint entry and move it to the head of the LRU list of the target fingerprint bucket. The update method is to update the fingerprint in the target fingerprint entry to the fingerprint to be inserted and increment the address reference count in the target fingerprint entry by 1. The insertion ends; otherwise, proceed to step (S2).

[0063] To facilitate rapid location of the fingerprint bucket corresponding to the fingerprint and ensure high cache space utilization, as a preferred implementation, in this embodiment, the hash value of the L-bit prefix in the fingerprint is used as the fingerprint bucket address; L = log2(N+1);

[0064] Optionally, the algorithm for calculating the hash value of the fingerprint prefix is ​​a modulo operation, i.e., bucket address bucketID = (Fprefix) mod N; Fprefix represents the fingerprint prefix, and mod represents the modulo operation;

[0065] The above method for calculating bucket addresses is simple, efficient, covers every hash bucket, and has few collisions.

[0066] (S2) Create the corresponding fingerprint entry to be inserted, and insert the fingerprint entry to be inserted into the LRU list of the target fingerprint bucket according to the current cache replacement policy.

[0067] In this embodiment, if the current cache replacement policy is the Locality Awareness Policy (LAP), then step (S2) includes:

[0068] (S211) Determine whether the target fingerprint bucket is full. If so, it means that cache replacement is required, and proceed to step (S212); otherwise, proceed to step (313).

[0069] (S212) Write the fingerprint entry at the end of the LRU list of the target fingerprint bucket back to the flash memory and proceed to step (S213).

[0070] (S213) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted and then proceed to step (S214); otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S214).

[0071] (S214) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket;

[0072] To make the execution process of the different cache replacement strategies clearer, the following explanation will be provided with a specific application example. Figure 3 Figure (a) shows the state of the fingerprint cache after running for a period of time, which includes two fingerprint buckets, namely Bucket0 and Bucket1. The letter in each element in the bucket represents the fingerprint of the data, and the number after the fingerprint corresponds to the prefix value of the fingerprint. At this time, a fingerprint sequence FP = {I9 A1 J10 K11 D4 L12} is reached. Similarly, the letter represents the fingerprint, and the number after the letter corresponds to the prefix value of the fingerprint.

[0073] Figure 3 (b) illustrates the specific process of LAP performing fingerprint insertion in the fingerprint sequence:

[0074] When executing fingerprint I9, first perform modulo calculation based on the fingerprint prefix value (9) to obtain the target fingerprint bucket bucket1 (9 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint G at the end of the fingerprint list back to the flash fingerprint table, insert the fingerprint I at the head of the fingerprint list, and initialize the address reference count to 1.

[0075] When executing fingerprint A1, first perform modulo calculation based on the fingerprint prefix value (1) to obtain the target fingerprint bucket bucket1 (1 mod 2). Then check if the target fingerprint exists in the bucket. If it does, increment the reference count of the target fingerprint entry address by 1 and move the target fingerprint entry to the head of the fingerprint chain.

[0076] When executing fingerprint J10, first perform modulo calculation based on the fingerprint prefix value (10) to obtain the target fingerprint bucket bucket0 (10 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint H at the end of the fingerprint list back to the flash fingerprint table, insert the fingerprint J at the head of the fingerprint list, and initialize the address reference count to 1.

[0077] When executing fingerprint K11, first perform modulo calculation based on the fingerprint prefix value (11) to obtain the target fingerprint bucket bucket1 (11 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint E at the end of the fingerprint list back to the flash fingerprint table, insert the fingerprint K at the head of the fingerprint list, and initialize the address reference count to 1.

[0078] When executing fingerprint D4, first perform modulo calculation based on the fingerprint prefix value (4) to obtain the target fingerprint bucket 0 (4 mod 2). Then check if the target fingerprint exists in the bucket. If it does, increment the reference count of the target fingerprint entry address by 1 and move the target fingerprint entry to the head of the fingerprint chain.

[0079] When executing fingerprint L12, first perform modulo calculation based on the fingerprint prefix value (12) to obtain the target fingerprint bucket bucket0 (12 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint F at the end of the fingerprint list back to the flash fingerprint table, insert the fingerprint L at the head of the fingerprint list, and initialize the address reference count to 1.

[0080] In this embodiment, if the current cache replacement policy is a reference-aware policy (RAP), then step (S2) includes:

[0081] (S221) Determine whether the target fingerprint bucket is full. If so, it means that cache replacement is required, and proceed to step (S222); otherwise, proceed to step (S224).

[0082] (S222) Obtain the fingerprint entry with the fewest address reference count in the target fingerprint bucket. If there are multiple fingerprint entries, the fingerprint entry closest to the tail of the LRU list is taken as the sacrifice entry. If there is only one fingerprint entry, it is taken as the sacrifice entry.

[0083] (S223) Write the sacrifice entry back to flash memory;

[0084] (S224) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted. The update method is to increment the address reference count in the corresponding fingerprint entry in the flash memory by 1 and then assign it to the address reference count in the fingerprint entry to be inserted. Then proceed to step (S225). Otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S225).

[0085] (S225) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket.

[0086] exist Figure 3 In the state shown in (a), the specific process of RAP executing each fingerprint in the fingerprint sequence is as follows: Figure 3 As shown in (c) in the figure, the specific details are as follows:

[0087] When executing fingerprint I9, first perform modulo calculation based on the fingerprint prefix value (9) to obtain the target fingerprint bucket bucket1 (9 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint A with the fewest address references in the fingerprint bucket and close to the tail of the fingerprint chain back to the flash fingerprint table. Insert fingerprint I into the head of the fingerprint chain and initialize the address reference count to 1.

[0088] When executing fingerprint A1, first perform modulo calculation based on the fingerprint prefix value (1) to obtain the target fingerprint bucket bucket1 (1 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint I with the fewest address references in the fingerprint bucket and the one closest to the tail of the fingerprint chain back to the flash fingerprint table. Insert fingerprint A into the head of the fingerprint chain and initialize the address reference count to 1.

[0089] When executing fingerprint J10, first perform modulo calculation based on the fingerprint prefix value (10) to obtain the target fingerprint bucket bucket0 (10 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint D with the fewest address references in the fingerprint bucket and close to the tail of the fingerprint list back to the flash fingerprint table. Insert fingerprint J into the head of the fingerprint list and initialize the address reference count to 1.

[0090] When executing fingerprint K11, first perform modulo calculation based on the fingerprint prefix value (11) to obtain the target fingerprint bucket bucket1 (11 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint A with the fewest address references in the fingerprint bucket and close to the tail of the fingerprint list back to the flash fingerprint table. Insert fingerprint K into the head of the fingerprint list and initialize the address reference count to 1.

[0091] When executing fingerprint D4, first perform modulo calculation based on fingerprint prefix value (4) to obtain target fingerprint bucket 0 (4 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint J with the fewest address references in the fingerprint bucket and close to the tail of the fingerprint list back to the flash fingerprint table. Insert fingerprint D into the head of the fingerprint list and initialize the address reference count to 1.

[0092] When executing fingerprint L12, first perform modulo calculation based on the fingerprint prefix value (12) to obtain the target fingerprint bucket bucket0 (12 mod 2). Then check if the target fingerprint exists in the bucket. If not, then determine if the fingerprint bucket is full. If it is full, then write the fingerprint D with the fewest address references in the fingerprint bucket and close to the tail of the fingerprint list back to the flash fingerprint table. Insert fingerprint L into the head of the fingerprint list and initialize the address reference count to 1.

[0093] In summary, this embodiment can adaptively select different fingerprint replacement strategies based on the dynamic fingerprint characteristics of the load when managing the fingerprint cache, maximizing the benefits of fingerprint caching and reducing fingerprint lookup overhead. The Locality Awareness (LAP) strategy utilizes the temporal locality of fingerprints to select the least recently used fingerprint for writing back to the flash fingerprint table, avoiding frequent migration of recently accessed fingerprints and increasing lookup overhead. The Reference Awareness (RAP) strategy selects the fingerprint with the fewest address references based on the number of fingerprint address references for writing back to the flash fingerprint table, greatly reducing fingerprint lookup overhead.

[0094] Example 2:

[0095] A hybrid fingerprint cache management controller for deduplicated SSDs includes: a computer-readable storage medium and a processor;

[0096] A computer-readable storage medium contains a computer program;

[0097] The processor is used to read the computer program in the computer-readable storage medium and execute the hybrid fingerprint cache management method for deduplicated SSDs provided in Embodiment 1 above.

[0098] Example 3:

[0099] A deduplication SSD system includes: an SSD and a hybrid fingerprint cache management controller for deduplication SSDs provided in Embodiment 2 above.

[0100] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A hybrid fingerprint cache management method for deduplicated SSDs, characterized in that, include: A fingerprint cache is maintained in memory, and a fingerprint table is maintained in flash memory. The cache replacement strategy is either a locality-aware strategy or a reference-aware strategy. The fingerprint cache includes multiple fingerprint buckets, and each fingerprint bucket includes an LRU list consisting of multiple fingerprint entries. The fingerprint table manages fingerprints in the form of fingerprint entries. Each fingerprint entry includes the fingerprint of the data, the physical page address, and the address reference count. Periodically calculate the policy fitness of the cache replacement strategy, and when the policy fitness falls below a preset threshold... Threshold The cache replacement strategy is switched in real time; the strategy fitness reflects the degree of adaptation between the cache replacement strategy and the load. Furthermore, the insertion of data fingerprints includes the following steps: (S1) Determine the target fingerprint bucket corresponding to the fingerprint, and determine whether the target fingerprint bucket contains a corresponding target fingerprint entry. If so, update the target fingerprint entry and move it to the head of the LRU list of the target fingerprint bucket, and the insertion ends; otherwise, proceed to step (S2). (S2) Create the corresponding fingerprint entry to be inserted, and insert the fingerprint entry to be inserted into the LRU list of the target fingerprint bucket according to the current cache replacement policy; The fitness of the current periodic cache replacement strategy is calculated as follows: Calculate the actual benefits of the cache replacement strategy in the current cycle. RPB T and according to FPB T = αRPB T + (1- α ) FPB T-1 Calculate the projected return for the current period FPB T Subtracting the two yields the policy fitness for the current period. FP T = RPB T - FPB T ; in, FPB T-1 This represents the predicted return for the previous period, and at the initial moment, the predicted return is 0. α The smoothing constant; the actual benefit of the cache replacement strategy in the current cycle. RPB T This represents the fingerprint cache hit rate within the current period.

2. The hybrid fingerprint cache management method for deduplicated SSDs as described in claim 1, characterized in that, α =0.7。 3. The hybrid fingerprint cache management method for deduplicated SSDs as described in claim 1, characterized in that, Threshold = -0.02。 4. The hybrid fingerprint cache management method for deduplicated SSDs as described in any one of claims 1 to 3, characterized in that, In the fingerprint cache, the fingerprint has a length of L The hash value of the bit prefix is ​​the fingerprint bucket address; in, L =log2( N +1), N This represents the total number of fingerprint bins.

5. The hybrid fingerprint cache management method for deduplicated SSDs as described in claim 4, characterized in that, If the current cache replacement strategy is a locality-aware strategy, then step (S2) includes: (S211) Determine whether the target fingerprint bin is full. If so, proceed to step (S212); otherwise, proceed to step (313). (S212) Write the fingerprint entry at the end of the LRU list of the target fingerprint bucket back to the flash memory, and proceed to step (S213). (S213) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted and then proceed to step (S214); otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S214). (S214) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket.

6. The hybrid fingerprint cache management method for deduplicated SSDs as described in claim 4, characterized in that, If the current cache replacement strategy is a reference-aware strategy, then step (S2) includes: (S221) Determine whether the target fingerprint bin is full. If yes, proceed to step (S222); otherwise, proceed to step (S224). (S222) Obtain the fingerprint entry with the fewest address reference count in the target fingerprint bucket. If there are multiple fingerprint entries, the fingerprint entry closest to the tail of the LRU list is taken as the sacrifice entry. If there is only one fingerprint entry, it is taken as the sacrifice entry. (S223) Write the sacrifice entry back to flash memory; (S224) Search for the fingerprint to be inserted in the fingerprint table. If the search is successful, update the address reference count in the fingerprint entry to be inserted and then proceed to step (S225); otherwise, initialize the address reference count in the target fingerprint entry to 1 and then proceed to step (S225). (S225) Insert the fingerprint entry to be inserted into the head of the LRU list of the target fingerprint bucket.

7. A hybrid fingerprint cache management controller for deduplicated SSDs, characterized in that, include: Computer-readable storage media and processors; The computer-readable storage medium stores a computer program; The processor is used to read the computer program in the computer-readable storage medium and execute the hybrid fingerprint cache management method for deduplicated SSDs as described in any one of claims 1 to 6.

8. A deduplication SSD system, characterized in that, include: SSD and the hybrid fingerprint cache management controller for deduplicated SSDs as described in claim 7.

Citation Information

Patent Citations

  • Fingerprint storage method based on persistent memory

    CN114968103A

  • Merging buffered fingerprint index entries

    US20210133174A1