IP Library Granted Patent US 12,204,800
Granted Patent B2
US 12,204,800 · App. 17/732,065 · Granted Jan 21, 2025

Prefetching keys for garbage collection

Inventors: Anil Paul Thoppil (Pleasanton, CA); Wei Sun (Boulder, CO); Meera Odugoudar (Milpitas, CA); Szu-Wen Kuo (Taipei, TW); Santhosh Selvaraj (San Jose, CA)
Assignee: NetApp, Inc.
G06F3/068G06F12/0253G06F3/0602G06F3/0652
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,204,800
App. No.
17/732,065
Granted
Jan 21, 2025
Kind
B2
Abstract

Techniques are provided for implementing a garbage collection process and a prediction read ahead mechanism to prefetch keys into memory to improve the efficiency and speed of the garbage collection process. A log structured merge tree is used to store keys of key-value pairs within a key-value store. If a key is no longer referenced by any worker nodes of a distributed storage architecture, then the key can be freed to store other data. Accordingly, garbage collection is performed to identify and free unused keys. The speed and efficiency of garbage collection is improved by dynamically adjusting the amount and rate at which keys are prefetched from disk and cached into faster memory for processing by the garbage collection process.

Claims (62)

1. A system, comprising:

a distributed storage architecture including a plurality of worker nodes managing distributed storage comprised of storage devices hosted by the plurality of worker nodes; and

a worker node of the distributed storage architecture owning key value pairs of a key value store hosted within the distributed storage, wherein the worker node:

performs garbage collection rounds of a garbage collection process, wherein during a first garbage collection ground, the worker node:

receives a first set of probabilistic structures from the plurality of worker nodes, wherein the first set of probabilistic structures provide indications of keys that are in-use by the plurality of worker nodes;

compares the first set of probabilistic structures to a first set of keys of the key value pairs owned by the worker node to identify unused keys within the first set of keys that are not indicated by at least one probabilistic structure; and

frees key value pairs associated with the unused keys within the first set of keys; and

predicts, using a predictive read ahead mechanism, a second set of keys that will be evaluated during a second garbage collection round subsequent the first garbage collection round, wherein the second set of keys are pre-fetched from the storage devices and are cached into memory for evaluation during the second garbage collection round.

2. The system of claim 1 , wherein during the second garbage collection round, the worker node:

receives a second set of probabilistic structures from the plurality of worker nodes, wherein the second set of probabilistic structures provide indications of keys that are in-use by the plurality of worker nodes at a point in time when the second set of probabilistic structures were created;

compares the second set of probabilistic structures to the second set of keys pre-fetched and cached within the memory to identify unused keys within the second set of keys that are not indicated by at least one probabilistic structure of the second set of probabilistic structures; and

frees key value pairs associated with the unused keys within the second set of keys.

3. The system of claim 1 , wherein the worker node:

monitors a rate at which probabilistic structures are being received by the garbage collection process; and

selects an amount of keys for inclusion within the second set of keys based upon the rate at which the probabilistic structures are being received by the garbage collection process.

4. The system of claim 1 , wherein the worker node:

monitors disk latency of the storage devices; and

selects an amount of keys for inclusion within the second set of keys based upon the disk latency of the storage devices.

5. The system of claim 1 , wherein the worker node:

implements a feedback loop to collect operational statistics associated with performing garbage collection of the key value store; and

compares the operational statistics to a rate of prefetching and caching keys into memory in order to select an amount of keys for inclusion within the second set of key.

6. The system of claim 5 , wherein the operational statistics correspond to at least one of an amount of unused keys being garbage collected, access patterns of the key value store, a fullness of the key value store, a timespan between garbage collection rounds, or a total time to complete a garbage collection round.

7. The system of claim 1 , wherein the worker node:

monitors a rate of delete operations being performed upon the key value store; and

selects an amount of keys for inclusion within the second set of keys based upon the rate of the delete operations being performed.

8. The system of claim 1 , wherein the worker node:

monitors a rate at which probabilistic structures are being validated by the garbage collection process; and

selects an amount of keys for inclusion within the second set of keys based upon the rate at which the probabilistic structures are being validated by the garbage collection process.

9. The system of claim 1 , wherein the worker node:

dynamically adjusts amounts of keys pre-fetched and cached within the memory based upon a rate of processing probabilistic structures.

10. The system of claim 1 , comprising:

a slice service generating probabilistic structures used to indicate in-use keys of the distributed storage that are used to store data, wherein a rate of the slice service sending the probabilistic structures to the garbage collection process is used by the predictive read ahead mechanism to determine a rate and amount of keys to pre-fetch.

11. The system of claim 1 , comprising:

a block service, hosted by the worker node, managing bins of keys owned by the worker node, wherein a rate of the block service receiving probabilistic structures from slice slices of other worker nodes is used by the predictive read ahead mechanism to determine a rate and amount of keys to pre-fetch.

12. The system of claim 1 , wherein the worker node:

in response to determining that a latency of accessing the storage devices exceed a threshold, selects an amount of keys as the second set of keys that is larger than an amount of keys of the first set of keys.

13. The system of claim 1 , wherein the worker node:

in response to determining that a rate at which probabilistic structures are being validated by the garbage collection process exceeds a threshold, selects an amount of keys as the second set of keys that is larger than an amount of keys of the first set of keys.

14. The system of claim 1 , wherein the worker node:

in response to determining that a rate at which delete operations are being processed and resulting in unused keys exceeds a threshold, selects an amount of keys as the second set of keys that is larger than an amount of keys of the first set of keys.

15. A method comprising:

