[systemd-devel] Excessive (virtual) memory usage of journald

Lennart Poettering lennart at poettering.net
Fri Jun 21 08:42:55 PDT 2013


On Fri, 21.06.13 17:31, Holger Hans Peter Freyther (holger at freyther.de) wrote:

> 
> On Fri, Jun 21, 2013 at 04:19:30PM +0200, Kay Sievers wrote:
> 
> > I have no idea why you care what the journald process does with its
> > very own 2+GB of address space, and why it uses 128MB of it.
> 
> I care about whether or not journald will work reliable on an
> unattended system. And from what I see there is no limit in the
> mmap cache. This means that journald can potentially exhaust the
> virtual address space. Will it happen? I don't know, time will
> tell.

There are limits. See top of mmap-cache.c. We will allocate up to 64
windows for the cache, before we recycle. We map 8MB per window.

> 
> E.g. the test-mmap-cache.c does not test if the freeing of windows
> (make_room) in case of a failed MMAP_FAILED. When was the last
> time this code got tested/executed?

Not following here.

The test is executed on every "make check". Which I run pretty much
every day, before I commit anything that I more than one line.

Tests are never comprehensive. If you see something that could need a
test, please send us a patch!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list