Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ruby 2.6.5 with jemalloc

Tags:

ruby

jemalloc

I've built and installed rub 2.6.5 from source with jemalloc. However when I check to see if its there I'm not seeing an entry. Is there something else I should have been doing?

ubuntu:~$ uname -a
Linux ip-10-0-3-198 4.15.0-1032-aws #34-Ubuntu SMP Thu Jan 17 15:18:09 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ubuntu:~$ ./configure --enable-shared --with-jemalloc
ubuntu:~$ make
ubuntu:~$ make install

Which results in:

ubuntu:~$ ruby -r rbconfig -e "puts RbConfig::CONFIG['LIBS']"
-lm 

Tracking memory usage once deployed I'm also not seeing a drop compared to similarly configured servers without jemalloc in place.

I'm not sure what I need to be doing in order to get jemalloc working.

Thanks!

like image 330
Lloyd Watkin Avatar asked Oct 20 '25 04:10

Lloyd Watkin


1 Answers

For some reason, the accepted answer does not work for me (Heroku), but this:

MALLOC_CONF=stats_print:true ruby -e "exit"

has done the trick.

If you have some stats ouput, means it's working.

source: https://github.com/gaffneyc/heroku-buildpack-jemalloc/issues/5#issuecomment-499932026

like image 55
Paulo Fidalgo Avatar answered Oct 23 '25 00:10

Paulo Fidalgo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!