#2194: Memory increase during regridding
| Reporter: | Wolfgang Kastaun |
| Status: | open |
| Milestone: | ET_2019_02 |
| Version: | development version |
| Type: | bug |
| Priority: | minor |
| Component: | Other |
Comment (by Ian Hinder):
I would be very careful interpreting the SystemStatistics memory information. From what I know, the mallinfo data structure from glibc is not even 64-bit safe (the ints are 32 bit). Much better, if you really want a reliable way to see what is happening, would be to use tcmalloc, and then output the diagnostics it provides. I wrote a tcmalloc wrapper thorn which outputs the diagnostics to files during a Cactus run (https://bitbucket.org/ianhinder/tcmalloc/src/master/). The thorn doesn’t install tcmalloc for you, so you have to do that yourself, but it’s fairly easy (you do need libunwind as a dependency). The thorn has a parameter to force tcmalloc to release memory back to the OS after each regridding.
In your optionlist, link with tcmalloc. I have
LDFLAGS = -rdynamic -L/home/ianhin/software/gperftools-2.1/lib -Wl,-rpath,/home/ianhin/software/gperftools-2.1/lib -ltcmalloc
This should be sufficient for tcmalloc to be used instead of glibc malloc.
Also note that a high maxrss is not necessarily a problem; it might just mean the OS didn’t need that memory yet, and therefore hasn’t unmapped it.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2194/memory-increase-during-regridding