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

alternative malloc implementation - jemalloc #4126

Merged
merged 6 commits into from
Jul 19, 2022

Conversation

garyschulte
Copy link
Contributor

@garyschulte garyschulte commented Jul 18, 2022

PR description

Use jemalloc with linux runtimes to better manage rocksdb memory usage.

  • add malloc arena max envar to besu startup
  • add jemalloc preload envar to besu startup
  • add jemalloc lib download to docker jvm images

smoke tested and verified working on:
Linux x86_64
Docker linux aarch64 (on OSX M1)

Native OSX (El Capitan +) is not loading jemalloc currently

Fixed Issue(s)

potentially addresses:
#4057

Documentation

If we end up going with jemalloc as an alternative malloc implementation for besu, we should document the need to have jemalloc installed in your environment, how to do it for each platform.

  • I thought about documentation and added the doc-change-required label to this PR if
    updates are required.

Changelog

add jemalloc preload to besu startup
add jemalloc lib download to docker jvm images

Signed-off-by: garyschulte <[email protected]>
@garyschulte garyschulte marked this pull request as draft July 18, 2022 23:05
@garyschulte garyschulte changed the title add malloc arena params to besu startup alternative malloc implementation - jemalloc Jul 18, 2022
@garyschulte garyschulte marked this pull request as ready for review July 19, 2022 04:01
Copy link
Contributor

@jflo jflo left a comment

Choose a reason for hiding this comment

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

Approved, but maybe add a line for this in the CHANGELOG.md, people will be psyched for this.

@garyschulte garyschulte enabled auto-merge (squash) July 19, 2022 21:36
@garyschulte garyschulte merged commit 0ca45f3 into hyperledger:main Jul 19, 2022
@blinc117
Copy link

Amazing work on this all involved! Thank you!!!!

@garyschulte garyschulte deleted the feature/use_jemalloc branch August 3, 2022 23:19
eum602 pushed a commit to lacchain/besu that referenced this pull request Nov 3, 2023
* add malloc arena params to besu startup
* add jemalloc preload to besu startup
* add jemalloc lib download to docker jvm images
* use 5.* for jemalloc-dev version
* add jemalloc to circleci containers for acceptance tests

Signed-off-by: garyschulte <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants