[systemd-devel] High CPU usage of journald

Holger Freyther holger at freyther.de
Sun Feb 17 02:12:47 PST 2013


Dear maintainers,

first of all the good news. The same setup used to exhibit high
memory usage (and exploding virtual address space). In a relatively
idle system I see a constant CPU usage of journald of around 20% (
using the busybox top). The main issue with that is that the system
starts to feel really slow due this. Typing commands via the serial
console feels like a satellite link.

Config:
[Journal]
Storage=volatile
RuntimeMaxUse=648K
(removed the lines starting with #)


Systemd:
As it is included in Poky/OE-Core right now (version 197)


Kernel:
This is a 3.2.37 kernel with minimal cgroup support.


Service:
The service file can be seen here[1]. It will re-load firmware, toggle
a LED and start the BTS process. If the BTS can not connect to a BSC it
will exit and the service file is asked to restart it in two seconds.


kernel messages:
"DSP 0: Firmware loaded" is printed every time the firmware
is reloaded..


log messages from userspace:
I am posting through gmane as attaching the file is a bit difficult. I
have uploaded them here[2]. It is 47 lines including the messages from
systemd about re-starting the service.


Strace:
Some seconds of output with strace is another paste[3]. What is noticeable
is the polling on /proc/*/cgroup, mmapping to read the content, closing
the file, unmapping. GLIBCs fgets is a bit wasteful in this regard.


I am currently re-compiling my rootfs to not omit the framepointers and
then will hopefully be able to have useful output of perf. Is the current
behavior expected/wanted?


holger


[1] http://cgit.osmocom.org/cgit/osmo-bts/tree/contrib/sysmobts.service
[2] http://paste.lisp.org/display/135526
[3] http://paste.lisp.org/display/135527



More information about the systemd-devel mailing list