[lxc-users] Centos-7 x86_64 container - systemd-journald process eat CPU

mxs kolo kolomaxes at gmail.com
Tue Jul 29 16:37:56 UTC 2014


HI all

When container with centos-7 x86_64 started,  process systemd-journald
eat cpu in next loop:

epoll_wait(7, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}}, 1, -1) = 1
writev(2, [{"/dev/kmsg buffer overrun, some messages lost.", 45},
{"\n", 1}], 2) = 46
read(8, "", 8192)                       = 0
epoll_wait(7, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}}, 1, -1) = 1
writev(2, [{"/dev/kmsg buffer overrun, some messages lost.", 45},
{"\n", 1}], 2) = 46
read(8, "", 8192)                       = 0
epoll_wait(7, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}}, 1, -1) = 1
writev(2, [{"/dev/kmsg buffer overrun, some messages lost.", 45},
{"\n", 1}], 2) = 46
read(8, "", 8192)                       = 0
epoll_wait(7, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}}, 1, -1) = 1
writev(2, [{"/dev/kmsg buffer overrun, some messages lost.", 45},
{"\n", 1}], 2) = 46
read(8, "", 8192)                       = 0
epoll_wait(7, {{EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}}, 1, -1) = 1
writev(2, [{"/dev/kmsg buffer overrun, some messages lost.", 45},
{"\n", 1}], 2) = 46


[root at ce7-2 /]# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 /sbin/init
   10 ?        Rs     0:06 /usr/lib/systemd/systemd-journald
   27 ?        Ss     0:00 /bin/dbus-daemon --system
--address=systemd: --nofork --nopidfile --systemd-activation
   28 ?        Ss     0:00 /usr/lib/systemd/systemd-logind
   34 ?        Ss     0:00 /usr/sbin/crond -n
   35 lxc/console Ss+   0:00 /sbin/agetty --noclear -s console 115200 38400 9600
  155 ?        S      0:00 /bin/bash
  224 ?        Ss     0:00 /usr/sbin/sshd -D
  232 ?        R+     0:00 ps ax

After restart, it work fine:
[root at ce7-2 /]# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 /sbin/init
   27 ?        Ss     0:00 /bin/dbus-daemon --system
--address=systemd: --nofork --nopidfile --systemd-activation
   28 ?        Ss     0:00 /usr/lib/systemd/systemd-logind
   34 ?        Ss     0:00 /usr/sbin/crond -n
   35 lxc/console Ss+   0:00 /sbin/agetty --noclear -s console 115200 38400 9600
  155 ?        S      0:00 /bin/bash
  224 ?        Ss     0:00 /usr/sbin/sshd -D
  245 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
  248 ?        R+     0:00 ps ax


I disable kmsg in container config (lxc.kmsg = 0) and delete symlink
/var/lib/lxc/ce7-2/rootfs.dev/kmsg
and problem go away, after start systemd-journald not cycled.

Probably centos template must detect $release -gt 6 and set lxc.kmsg=0

b.r.
 Maxim Kozin


More information about the lxc-users mailing list