Bug 83221

Summary: RFE: systemd-journald rate limits on kernel messages
Product: systemd Reporter: Zhuoyun Wei <wzyboy>
Component: generalAssignee: systemd-bugs
Status: RESOLVED MOVED QA Contact: systemd-bugs
Severity: normal    
Priority: medium CC: adamw, rektide, wzyboy
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Zhuoyun Wei 2014-08-29 04:02:11 UTC
I can see there are some rate limits in /etc/systemd/journald.conf and the default values, according to journald.conf(5) is "1000 messages in 30s". This is nice. However, it seems that these limits do not apply to kernel messages.

My / partition is 10 GiB so journals by defaults take up to 1 GiB space, this is enough for months of logs on my laptop. However, yesterday I encountered a bug related to USB kernel module while traferring data from my laptop to my USB device, this bug made the USB kernel module keep generating kernel messages (that kind of [---cut here---] stuff) at a rate of thousands of lines per second. These kernel messages quickly took up 1 GiB space and totally flushed all the logs of previous months in a few minutes.

Generating more than 1 GiB of kernel messages in a few minutes is apprently more than the defaults limit of "1000 messages in 30s", but journald did not stop this kind of "stupid" behaviour.

May I suggest that journald should also apply the rate limit not only on service messages, but also on kernel messages? This will help a lot when some kernel module generates tons of messages.

Thanks.
Comment 1 Zhuoyun Wei 2014-08-29 04:05:00 UTC
I am using Arch Linux with systemd version 216.
Comment 2 Lennart Poettering 2014-10-24 00:25:04 UTC
Makes sense.
Comment 3 Lennart Poettering 2014-10-24 00:44:28 UTC
*** Bug 68000 has been marked as a duplicate of this bug. ***
Comment 4 Lennart Poettering 2019-02-28 10:52:39 UTC
Let's continue tracking this on github:

https://github.com/systemd/systemd/issues/3128

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.