Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

docs: Update on --limit-ledger-size and ledger disk usage#30002

Merged
steviez merged 1 commit intosolana-labs:masterfrom
steviez:docs_ledger_disk
Feb 16, 2023
Merged

docs: Update on --limit-ledger-size and ledger disk usage#30002
steviez merged 1 commit intosolana-labs:masterfrom
steviez:docs_ledger_disk

Conversation

@steviez
Copy link
Copy Markdown
Contributor

@steviez steviez commented Jan 31, 2023

Problem

The current documentation fails to call out that some items go under the ledger directory by default. If this is the case, then the stated 500 GB number will most certainly be exceeded.

Summary of Changes

Add some additional details so that operators aren't immediately given false expectations about disk footprint of the ledger.

#26651 made it so space used by blockstore is kept in check better; but it is arguable that #23248 is still an issue given that with default args, ledger will grow past 500 GB with blockstore / accounts / accounts index / snapshots.

Fixes #

Comment on lines +331 to +342
The default value attempts to keep the blockstore (data within the rocksdb
directory) disk usage under 500GB. More or less disk usage may be requested
by adding an argument to `--limit-ledger-size` if desired. More information
about selecting a custom limit value is [available
here]https://github.com/solana-labs/solana/blob/aa72aa87790277619d12c27f1ebc864d23739557/core/src/ledger_cleanup_service.rs#L26-L37).

Note that the above target of 500 GB does not account for other items that
may reside in the `ledger` directory, depending on validator configuration.
These items may include (but are not limited to):
- Persistent accounts data
- Persistent accounts index
- Snapshots (both full and/or incremental)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old comments don't call out that other stuff gets lumped in ledger. I called those out specifically as those are the largest items that I'm aware of that might end up under ledger.

That being said, a new operator would probably like to have some idea about the size of these. The aspects that make this tricky are that:

  1. The size of snapshots / accounts / accounts index will vary by cluster
  2. The size of above items all grow as number of accounts grow
  3. Other config options could make these vary (ie number of snapshots to retain)

As a result, I'm reluctant to put a static value as it will become out of date. Even if we choose a number for each cluster, those numbers will get out of date (even if we over-estimate).

Idk, maybe we should overestimate and have a recurring chore to update numbers on some interval. Curious to here other's thoughts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's good to clarify what is included in the 500 GB and what is not, but I think ultimately validator owners would like to know how much storage size is considered enough.

Do we also want to provide size estimations for the items that you list above?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but I think ultimately validator owners would like to know how much storage size is considered enough.

Agreed, but again, I'm worried about this information becoming out of date. I think not providing the information is arguably better than having outdated information. I don't think there is anything we could point to that would allow someone to get current numbers for each cluster.

But, having something would be nice which is why I included two reviewers to brainstorm on what is otherwise a minor doc update 😉

Comment thread docs/src/running-validator/validator-start.md
brooksprumo
brooksprumo previously approved these changes Jan 31, 2023
Copy link
Copy Markdown
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with nits

Comment thread docs/src/running-validator/validator-start.md Outdated
Comment thread docs/src/running-validator/validator-start.md Outdated
Comment thread docs/src/running-validator/validator-start.md Outdated
The current documentation fails to call out that some items go under the
ledger directory by default. If this is the case, then the stated 500 GB
number will most certainly be exceeded.
@mergify mergify Bot dismissed brooksprumo’s stale review January 31, 2023 17:39

Pull request has been modified.

@github-actions github-actions Bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Feb 15, 2023
@steviez steviez removed the stale [bot only] Added to stale content; results in auto-close after a week. label Feb 16, 2023
@steviez
Copy link
Copy Markdown
Contributor Author

steviez commented Feb 16, 2023

Per new merge rule, I need another ship it (first one dismissed). Any chance I can get a second look @brooksprumo & @yhchiang-sol ?

Copy link
Copy Markdown
Contributor

@yhchiang-sol yhchiang-sol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG!

@steviez steviez merged commit a09b044 into solana-labs:master Feb 16, 2023
@steviez steviez deleted the docs_ledger_disk branch February 16, 2023 16:37
@steviez steviez added the v1.15 (abandoned) The v1.15 branch has been abandoned label Feb 16, 2023
mergify Bot pushed a commit that referenced this pull request Feb 16, 2023
The current documentation fails to call out that some items go under the
ledger directory by default. If this is the case, then the stated 500 GB
number will most certainly be exceeded.

(cherry picked from commit a09b044)
steviez pushed a commit that referenced this pull request Feb 16, 2023
…kport of #30002) (#30369)

docs: Update on --limit-ledger-size and ledger disk usage (#30002)

The current documentation fails to call out that some items go under the
ledger directory by default. If this is the case, then the stated 500 GB
number will most certainly be exceeded.

(cherry picked from commit a09b044)

Co-authored-by: steviez <steven@solana.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

v1.15 (abandoned) The v1.15 branch has been abandoned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants