jemalloc for small applications
Eric Wong
normalperson at yhbt.net
Tue May 27 00:15:48 PDT 2014
Hello, I've been using jemalloc 3.6 more on my 64-bit Debian stable
workstations and notice it uses more memory than eglibc malloc for my
smaller Ruby daemons.
For example, dtas-player[1] uses 4-5M more memory with jemalloc when
running on recent ruby-trunk (r46150). (./configure LIBS=-ljemalloc)
Everything is mostly single-threaded and contention is not an issue, so
I use MALLOC_CONF=narenas:1 for jemalloc and MALLOC_ARENA_TEST=1
MALLOC_ARENA_MAX=1 for eglibc.
Is higher memory usage for small apps is inherent in the design and a
concious tradeoff for bigger apps?
Are there tuning or (preferably) out-of-the-box changes which can be
made to reduce memory usage for smaller apps?
But probably most development is driven by users of large server
applications and not crazy music shells like dtas :)
Anyways, my fat Ruby web server is happier on jemalloc :)
60-80M on eglibc, ~40M on jemalloc (32-bit on a VM, even))
Thanks for jemalloc and for reading!
[1] http://dtas.80x24.org/README
More information about the jemalloc-discuss
mailing list