implementing a feedback loop to collect operational statistics associated with performing garbage collection for a key value store hosted within distributed storage of a distributed storage architecture including a plurality of worker nodes managing the distributed storage comprised of storage devices hosted by the plurality of worker nodes;

comparing the operational statistics to a rate of prefetching and caching keys into memory in order to select an amount of keys to pre-fetch from the storage devices and cache within the memory for a next garbage collection round;

pre-fetching and caching the amount of keys as a set of keys within the memory; and

performing the next garbage collection round comprising:

receiving a set of probabilistic structures from the plurality of worker nodes, wherein the set of probabilistic structures provide indications of keys that are in-use by the plurality of worker nodes;

comparing the set of probabilistic structures to the set of keys cached within the memory to identify unused keys within the set of keys that are not indicated by at least one probabilistic structure; and

freeing key value pairs associated with the unused keys within the set of keys.

16. The method of claim 15 , comprising:

dynamically adjusting amounts of keys pre-fetched and cached within the memory for subsequent garbage collection rounds based upon a rate of processing probabilistic structures.

17. The method of claim 15 , comprising:

dynamically adjusting amounts of keys pre-fetched and cached within the memory for subsequent garbage collection rounds based upon a rate of delete operations being performed upon the key value store.

18. The method of claim 15 , comprising:

dynamically adjusting amounts of keys pre-fetched and cached within the memory for subsequent garbage collection rounds based upon disk latency of the storage devices.

19. A non-transitory machine readable medium comprising instructions, which when executed by a machine, causes the machine to:

evaluate operational statistics associated with performing garbage collection of a key value store hosted within distributed storage of a distributed storage architecture including a plurality of worker nodes managing the distributed storage comprised of storage devices hosted by the plurality of worker nodes to select an amount of keys to pre-fetch from the storage devices and cache within memory for a garbage collection round;

pre-fetch and caching the amount of keys as a set of keys within the memory; and

perform the garbage collection round comprising:

receiving a set of probabilistic structures from the plurality of worker nodes, wherein the set of probabilistic structures provide indications of keys that are in-use by the plurality of worker nodes;

comparing the set of probabilistic structures to the set of keys cached within the memory to identify unused keys within the set of keys that are not indicated by at least one probabilistic structure; and

freeing key value pairs associated with the unused keys within the set of keys.

20. The non-transitory machine readable medium of claim 19 , wherein the operational statistics correspond to at least one of an amount of unused keys being garbage collected, access patterns of the key value store, a fullness of the key value store, a timespan between garbage collection rounds, a total time to complete a garbage collection round.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 5, 2022
From: THOPPIL, ANIL PAUL; SUN, WEI; ODUGOUDAR, MEERA; KUO, SZU-WEN; SELVARAJ, SANTHOSH
To: NETAPP INC.
Reel/Frame 061314/0640 →
Continuity (1)
Related Publication 20230350610A1 · Nov 2, 2023
References Cited (23)
US 11023318B1 · Volkov et al. · 2021 [cited by applicant]
US 11971859B2 · Thoppil et al. · 2024 [cited by applicant]
US 20200192940A1 · Tomlinson · 2020 [cited by applicant]
US 20200201821A1 · Wang et al. · 2020 [cited by applicant]
US 20200320081A1 · Fanghaenel et al. · 2020 [cited by applicant]
US 20210067332A1 · Roy et al. · 2021 [cited by applicant]
US 20210397345A1 · Jawahar et al. · 2021 [cited by applicant]
US 20220156087A1 · Karr · 2022 [cited by examiner]
US 20220156231A1 · Wang · 2022 [cited by examiner]
US 20220382760A1 · Pang et al. · 2022 [cited by applicant]
US 20230350810A1 · Thoppil et al. · 2023 [cited by applicant]
US 20230350850A1 · Thoppil et al. · 2023 [cited by applicant]
US 20240281411A1 · Thoppil et al. · 2024 [cited by applicant]
Final Office Action mailed on Feb. 16, 2024 for U.S. Appl. No. 17/732,098, filed Apr. 28, 2022, 32 pages. [cited by applicant]
Non-Final Office Action mailed on Aug. 3, 2023 for U.S. Appl. No. 17/732,046, filed Apr. 28, 2022, 13 pages. [cited by applicant]
Fei Mei, et al.; LSM-tree Managed Storage for Large-Scale Key-Value Store; 15 Pgs. [cited by applicant]
Alexander Conway; Understanding Dictionaries at the Intersection of Theory and Practice; Oct. 2020; 145 Pgs. [cited by applicant]
Notice of Allowance mailed on Mar. 28, 2024 for U.S. Appl. No. 17/732,046, filed Apr. 28, 2022, 04 pages. [cited by applicant]
Non-Final Office Action mailed on Sep. 28, 2023 for U.S. Appl. No. 17/732,098, filed Apr. 28, 2022, 28 pages. [cited by applicant]
Notice of Allowance mailed on Nov. 28, 2023 for U.S. Appl. No. 17/732,046, filed Apr. 28, 2022, 7 pages. [cited by applicant]
Non Final Office Action mailed Jun. 11, 2024 for U.S. Appl. No. 17/732,098, filed Apr. 28, 2022, 39 pages. [cited by applicant]
Final Office Action mailed on Sep. 17, 2024 for U.S. Appl. No. 17/732,098, filed Apr. 28, 2022, 37 pages. [cited by applicant]
Notice of Allowance mailed on Dec. 4, 2024 for U.S. Appl. No. 17/732,098, filed Apr. 28, 2022, 11 pages. [cited by applicant]
Cited By (1)
US 12,536,141