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

Jemalloc no longer working #25

Closed
itay-grudev opened this issue Sep 6, 2021 · 2 comments
Closed

Jemalloc no longer working #25

itay-grudev opened this issue Sep 6, 2021 · 2 comments

Comments

@itay-grudev
Copy link

itay-grudev commented Sep 6, 2021

I am not sure why, but my memory usage exploded a while ago and from what I can tell jemalloc is no longer working. No action was performed on our side.

Here are some excerpts from my configuration:

> heroku run bash
> ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
-lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm
> jemalloc.sh ruby -r rbconfig -e "puts RbConfig::CONFIG['MAINLIBS']"
-lz -lpthread -lrt -lrt -lgmp -ldl -lcrypt -lm
> heroku config:get JEMALLOC_ENABLED
true

image

@gaffneyc
Copy link
Owner

gaffneyc commented Sep 7, 2021

@itay-grudev There isn't a good way to see if jemalloc is enabled through RbConfig or inside a process. The best way at the moment (which needs to be added to the readme) is this: #5 (comment)

Give that a try and let me know if it's not actually enabled. Jemalloc's allocation algorithm does a better job of allocating objects in already claimed free memory rather than requesting more from the system so it's possible there is a change in your app which is causing it to request and retain a lot more memory

@itay-grudev
Copy link
Author

You are correct. It seems to be enabled using this way of testing. I will investigate alternative routes. Thank you.

P.S. Could you please document this: MALLOC_CONF=stats_print:true ruby -e "exit"

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

No branches or pull requests

2 participants