Changing memory allocator to Jemalloc Centos 6

Posted by Brian Lovett on Server Fault See other posts from Server Fault or by Brian Lovett
Published on 2013-03-09T01:18:36Z Indexed on 2014/05/30 3:31 UTC
Read the original article Hit count: 429

After reading this blog post about the impact of memory allocators like jemalloc on highly threaded applications, I wanted to test things on a larger scale on some of our cluster of servers. We run sphinx, and apache using threads, and on 24 core machines.

Installing jemalloc was simple enough. We are running Centos 6, so yum install jemalloc jemalloc-devel did the trick. My question is, how do we change everything on the system over to using jemalloc instead of the default malloc built into Centos. Research pointed me at this as a potential option:

LD_PRELOAD=$LD_PRELOAD:/usr/lib64/libjemalloc.so.1

Would this be sufficient to get everything using jemalloc?

© Server Fault or respective owner

Related posts about Performance

Related posts about memory