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

Improve performance of dump-ledger #4361

Merged
merged 3 commits into from
Jun 28, 2024

Conversation

MonsieurNicolas
Copy link
Contributor

Description

This PR changes how dump-ledger operate as to use a lot less memory:

previously running a command such as stellar-core dump-ledger --output-file out.json --group-by "data.type" --agg "count()" against pubnet would crash nodes by using up all memory (16GB).

This version uses much less memory (peaks at 4GB) by not storing the current bucket in memory and not storing all seen keys from the bucket list in RAM.

This PR also includes a couple compile/link fixes for Windows.

@dmkozh
Copy link
Contributor

dmkozh commented Jun 25, 2024

Looks good, thanks for the optimization. In order to get past the cargo-deny check you just need to change deny.toml like here: dmkozh@aa935a9#diff-1040309c64844eb1b6b63d8fd67938adbf9461f1b3c61f12cf738f064a02d3de

As per standard, std::optional copies/moves the underlying object but asio::io_context cannot be moved/copied.
@dmkozh dmkozh enabled auto-merge June 27, 2024 20:56
@dmkozh dmkozh added this pull request to the merge queue Jun 27, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jun 27, 2024
@sisuresh sisuresh added this pull request to the merge queue Jun 28, 2024
Merged via the queue into stellar:master with commit 82ab41b Jun 28, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants