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

Make solana-ledger-tool run AccountsBackgroundService #26914

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

steviez
Copy link
Contributor

@steviez steviez commented Aug 4, 2022

Problem

Prior to this change, long running commands like solana-ledger-tool verify would OOM due to AccountsDb cleanup not happening.

Summary of Changes

Make solana-ledger-tool enable AccountsBackgroundService.

Credit to @mvines for doing most of the actual work in #26349.

Testing

I had previously been encountering an OOM after ~5k slots of processing on mnb with solana-ledger-tool on a ledger I had assembled for testing something else. With this change, I successfully processed the ~10k slots I had been hoping to without issue.

As an interesting perf datapoint, here is processing comparison between master and v1.10.32; the memory stats are taken from last print out immediately before last frozen bank:

# v1.10.32
datapoint: memory-stats total=269843996672i
  swap_total=1996796i
  free_percent=5.375635007967986
  used_bytes=83485450240i
  avail_percent=69.06158696519826
  buffers_percent=0.08825304210472022
  cached_percent=62.40292294391176
  swap_free_percent=98.64843479253764
...
ledger processed in 42 minutes, 27 seconds, 918 ms, 89 µs and 490 ns. root slot is 144172963, 34 banks: ...

# master
datapoint: memory-stats total=269843996672i
  swap_total=2044719104i
  free_percent=14.293261788173817
  used_bytes=19493175296i
  avail_percent=92.77613156623444
  buffers_percent=0.14457524377472322
  cached_percent=77.14281880468457
  swap_free_percent=98.49078223313748
...
ledger processed in 33 minutes, 3 seconds, 914 ms, 915 µs and 405 ns. root slot is 144172963, 34 banks: 1...

Fixes #26895

@steviez steviez requested review from mvines and brooksprumo August 4, 2022 08:38
mvines
mvines previously approved these changes Aug 4, 2022
Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

thanks for finishing off this work!

Prior to this change, long running commands like `solana-ledger-tool
verify` would OOM due to AccountsDb cleanup not happening.

Co-authored-by: Michael Vines <[email protected]>
@mergify mergify bot dismissed mvines’s stale review August 4, 2022 18:28

Pull request has been modified.

@steviez steviez merged commit 300666d into solana-labs:master Aug 4, 2022
@steviez steviez deleted the ledger_tool_abs branch August 4, 2022 20:44
xiangzhu70 pushed a commit to xiangzhu70/solana that referenced this pull request Aug 17, 2022
…26914)

Prior to this change, long running commands like `solana-ledger-tool
verify` would OOM due to AccountsDb cleanup not happening.

Co-authored-by: Michael Vines <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

solana-ledger-tool verify OOM's with master on mnb
2 participants