[systemd-devel] watchdog feature highly ineffecient / using too much CPU

Michael Biebl mbiebl at gmail.com
Fri Sep 12 16:44:02 PDT 2014


Hi,

we are currently trying to debug an upgrade failure from 208 to 215
[1] in Debian related to the sd_notify/watchdog feature.

This bug is not reliably reproducibly, we suspect a race somewhere
when systemd is re-exec'ed and a daemon currently tries to talk to
systemd via sd_notify.

In my attempt to trigger the issue, I changed the bluetooth.service
(which uses the watchdog feature) and set WatchdogSec=1, i.e. it
notifies systemd every second.

As a result, systemd is using 25% of my CPU time, and bluetoothd 12%:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+
COMMAND
    1 root      20   0  110716   5256   3224 R  24,6  0,1   1:42.23
systemd
13503 root      20   0   23556   3876   3568 S  12,0  0,0   0:48.52
bluetoothd


This seems highly inefficient and looks like a codepath which isn't
particularly optimized.




[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761306

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list