keeping memory usage at certain limit

Ricardo Nabinger Sanchez rnsanchez at wait4.org
Thu May 8 06:53:23 PDT 2014


On Fri, 02 May 2014 11:30:10 +0400
Antony Dovgal <antony.dovgal at gmail.com> wrote:

> *sigh* now I'm out of theories.. =)

You haven't mentioned (or I completely overlooked it) whether your
application makes use of mmap-based I/O.  If it does, you should see
your PageTables counter (/proc/meminfo) rising up for about > 1 GB per
disk terabyte your application touches.  This memory is used by the
kernel.

Note that you could have a stable memory usage: your application just
needs to free some memory, causing jemalloc to return it to the system,
the kernel takes it for page tables, and then your application needs
the memory it returned a moment ago, triggering OOM.

This is easy to test: run your application, and monitor /proc/meminfo.
The bad news is that hugepages do not work for disk-based mmaps.

Cheers,

-- 
Ricardo Nabinger Sanchez           http://rnsanchez.wait4.org/
  "Left to themselves, things tend to go from bad to worse."


More information about the jemalloc-discuss mailing list