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

Add a jemalloc feature #2195

Closed
wants to merge 20 commits into from
Closed

Conversation

realbigsean
Copy link
Member

Issue Addressed

A potential improvement RAM creep

Proposed Changes

Add a feature which will use jemalloc as the global allocator and enable some jemalloc metrics

Additional Info

After running for a day, with jemalloc instead of the default system allocator, my node was using about 1GB less of RAM. I have only tested on linux x86_64, and haven't done any longer-term testing so it could still be creeping. But I think it's worth experimenting with because it seems to have a reputation for handling memory fragmentation well, and has some interesting configuration options

@paulhauner
Copy link
Member

FYI, I figured out that we need to use the _RJEM_MALLOC_CONF variable to configure jemalloc, not just MALLOC_CONF. Example:

export _RJEM_MALLOC_CONF="narenas:1"

Reference: gnzlbg/jemallocator#115

@paulhauner
Copy link
Member

I've set this as blocked since we don't really know what we're doing with it yet.

@paulhauner
Copy link
Member

Closed in favour of #2222 to keep the PRs tidy. Free free to reopen if you like :)

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.

2 participants