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

improvement: decrease dagstore startup time #2184

Closed
distractedm1nd opened this issue May 10, 2023 · 2 comments
Closed

improvement: decrease dagstore startup time #2184

distractedm1nd opened this issue May 10, 2023 · 2 comments
Assignees
Labels
area:shares Shares and samples bug Something isn't working kind:discussion

Comments

@distractedm1nd
Copy link
Member

Current dagstore time is unsustainable due to a sync startup and slow, unindexed storage backends. The solution space is split up into two kinds of solutions:

  1. Keep a sync startup, but make loading fast enough that loading hundreds of millions of blocks will take under 2 minutes
  2. Develop async startup, allows us to keep the same storage backend

The big question here is how much of a speedup #1 can provide us. This is currently being benchmarked and I will update this issue soon with the results.

If we cannot speed it up enough even with a different backend, we should go for an async startup. This is a bit more complicated and there are many ways to do this, which I will elaborate on once I finish collecting the benchmarks for solution 1. It will be pretty challenging to implement, and add a lot of unwanted complexity, but it may be necessary long term

@distractedm1nd distractedm1nd added bug Something isn't working area:shares Shares and samples labels May 10, 2023
@distractedm1nd distractedm1nd self-assigned this May 10, 2023
@distractedm1nd
Copy link
Member Author

Updating this issue:

  • I don't think this will be a relevant issue for long, so no need for complex solutions. Once pruning is implemented, this is a non-issue.
  • A lot of the startup time came from debug logs (3-4x!), which are now deactivated
  • Multiple backends have been tested, LevelDB for example cuts the time in half but currently has issues on macos
  • We should definitely keep the sync startup. If we didn't have pruning, this would be problematic

According to napkin math, we have about 1.5 years of blocks before nodes will start needing 2 minutes to start up. So, we should implement pruning by then. If it isn't implemented, we should increase the default timeout again.

@ramin
Copy link
Collaborator

ramin commented Dec 18, 2023

closing for pruning as solution

@ramin ramin closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples bug Something isn't working kind:discussion
Projects
None yet
Development

No branches or pull requests

2 participants