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

Nethermind fills SWAP despite free memory and low vm.swappiness #4802

Closed
499602D2 opened this issue Oct 22, 2022 · 6 comments · Fixed by #6636
Closed

Nethermind fills SWAP despite free memory and low vm.swappiness #4802

499602D2 opened this issue Oct 22, 2022 · 6 comments · Fixed by #6636

Comments

@499602D2
Copy link

Describe the bug
No matter the Init.MemoryHint option, Nethermind always slowly but steadily fills up the swap on my system. The machine has 32 GB of memory, and vm.swappiness set to 5. Currently, 3.11/4 GiB of swap is in use, while only 17.1/31.2 GiB of memory is being used.

Only other programs running are Nimbus and mev-boost, both of which behave nicely.

To Reproduce
Happens always.

Expected behavior

  • Nethermind uses available memory instead of swapping onto the disk.
  • Increasing init.MemoryHint reduces swap usage. It has no effect: only increases memory usage.
  • Reducing init.MemoryHint reduces swap usage. It has no effect: only decreases memory usage.

Screenshots
Grafana dashboard with evolution of memory usage over the last four days. Initial drop in swap usage is due to a restart of Nethermind.

Screenshot from htop. Notice the obscure amount of swap usage.

Desktop (please complete the following information):

  • CPU: 4C/4T i5-6500T
  • Memory: 32 GB
  • OS: Ubuntu 22.04.1 LTS
  • Browser: N/A
  • Version: Nethermind/v1.14.3-0-707461293-20221022/X64-Linux/6.0.9

Additional context
Startup params:

/usr/share/nethermind/Nethermind.Runner \
                --config=mainnet \
                --Sync.SnapSync=true \
                --Init.BaseDbPath=/var/lib/nethermind \
                --Init.WebSocketsEnabled=true \
                --Network.MaxActivePeers=50 \
                --JsonRpc.Enabled=true \
                --JsonRpc.Port=8545 \
                --JsonRpc.EnginePort=8551 \
                --JsonRpc.JwtSecretFile=/secrets/jwt \
                --Pruning.CacheMb=4096
@asdacap
Copy link
Contributor

asdacap commented Oct 23, 2022

@kkokosa Any idea why this is the case?

@OlegJakushkin OlegJakushkin self-assigned this Nov 7, 2022
@499602D2
Copy link
Author

This behavior still occurs on v1.16.1, just to add a data point

@OlegJakushkin
Copy link
Contributor

Dear @499602D2: we are currently working on a prototype fixing this issue, will push it as soon as its testing will be completed.

@499602D2
Copy link
Author

Thank you for the update @OlegJakushkin, keep up the great work! 🙏

@benaadams
Copy link
Member

Resolved in many different changes, but most recent is #6636

@499602D2
Copy link
Author

PR looks promising, thank you for your work @benaadams!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants