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

fix(node/store): substantial memory usage improvements #2960

Merged
merged 62 commits into from
Nov 30, 2023
Merged

Conversation

Wondertan
Copy link
Member

@Wondertan Wondertan commented Nov 26, 2023

  • Fixes memory leak OOM on Light and Bridge nodes #2905
  • Reduces memory consumption (from up-to 3gib to up-to 300mib) (TODO: proofs in pyroscope)
  • Improves cache hit rate on Badger
    • The warning log with Badger's low cache hit rate has disappeared.

NOTE: More details in code comments

TODO:

  • Test with lower block cache size (default 256mib)
  • Test sync on BN (@renaynay, could you try your BN?)
  • Submit a minor bug fix to libp2p(peerstoreds cyclicBatch)
  • Extract unrelated changes to a diff PRs
  • Check if this is breaking
  • Make an issue about relaxed badger configuration node: provide relaxed BadgerDB config for FN/BN #2977
  • Docs. Reduce hardware requirements, introduce new build options

Closes #2905

Wondertan added a commit that referenced this pull request Nov 29, 2023
* Increases UploadRate to 15 secs.
* Send goroutines profiles additionally 

Extracted from #2960
Wondertan added a commit that referenced this pull request Nov 29, 2023
Part of an effort to decrease the memory footprint for LNs. Headers are pretty beefy.

Extracted from #2960
nodebuilder/store.go Show resolved Hide resolved
nodebuilder/store.go Show resolved Hide resolved
nodebuilder/store.go Show resolved Hide resolved
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

Needs lint otherwise i'm fine to RC + deploy to arabica

share/eds/inverted_index.go Outdated Show resolved Hide resolved
ramin
ramin previously approved these changes Nov 30, 2023
Copy link
Contributor

@ramin ramin left a comment

Choose a reason for hiding this comment

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

seems clear. Only comments, perpetually, it'd be nice to do a little refactoring to be able to add some tests cases around some of the behavior (eg: the NumCPU setting that is then validated as compactors > opts.MaxLevels etc) but happy to add that later

Makefile Show resolved Hide resolved
nodebuilder/header/config.go Outdated Show resolved Hide resolved
walldiss
walldiss previously approved these changes Nov 30, 2023
renaynay
renaynay previously approved these changes Nov 30, 2023
ramin
ramin previously approved these changes Nov 30, 2023
@Wondertan Wondertan dismissed stale reviews from ramin and renaynay via dd4960a November 30, 2023 15:30
@Wondertan Wondertan enabled auto-merge (squash) November 30, 2023 15:49
@Wondertan Wondertan merged commit fa6a137 into main Nov 30, 2023
29 of 38 checks passed
@Wondertan Wondertan deleted the badger-bump branch November 30, 2023 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:node Node kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OOM on Light and Bridge nodes
5 participants