jm + arenas   1

Fix glibc's MALLOC_ARENA_MAX variable
It seems that recent versions of glibc (up to glibc 2.25 at least) have some dysfunctional behaviour around malloc's arenas on multi-CPU systems, massively inflating the number of arenas allocated, which inflate reported VM sizes and (for multi-threaded Ruby services in particular) fragmenting memory badly.

See also

Presto issue reported with glibc malloc arena-per-thread behaviour resulting in Presto OOMs:

Hadoop affected by the inflated VM sizes reported as a side effect:

Good detailed writeup from IBM's WebSphere blog:
ops  ruby  memory  malloc  allocation  arenas  tuning  fragmentation 
28 days ago by jm

Copy this bookmark: