[systemd-devel] journald leaking maps?

Colin Guthrie gmane at colin.guthr.ie
Fri Oct 12 07:58:06 PDT 2012


'Twas brillig, and Michael Olbrich at 12/10/12 09:52 did gyre and gimble:
> 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.

Well perhaps, but with systemd 189 (I think, perhaps a bit earlier) I
certainly didn't see this kind of memory usage. I'm certainly hitting
OOMs much more regularly now unless I restart systemd occasionally.

Also, that explanation doesn't really explain:


[root at jimmy ~]# cat /proc/$(pidof systemd-journald)/status | grep Vm
VmPeak:	 6611116 kB
VmSize:	 6611112 kB
VmLck:	       0 kB
VmPin:	       0 kB
VmHWM:	  253692 kB
VmRSS:	  227680 kB
VmData:	     960 kB
VmStk:	     136 kB
VmExe:	     164 kB
VmLib:	    2804 kB
VmPTE:	   12876 kB
VmSwap:	     172 kB

[root at jimmy ~]# cat /proc/$(pidof systemd-journald)/maps | grep -c /run/log/
1939

[root at jimmy ~]# du -sh /run/log/
10M	/run/log/


So, I've got about 2k mmaps, using about 230Mb RSS and yet my journal
data is only 10M in tmpfs... doesn't sound right to me!

Unless all this RSS memory is just fake and pretend and just different
maps onto that 10MB and it's really "free", but my understanding was
that it was the VmSize that was all the virtual mmap stuff, not the
VmRSS... please correct me if I'm wrong.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list