High CPU Idle Load running in KVM/QEMU
-
I am getting high idle CPU load running pfSense 2.2.6 amd64 on KVM/QEMU - ~ 15% CPU idle load on an Intel Pentium N3700. I would very much like to reduce this to (near-)zero.
Here are more details:
-
setup:
- KVM on Ubuntu 16.04 and Debian Jessie, both 64bit
- vanilla host kernels
- vanilla KVM & QEMU version 2.5 (from backports in Jessie, tried standard 2.1 as well)
- VMs with single CPU, 512MB RAM
- tried various VM drivers, both virtio and 'physical' ones for both storage and network with no noticeable load difference
- values below for single NAT network and CD drive only, no HDD (more NICs and HDD don't make a noticeable difference to CPU load) -
high idle CPU load in qemu-system_x86_64 process on host:
- ~ 15% on Intel Pentium N3700
- ~ 5% on Intel Core i5-3570 -
comparison normal FreeBSD 10.1 (on a separate note, Linux-based IPFire 0.0%):
- ~ 2% on Intel Pentium N3700
- ~ 0.3% on Intel Core i5-3570 -
top in both pfSense and FreeBSD guests shows that systems are idle, i.e. no noticeable CPU usage
-
powertop on hosts shows:
- > 300 events/s for pfSense (also shows ~ 250 events/s for apic_timer_fn)
- < 10 events/s for FreeBSD -
maybe also noteworthy:
- Single User mode at prompt for shell give same idle CPU load
- both pfSense and FreeBSD use 100% CPU in 'Safe Mode'
- attached 10s straces (options -TCw) for both FreeBSD and pfSense (It appears in terms of system calls the two are pretty much the same.)
I am wondering whether the CPU idle load difference may be because of the kernel (rather than user space) in pfSense doing something different to the vanilla FreeBSD one. (I am no FreeBSD expert whatsoever, so please forgive if this does not any sense.)
Any help with this would be hugely appreciated! Also, if there is any other diagnostics I can perform to get to the bottom of this, I'd certainly be more than willing to do so.
Thanks a lot & best regards,
Andree
pfSense_strace.txt
FreeBSD_strace.txt -