Bug#856265: systemd-journald: RuntimeMaxUse is not properly obeyed

Stephan Sokolow (You actually CAN reply) noreply at ssokolow.com
Mon Feb 27 09:41:04 GMT 2017


Package: systemd
Version: 215-17+deb8u6
Severity: normal
File: /lib/systemd/systemd-journald

Dear Maintainer,

While configuring a Debian jessie VM for testing deployments to a 256MiB 
VPS, I discovered that no combination of settings I tried would keep 
journald's memory usage from climbing significantly above the limits I 
set, except Storage=none.

(htop reports that it climbs from 0.9% RSS to roughly 7.7% RSS (roughly 
18MiB) before dropping again, when using running
	while true; do echo testing 1234567890 | systemd-cat; done
with the configuration included at the bottom of this message.

In my testing, 7.7% RSS appeared to be a hard lower limit well above the 
2/3/4 MiB I specified while experimenting. (And well above the 0.8-0.9% 
RSS that it starts at and, with Storage=none, remains at.)

I was forced to resort to using Storage=none (steady 0.8% RSS under idle 
or test conditions) and inetutils-syslogd (steady 0.7% RSS under the 
same circumstances) to get predictable memory behaviour.

(I replace rsyslogd with inetutils-syslogd in my VMs and VPSes because 
that's what the guide I started out following did, justifying it with 
"[rsyslogd] allocates ~30MB privmpages under OpenVZ".)

While I do use an ansible playbook (available on request if you think 
it's relevant), these should be the only details relevant to reproducing 
the problem:

1. Use the VirtualBox variant of the bento/debian-8.6 Vagrant VM
2. Update and upgrade the system
3. Apply the journald.conf changes at the bottom of the file

I tested two situations one after another and they seemed to produce 
identical behaviour:

1. Restart journald to apply changes without having ever rebooted
2. Reboot to apply changes

-- Package-specific info:

-- System Information:
Debian Release: 8.7
   APT prefers stable-updates
   APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages systemd depends on:
ii  acl             2.2.52-2
ii  adduser         3.113+nmu3
ii  initscripts     2.88dsf-59
ii  libacl1         2.2.52-2
ii  libaudit1       1:2.4-1+b1
ii  libblkid1       2.25.2-6
ii  libc6           2.19-18+deb8u7
ii  libcap2         1:2.24-8
ii  libcap2-bin     1:2.24-8
ii  libcryptsetup4  2:1.6.6-5
ii  libgcrypt20     1.6.3-2+deb8u2
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2+b3
ii  libpam0g        1.1.8-3.1+deb8u2
ii  libselinux1     2.3-2
ii  libsystemd0     215-17+deb8u6
ii  mount           2.25.2-6
ii  sysv-rc         2.88dsf-59
ii  udev            215-17+deb8u6
ii  util-linux      2.25.2-6

Versions of packages systemd recommends:
ii  dbus            1.8.22-0+deb8u1
ii  libpam-systemd  215-17+deb8u6

Versions of packages systemd suggests:
pn  systemd-ui  <none>

-- Configuration Files:
/etc/systemd/journald.conf changed:
[Journal]
Storage=persistent
SystemMaxUse=100M
RuntimeMaxUse=3M

-- 
Stephan Sokolow

Note: My e-mail address IS valid. It's a little trick I use to fool
"smarter" spambots and remind friends and family to use the custom
aliases I gave them.



More information about the Pkg-systemd-maintainers mailing list