[systemd-devel] journald leaking maps?

Michael Olbrich m.olbrich at pengutronix.de
Fri Oct 12 01:52:26 PDT 2012


On Fri, Oct 12, 2012 at 04:31:46AM -0400, Dave Reisner wrote:
> On Fri, Oct 12, 2012 at 09:19:08AM +0100, Colin Guthrie wrote:
> > 'Twas brillig, and David Strauss at 12/10/12 05:39 did gyre and gimble:
> > > On Thu, Oct 11, 2012 at 3:31 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> > >> Something is obviously not good there! journald is using something in
> > >> the region of 250MB res.
> > >>
> > >> What's the best way to debug this?
> > > 
> > > What version are you on? The Fedora 17 journal does excessive mapping
> > > that's fixed in current versions.
> > 
> > Arg, I forgot that detail - I'm on 194, no patches to journal related
> > stuff applied.
> > 
> > As others are not seeing it jump out at them, I figured it might be due
> > to just using /run and not flushing it to disk etc.
> > 

Well the mapped memory is the same physical memory, that is used in the
tmpfs. You'll probably run out of memory there first, before journald runs
out of virtual address space. And that will happen, even if journald does
not map it. Setting RuntimeMaxUse in journald.conf should help here.

> (crap, resending because I fail at reply all)
> 
> No, I see this too, and I'm keeping persistent logs:
> 
> # grep -cF /var/log/journal /proc/155/maps
> 604
> 
> journal process is up to 170MB RSS, and 2400MB virtual memory.

I don't think this matters for physical memory. These are file based
mappings, so the memory pages can be release when needed.
Of course at some point journald might run out of virtual addresses. I
don't know if it can handle that.

Regards,
Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the systemd-devel mailing list