• 7

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Changing memory allocator to Jemalloc Centos 6

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:


Would this be sufficient to get everything using jemalloc?

      • 2
    • I enabled the above and restarted the services that I wanted to rest. In observing, I have seen a decrease in the Reserved memory column as well as quite a bit of movement in that column. Prior to the change the value there was typically static in size. In our case 5.4gb. Now, it fluctuates quite often, and quite quickly, but averages about 4.7gb. Since jemalloc is a faster memory allocator I "think" I can attribute my observation to the fact that it is working. If so, my next question becomes. How can I tell which memory allocator a process is using in linux?

It's trivial answer (actually I still don't get it how your research could have missed it):


It's documented in ld.so(8) — man 8 ld.so: «…

/etc/ld.so.preload — File containing a whitespace separated list of ELF shared libraries to be loaded before the program.


  • 3
Reply Report

Trending Tags