4 ms·
I wonder why glibc isn't just using jemalloc when it seems to perform much better than what it currently has.
by pantalaimon 7y ago
I wonder why glibc isn't just using jemalloc when it seems to perform much better than what it currently has.
- jeffbee 7y agoUnder most workloads jemalloc will use much more memory than ptmalloc (glibc).
- edwintorok 7y agoI had the opposite experience. Jemalloc uses a lot less (virtual) memory, especially with multithreaded applications. The glibc allocator wastes quite a lot of memory mappings from a thread and never cleans them up even if a thread only had a burst of allocations (there is an upstream bug open about, they don't consider it a leak)
- jeffbee 7y agoI was about to say nobody cares about virtual memory usage, but I can see how those who are extremely sensitive to runtime performance might care about page table entries or VMAs. I think most people are more concerned about RSS.
- jeffbee 7y agoJust wanted to add that I strongly suggest thinking about the correct allocator for your applications and never using "the system allocator". In production context there should never be "a system allocator" anyway. Uninstall libc in prod. Force yourself to make a rational choice of memory allcoator.
- pantalaimon 7y ago> Uninstall libc in prod. When you start to miss the thrill of it :D