On my Debian 7 Wheezy systems running LXC, I have recently seen libvirt_lxc go up to 100% cpu utilization on a continuous basis. The brute force fix was to restart the guest. But that isn't a good idea.
There is a suggestion at [Bug 1005570] libvirt_lxc consumes 100% cpu - msg#00023 that:
When this 100% cpu problem occurs, can anyone tell me if they still see a process running as a child of the 'libvirt_lxc' process ? Whether a zombie or normal process.
Looking at the code, the only way I can see us getting into this problem, is if the guest closed its console (STDIO) streams, but did not exit. We should always get SIG_CHILD if the process exited, so I'm thinking perhaps the container's init process closed stdin/out/err, but kept running
When I logged in via the lxc console as root, the high cpu utilization went a way.
As a side note, to login as root via the lxc console, I had to add 'pts/0' to /etc/securetty. I also only have one tty listed in /etc/inittab:
# Normally not reached, but fallthrough in case of emergency. z6:6:respawn:/sbin/sulogin 1:2345:respawn:/sbin/getty 38400 tty1 #2:23:respawn:/sbin/getty 38400 tty2 #3:23:respawn:/sbin/getty 38400 tty3 #4:23:respawn:/sbin/getty 38400 tty4 #5:23:respawn:/sbin/getty 38400 tty5 #6:23:respawn:/sbin/getty 38400 tty6
Let me see if these settings actually help prevent further recurrence of the high cpu usage in libvirt_lxc.