On 11/08/2010 05:23 PM, Richard W.M. Jones wrote:
On Mon, Nov 08, 2010 at 05:14:33PM +0100, Dennis Jacobfeuerborn wrote:
What I'm saying is that the same guest is running on tickless
kernels in both cases (F11 and F14) yet on the F14 kernel it uses
20% cpu whereas it uses just 1-2% on F11. So this leaves two
questions:

What else besides tickless-ness in the host kernel is causing that
the identical guest uses much more cpu resources on the f14 kernel.

Why is the "divider=10" for the guest necessary on f14 but not on f11?

The point is that it is the tickless kernel in the *guest* which
matters here.  By having either a tickless guest kernel or using
divider=10 (for guest kernels which cannot support tickless), KVM has
to inject fewer timer interrupts into the guest.

A guest which is "idle" isn't really idle if it is demanding that the
hypervisor sends it a timer interrupt 1000 times a second.  You can
either reduce that number (divider=10 =>  100 times a second), or you
make it so you only need a timer interrupt when there is something you
need to schedule (tickless).

In any case the host can't control what the guest requests.

Why it is that Fedora 11 does so much better than Fedora 14 with these
idle guests is an entirely separate question.  Please post the
qemu-kvm command line from both cases.

Not that the attached measurements were done booting the VM with the "single" option and without the "divider=10" option in the guest. On the Fedora 14 host I removed the "nohz=off" option (which wasn't present in the F11 case in the first place). This should result in a comparison among equals. (I edited the "top" header back in after it got remove by the grep for readability)

Regards,
  Dennis
VM:

CentOS release 5.5 (Final)
kernel /vmlinuz-2.6.18-194.17.4.el5 ro root=/dev/vg_zabbix/lv_root single
initrd /initrd-2.6.18-194.17.4.el5.img

Fedora 14:

kernel /vmlinuz-2.6.35.6-48.fc14.x86_64 ro root=/dev/mapper/vg_nexxus-root 
rd_MD_UUID=d0e1ac13:ad7a2a9d:c333df4c:e1daf2d5 rd_LVM_LV=vg_nexxus/root 
rd_MD_UUID=c162ffcd:a298f74d:bfe78010:bc810f04 rd_LVM_LV=vg_nexus/lv_swap 
rd_LVM_LV=vg_nexxus/swap rd_NO_LUKS rd_NO_DM LANG=en_US.UTF-8 
SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=de-latin1-nodeadkeys rhgb 
quiet nouveau.modeset=0
initrd /initramfs-2.6.35.6-48.fc14.x86_64.img

/usr/bin/qemu-kvm -S -M pc-0.11 -enable-kvm -m 512 -smp 
1,sockets=1,cores=1,threads=1 -name zabbix -uuid 
3a75ae8a-b8c0-2686-ff2e-fde7f6564854 -nodefconfig -nodefaults -chardev 
socket,id=monitor,path=/var/lib/libvirt/qemu/zabbix.monitor,server,nowait -mon 
chardev=monitor,mode=readline -rtc base=utc -boot c -drive 
file=/var/lib/libvirt/images/zabbix.img,if=none,id=drive-virtio-disk0,boot=on,format=qcow2
 -device 
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 
-device virtio-net-pci,vlan=0,id=net0,mac=52:54:00:73:5c:96,bus=pci.0,addr=0x3 
-net tap,fd=42,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device 
isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

[den...@nexxus ~]$ top -b -d 3|grep qemu-kvm
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 2995 qemu      20   0  808m  69m 3740 S 11.8  1.9   0:51.79 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.6  1.9   0:52.17 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 11.9  1.9   0:52.53 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.6  1.9   0:52.91 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:53.28 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 R 12.3  1.9   0:53.65 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.6  1.9   0:54.03 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 11.9  1.9   0:54.39 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:54.76 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 R 12.6  1.9   0:55.14 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:55.51 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.0  1.9   0:55.87 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.6  1.9   0:56.25 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 R 12.3  1.9   0:56.62 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:56.99 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:57.36 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 R 12.3  1.9   0:57.73 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 11.9  1.9   0:58.09 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.3  1.9   0:58.46 qemu-kvm
 2995 qemu      20   0  808m  69m 3740 S 12.6  1.9   0:58.84 qemu-kvm

Fedora 11:

kernel /vmlinuz-2.6.30.10-105.2.23.fc11.x86_64 ro 
root=/dev/mapper/vg_nexus-lv_root rhgb quiet
initrd /initrd-2.6.30.10-105.2.23.fc11.x86_64.img

/usr/bin/qemu-kvm -S -M pc-0.11 -enable-kvm -m 512 -smp 
1,sockets=1,cores=1,threads=1 -name zabbix -uuid 
3a75ae8a-b8c0-2686-ff2e-fde7f6564854 -nodefaults -chardev 
socket,id=monitor,path=/var/lib/libvirt/qemu/zabbix.monitor,server,nowait -mon 
chardev=monitor,mode=readline -rtc base=utc -boot c -drive 
file=/media/Windata/zabbix.img,if=none,id=drive-virtio-disk0,boot=on -device 
virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 
-drive if=none,media=cdrom,id=drive-ide0-1-0,readonly=on -device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -device 
virtio-net-pci,vlan=0,id=net0,mac=52:54:00:73:5c:96,bus=pci.0,addr=0x5 -net 
tap,fd=17,vlan=0,name=hostnet0 -chardev pty,id=serial0 -device 
isa-serial,chardev=serial0 -usb -vnc 127.0.0.1:0 -vga cirrus -device 
virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

[den...@nexusd ~]$ top -b -d 3|grep qemu-kvm
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 4575 root      20   0  833m  66m 3856 S  0.7  1.8   0:33.10 qemu-kvm
 4575 root      20   0  833m  66m 3856 S  0.3  1.8   0:33.11 qemu-kvm
 4575 root      20   0  833m  66m 3856 S  7.0  1.8   0:33.32 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.0  1.8   0:33.32 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  2.7  1.8   0:33.40 qemu-kvm
 4575 root      20   0  863m  66m 3856 S  0.0  1.8   0:33.40 qemu-kvm
 4575 root      20   0  863m  66m 3856 S  2.7  1.8   0:33.48 qemu-kvm
 4575 root      20   0  863m  66m 3856 S  0.3  1.8   0:33.49 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  4.3  1.8   0:33.62 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  3.0  1.8   0:33.71 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.7  1.8   0:33.73 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  6.3  1.8   0:33.92 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.3  1.8   0:33.93 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  3.3  1.8   0:34.03 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  4.0  1.8   0:34.15 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.3  1.8   0:34.16 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  3.7  1.8   0:34.27 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  3.0  1.8   0:34.36 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.3  1.8   0:34.37 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  7.3  1.8   0:34.59 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  0.3  1.8   0:34.60 qemu-kvm
 4575 root      20   0  803m  66m 3856 S  3.3  1.8   0:34.70 qemu-kvm
 4575 root      20   0  803m  66m 3856 R  3.7  1.8   0:34.81 qemu-kvm

_______________________________________________
virt mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/virt

Reply via email to