You are not logged in.

#1 2019-11-20 10:24:13

unnilquadium
Member
Registered: 2017-08-27
Posts: 86

[SOLVED] Question about ratelimiting

Ever since upgrading to systemd version 243 I have the following output at reboot or shutdown:

printk: shutdown: 5 output lines suppressed due to ratelimiting

Up until systemd version 242.84 there was no such output.

Is this an expected behaviour in this version of systemd?

Last edited by unnilquadium (2019-12-09 20:30:53)

Offline

#2 2019-11-20 11:11:33

sabroad
Member
Registered: 2015-05-24
Posts: 242

Re: [SOLVED] Question about ratelimiting

unnilquadium wrote:
printk: shutdown: 5 output lines suppressed due to ratelimiting

From github issues:

poettering wrote:

That ratelimiting is not applied by userspace but by the kernel.

unnilquadium wrote:

Up until systemd version 242.84 there was no such output.

systemd-shutdown is probably just logging more lines rapidly. Without context it's difficult to tell why, or whether it's even an issue.


--
saint_abroad

Offline

#3 2019-11-20 11:12:51

frostschutz
Member
Registered: 2013-11-15
Posts: 1,479

Re: [SOLVED] Question about ratelimiting

Same here.

printk: systemd-shutdow: 51 output lines suppressed due to ratelimiting

you can a higher ratelimit in /proc/sys/kernel/printk_* (or with kernel parameter)

Offline

#4 2019-11-20 12:42:41

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,426

Re: [SOLVED] Question about ratelimiting

> grep -i RateLimit /etc/systemd/journald.conf
#RateLimitIntervalSec=30s
#RateLimitBurst=1000

From man journald.conf:

       RateLimitIntervalSec=, RateLimitBurst=
           Configures the rate limiting that is applied to all messages generated on the system. If, in the time interval defined by RateLimitIntervalSec=, more messages than specified in RateLimitBurst= are logged by a service, all
           further messages within the interval are dropped until the interval is over. A message about the number of dropped messages is generated. This rate limiting is applied per-service, so that two services which log do not
           interfere with each other's limits. Defaults to 10000 messages in 30s. The time specification for RateLimitIntervalSec= may be specified in the following units: "s", "min", "h", "ms", "us". To turn off any kind of rate
           limiting, set either value to 0.

           If a service provides rate limits for itself through LogRateLimitIntervalSec= and/or LogRateLimitBurst= in systemd.exec(5), those values will override the settings specified here.

-EDIT-
I don't know if the previous applies to kernel messages to, probably not, because  according to:

koko@Gozer# grep . /proc/sys/kernel/printk_ratelimit*
/proc/sys/kernel/printk_ratelimit:5
/proc/sys/kernel/printk_ratelimit_burst:10

systemd's defaults are 30,1000 instead

Last edited by kokoko3k (2019-11-20 12:47:41)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#5 2019-11-22 09:50:44

unnilquadium
Member
Registered: 2017-08-27
Posts: 86

Re: [SOLVED] Question about ratelimiting

Adding the following boot parameter

printk.devkmsg=on

disables ratelimiting I think, and indeed the message is no longer generated at shutdown.
But I still don't know which messages were being suppressed.

P.S.: This is just a nuisance really, as everything is working.

Offline

#6 2019-11-22 12:06:18

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,426

Re: [SOLVED] Question about ratelimiting

I don't get it, have you tweked:
/proc/sys/kernel/printk_ratelimit
and
/proc/sys/kernel/printk_ratelimit_burst

??

-EDIT-
Ratelimiting means that if there are too many messages in a time period, exceeding messages are discarded.

Last edited by kokoko3k (2019-11-22 12:07:17)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#7 2019-11-24 20:31:01

unnilquadium
Member
Registered: 2017-08-27
Posts: 86

Re: [SOLVED] Question about ratelimiting

kokoko3k wrote:

I don't get it, have you tweked:
/proc/sys/kernel/printk_ratelimit
and
/proc/sys/kernel/printk_ratelimit_burst

??

Yes, I've set but those files to 0, which I believe disables ratelimiting, but the message was still being generated.
With the kernel boot parameter the message is no longer generated.

Offline

#8 2019-11-24 20:46:24

loqs
Member
Registered: 2014-03-06
Posts: 18,198

Re: [SOLVED] Question about ratelimiting

printk_ratelimit
printk_ratelimit_burst

control the limits for rate limited kernel messages i.e. messages from the kernel itself

printk_devkmsg

controls / ratelimits userspace access to /dev/kmsg i.e. systemd writing to dmesg

https://www.kernel.org/doc/Documentatio … kernel.txt

Last edited by loqs (2019-11-24 20:47:38)

Offline

#9 2019-12-09 20:30:31

unnilquadium
Member
Registered: 2017-08-27
Posts: 86

Re: [SOLVED] Question about ratelimiting

For information, systemd 244 is no longer generating the line at shutdown.

Marking the issue as solved

Offline

Board footer

Powered by FluxBB