339 points · by gkfasdfasdf · 2mo ago · 94 comments
Far from the only case. Trillion dollar companies having sudden interest in your open source project is not necessarily a long term benefit.
https://theconsensus.dev/p/2026/04/16/who-even-uses-jemalloc...
> Development of Jemalloc will transition back to the original open source project: https://github.com/jemalloc/jemalloc. Meta’s fork of the Jemalloc project will be fully archived as part of the transition. We look forward to continuing the collaboration with the community to drive jemalloc.
> See blog post for details: https://engineering.fb.com/2026/03/02/data-infrastructure/in...
P.S. I also wondered whether systemd had any cultural reference to Système D aka Système Débrouillard, but Pottering does not seem to engage in word play on other occasions, so probably not.
> Systemd was launched in April 2010; it adopts various ideas from previous init systems and combines them with a uniform configuration and administration interface. Systemd operates as a background service (daemon) and controls important system configuration tasks including hardware initialisation and the starting of server processes. The developers thought that its name is suitably reminiscent of the French term "système D", an expression that relates to "thinking on your feet" and describes high-speed technical problem-solving abilities such as those displayed by TV action hero MacGyver.
https://web.archive.org/web/20121014173559/http://www.h-onli...
Source: https://brand.systemd.io/
There’s a slow memory leak somewhere in my code but with jemalloc it no longer actually matters.
Thanks to jemalloc team for this!
https://www-users.cse.umn.edu/~arnold/disasters/patriot.html
The main issue is thread preemption while you're holding a per-core cache mutex. Some other thread can't do meaningful work using the cache while the holder is sleeping.
If you use a CPU-local data structure, you must handle the case where, mid-way through a call to your allocator, the CPU runs a second thread that makes another call to your allocator (and that, too, can get interrupted by another thread that allocates memory, etc.)
That makes thread-local easier to implement and likely faster (it doesn’t require any memory barriers in the fast path)
Also, good schedulers try to avoid moving threads between CPUs. The better they manage to do that, the lower the cost of having per thread data structures (there likely still is a price, as there most of the time are more threads than CPUs on a system)
tcmalloc only works on Linux.
Is Meta still using it and developing it? If not who are the driving force behind it now? I just checked there wasn't a release since 2022 and then we have this now. Something changed?
Just wish we have a little bit of context. But it is also great it is continue being maintained. It makes a huge difference for Ruby on Rails Apps.
See the comment of vocx2tx
Why would the scads of people writing JavaScript, Java, python, go, rails, etc need to be aware of jemalloc?
In our Python program, a bit of numpy processing of large pictures led to 100 GB not being returned to the OS by glibc's default allocator and the machine running out of memory shortly after. With jemalloc's reliable memory return settings, those problems disappear.
and even then recently it costed (us) quite a few months to blame JVM and later the default glibc memory allocator for running out native (not java heap memory) - had to exclude all possible native libs (zlib, zstd via jna), direct buffers, sockets, thread stacks and so on. Changing the malloc to jemalloc solved the issue, even though initially it was done for its debugging capabilities.
It's just a great memory allocator.
I wish that wasn't the case, but it is.
I work for the runtime team of JPG @ Oracle. We use malloc in Hotspot, quite a lot actually! Providing your JVM with a good malloc can improve the performance of the runtime, both in terms of CPU and memory, by quite a bit.
I don't think you need the details, but it's good to be aware that some mallocs are better than others, and there are multiple of them. Being aware of jemalloc is a good way of being aware of the facts I just mentioned :-).
Writing allocators for domain-specific access patterns is easy. Writing a general-purpose high performing, stable allocator with bounded P99 latency is hard.
Give your friend, Dunning–Kruger, some better pills to keep him from speaking through you.
This question was not necessary. You know the answer, because people upvoted this.