[Users] memory leak in Carpet?

ian.hinder at aei.mpg.de ian.hinder at aei.mpg.de
Sun Aug 5 14:53:27 CDT 2018

> On 5 Aug 2018, at 15:52, Miguel Zilhão <miguel.zilhao.nogueira at tecnico.ulisboa.pt> wrote:
> hi Ian,
> many thanks for your analysis. for that particular run there is no significant change in the memory usage for longer times. however, i've now rerun the configuration that had originally given me problems (with lower resolution so that i'd have enough memory) with tcmalloc and i've plotted those same curves. here, the memory used increases further. i'm attaching the plot, together with the parfile and stdout output in case it's useful.

Hi Miguel,

The memory seems to reach a steady state by iteration ~3000.  Can you run an example where it dies with an OOM?

The meaning of the different tcmalloc statistics is described at https://gperftools.github.io/gperftools/tcmalloc.html under "Generic Tcmalloc Status".

From what I see here, the amount of memory allocated by Cactus grows then reaches a steady state (the green curve).  This is not accounted for in the gridfunctions, so it must be from something else.  I don't know what it might be.    Does this run also have HDF5 output disabled?

It looks like the allocated memory plus the unmapped memory would roughly equal the rss.  That is a little surprising, since I would have expected the rss to exclude unmapped pages.  Maybe until another process needs it, the kernel doesn't actually unmap it, for performance reasons (mapping it back again would cause a page fault).

Can you check this by plotting tcmalloc::generic_current_allocated + tcmalloc::pageheap_free against systemstatistics-process_memory::maxrss?  If that is the case, then there is no issue with fragmentation, because even though the address space is fragmented, the "holes" have mostly been returned to the OS for other processes to use ("unmapped").

The point that Roland made also applies here: we are looking at the max across all processes and assuming that every process is the same.  It's possible that one process has a high unmapped curve, but another has a high rss curve, and we don't see this on the plot.  We would have to do 1D output of the grid arrays and plot each process separately to see the full detail.  One way to see if this is necessary would be to plot both the max and min instead of just the max.  That way, we can see if this is likely to be an issue.

Ian Hinder

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.einsteintoolkit.org/pipermail/users/attachments/20180805/7500de6f/attachment.html 

More information about the Users mailing list