jemalloc Suitable for embedded environments
annulen at yandex.ru
Thu May 7 02:41:03 PDT 2015
07.05.2015, 04:51, "Mayank Kumar (mayankum)" <mayankum at cisco.com>:
> Hi Users
> I recently started experimenting with jemalloc and found that jemalloc controls fragmentation phenomenally. A process that was running out of its allocated quota of 2g of virtual memory now uses only 1000mb of virtual memory and works without any crashes. I am trying to incorporate this library but it seems people have some apprehensions about it associated with big data applications(enhanced by facebook).
> Can someone answer the following question, while I am trying to do some code reading:-
> 1. Does jemalloc waste memory at the cost of speed and is optimized for big data applications ?
By default jemalloc uses 4MiB chunks which can be too much for low memory systems. You might want to tune it with lg_chunk option (note that decreasing chunk size may affect performance).
> 2. Are there scenarios where if many threads are competing for malloc, it will dynamically create new arenas to reduce thread contention and are their parameters to control/tune them ?
> 3. Are there any other tunable parameters I should look at to ensure jemalloc doesn’t uncontrollably allocate memory in stress scenarios to optimize performance at the cost of memory . In my environment, I would expect jemalloc to reduce performance rather than allocate more memory/arenas/pools to better performance.
> Any help is appreciated while I ramp up on this new magical library.
> jemalloc-discuss mailing list
> jemalloc-discuss at canonware.com
More information about the jemalloc-discuss