defnull
07/03/2026, 6:30 AMMALLOC_ARENA_MAX and plan to use that in all containers we run. Let's see if this helps. If yes, I'd suggest adding that per default to containers images.
To sum it up: The default glibc memory manager pre-allocates multiple chunks from the kernel to be able to serve allocations coming from multiple application threads at the same time without locking. The default maximum is 8 time the CPU count, and each chunk can be up to 64MB of (mostly wasted) memory. This quickly adds up, especially in long running multi threaded applications on beefy hardware. Which is exactly our use-case. Reducing the maximum arena count to 2 may save a ton of memory that can be better used by other containers. The drawback should be minimal, because most of the allocation pressure in java is internal (java has its own heap) anyway, so it is very unlikely that more than two threads call malloc at the same time, and even if, the wait time is just nanoseconds.