-
Notifications
You must be signed in to change notification settings - Fork 4.6k
ledger-tool: stream output of accounts
subcommand
#28461
Conversation
dbe34e2
to
f229169
Compare
seems to work. former is master, latter this PR test: ./cargo run --release --bin solana-ledger-tool -- --ledger ${LEDGER_DIR} accounts --halt-at-slot ${SNAPSHOT_SLOT} --encoding base64 --output json > /dev/null where |
@jeffwashington would you expect such memory growth (~20GB, 16-36GB) during a full accounts scan under normal operation? i reran the above tests with an empty gonna try again with two scan passes and see how that behaves |
try this metric: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't take it for a spin yet, but lgtm!
Not that this wold ever come up, but I assume that json encoding with zero loadable accounts would print some version of []
?
yep! creating the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Problem
ledger-tool accounts
buffers all accounts before printing them to console. with the number of accounts on some of the public cluster, this consumes an unreasonable amount of memory, requiring absurd hardware to do what should be a fairly trivial taskSummary of Changes
stream the output while we scan instead of buffering