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

gear-reply-cli create-snapshot uses too much memory #4298

Open
gshep opened this issue Oct 18, 2024 · 1 comment
Open

gear-reply-cli create-snapshot uses too much memory #4298

gshep opened this issue Oct 18, 2024 · 1 comment
Assignees
Labels
C2-refactoring Refactoring proposal D5-tooling Helper tools and utilities

Comments

@gshep
Copy link
Member

gshep commented Oct 18, 2024

File Location(s)

No response

Proposal

While trying to create a state snapshot for the block 11_118_796 of the testnext, the utility was killed by the OS memory manager. It would be more convenient for the end user to limit the memory usage of gear-replay-cli when creating snapshots.

[ 6808.212686] Out of memory: Killed process 119826 (gear-replay-cli) total-vm:1
5167424kB, anon-rss:11575028kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:2
2888kB oom_score_adj:0
@gshep gshep added C2-refactoring Refactoring proposal D5-tooling Helper tools and utilities labels Oct 18, 2024
@Lazark0x Lazark0x self-assigned this Oct 22, 2024
@Lazark0x
Copy link
Member

It seems that the options for optimizing memory consumption are rather limited on our part: the create-snapshot argument only configures Builder from crate frame-remote-externalities

Local testing shows that about ~3GB is consumed while downloading key values:

Screenshot 2024-10-23 at 14 34 50

And about ~10GB during DB generation:

Screenshot 2024-10-23 at 14 35 45

The following arguments have been used:
gear-replay-cli create-snapshot -u wss://testnet-archive.vara.network:443 ../test-snapshot -b 0x61e939c1dcf24b7edf58ede944bdf544f65d9c7b2a3757bb2228dfecfd07fec5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C2-refactoring Refactoring proposal D5-tooling Helper tools and utilities
Projects
None yet
Development

No branches or pull requests

2 participants