This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/20425] unbalanced and poor utilization of memory in glibc arenas may cause memory bloat and subsequent OOM


https://sourceware.org/bugzilla/show_bug.cgi?id=20425

--- Comment #25 from Sumeet Keswani <sumeet.keswani at hpe dot com> ---
Created attachment 9559
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9559&action=edit
glibc-issue


Its been hard to build a accurate reproducer, since our workloads are
complicated. But this (attached) is typical of what we see.
(this is RSz memory of three processes running on three different machines)

The arenas take so much more memory than the process actually uses over longer
periods of time. It almost never returns the memory and the process OOMs in a
few days.

Note how calling malloc_trim() returns the memory back to the OS. 
Hence we know that this memory is totally wasted in the arenas, because by
calling malloc_trim() we can recover the memory. Hence there is something
algorithmic-ally wrong with the way arenas are managed. - they either do not
use the free memory they have, and/or never return the top of the heap.

With the cyclic arena fix (yellow) this problem actually became worse. yellow
line will OOM sooner than blue and purple.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]