You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decrease memory footprint of JVM-based apps by setting MALLOC_ARENA_MAX
Set MALLOC_ARENA_MAX to 2 by default and introduce environment variable
SPLICE_MALLOC_ARENA_MAX as an option to override this value. This can
decrease resident memory footprint for JVM process reduce unnecessary
OOM kills by the OS.
Here are the details:
- By default on 64-bit systems the limit for number of arenas in glibc
malloc is determined as 8 * num_of_cores (in our case it is the max
arenas becomes 8 *16 = 128)
- Container limits are not respected
- Each Arena allocates one heap of 64 MiB at the time of creation
- A new Arena is created each time when malloc is called and all
existing Arenas are locked by other threads
- JVM based software tends to create a lot of threads, at the same time
it has it's own memory management so it doesn't call malloc
frequently. Memory waste from a large number of arenas is quite
significant on machines with many physical cores and this waste is
especially noticeable in smaller apps.
Signed-off-by: Stanislav German-Evtushenko <[email protected]>
0 commit comments