Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dagstore: quota allocation for transients directory and watermark-based GC #7122

Closed
raulk opened this issue Aug 18, 2021 · 1 comment
Closed
Labels
area/dagstore area/markets Area: Markets kind/feature Kind: Feature LM-tech-debt P2 P2: Should be resolved team/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs

Comments

@raulk
Copy link
Member

raulk commented Aug 18, 2021

Context

The dagstore fetches unsealed pieces from the storage subsystem of Lotus into the transients directory whenever it needs to serve a retrieval. Once the retrieval completes, the refcount on the transient decreases, and when it's down to 0, it becomes eligible for reclaim (i.e. deletion) by the GC algorithm.

GC currently runs every minute by default (frequency can be configured through the [Dagstore] section of config.toml), effectively pruning away unreferenced files almost immediately.

This strategy is fail-safe, but it's rather inefficient:

  1. if a new retrieval deal for the same piece comes shortly thereafter, it'll need to be refetched from the storage cluster.
  2. makes inefficient use of local storage.
  3. it produces more filesystem churn than necessary.
  4. the transients directory can grow unbounded when faced with high retrieval concurrency.

Proposal

  1. Turn the transients directory into an LRU/LFU cache, with an explicit quota assignment (e.g. 100GiB) so that storage providers can place a limit on how much the transients directory is allowed to take up.
  2. Manage the usage through a mechanism of watermarks, e.g. prune LRU/LFU transients when usage goes above N threshold.
  3. Park/queue shard acquisitions with insufficient quota.

References

filecoin-project/dagstore#65

@raulk raulk added this to the v1.11.3 milestone Aug 18, 2021
@raulk raulk added P2 P2: Should be resolved team/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs kind/feature Kind: Feature labels Aug 18, 2021
@jennijuju jennijuju removed this from the v1.11.3 milestone Oct 19, 2021
@rjan90 rjan90 added this to the LM-Tech-Debt-Legacy-Markets milestone Mar 24, 2023
@rjan90 rjan90 moved this to Dagstore in Lotus-Miner-V2 Mar 24, 2023
@rjan90 rjan90 moved this from Dagstore to 🛑 Removed/Closed/Invalid/Outdated in Lotus-Miner-V2 Mar 29, 2023
@rjan90
Copy link
Contributor

rjan90 commented May 30, 2023

Closing this issue as outdated on the lotus-miner side of things. This issue is related to the legacy markets code in the Lotus-Miner which will be deprecated.

Boost has been working on designing, building, and testing a new Local Index Directory which will replace the dagstore which this issue is related to. X-posting the message from their announcement channel:

📣 Coming soon: Yugabyte database for the new Local Index Directory (LID) 📣 **
As you may know, we have been working on designing, building, and testing a new Local Index Directory which will replace the dagstore. Many of you have reported problems with the dagstore, and migrating to use LID will help resolve these issues. The LID introduces a horizontally scalable backend database for storing the data - YugabyteDB. We would love to get your input and feedback on these changes - feel free to raise them in Boost discussion or reach out in this slack channel.

How this benefits SPs!

  • We are no longer relying on the dagstore!
    • Increased visibility into the state of your sectors and indexes
  • Improved coordination between Lotus and Boost (Lotus will also leverage YugabyteDB)
    • built-in UI and admin panel for YugabyteDB for easy management
  • Enables scalability for SPs storing client data.

What’s next?

  • The Boost team has completed migration of our two production miners to LID, and we will be monitoring for any issues that come up. 📊
    • We will work with other early adopter SPs and Lotus TSEs to try this out! 🎉
  • We are working on documentation and migration tools, and will announce when it is ready for all SPs to migrate to LID.
  • Again, we’d love to hear directly from you. Please let us know your input and feedback in Boost discussion, or reach out in #boost-help.

@rjan90 rjan90 closed this as completed May 30, 2023
@github-project-automation github-project-automation bot moved this from 🛑 Removed/Closed/Invalid/Outdated to 👀 In Review in Lotus-Miner-V2 May 30, 2023
@rjan90 rjan90 moved this from 👀 In Review to 🛑 Removed/Closed/Invalid/Outdated in Lotus-Miner-V2 May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dagstore area/markets Area: Markets kind/feature Kind: Feature LM-tech-debt P2 P2: Should be resolved team/ignite Issues and PRs being tracked by Team Ignite at Protocol Labs
Projects
Status: 🛑 Removed/Closed/Invalid/Outdated
Development

No branches or pull requests

3 participants