[libvirt-users] performance with libvirt and kvm

Hi, I am seeing a performance degradation while using libvirt to start my vm (kvm). vm is fedora 12 and host is also fedora 12, both with 2.6.32.10-90.fc12.i686. Here are the statistics from iperf :
From VM: [ 3] 0.0-30.0 sec 199 MBytes 55.7 Mbits/sec
From host : [ 3] 0.0-30.0 sec 331 MBytes 92.6 Mbits/sec
libvirt command as seen from ps output : /usr/bin/qemu-kvm -S -M pc-0.11 -enable-kvm -m 512 -smp 1 -name f12kvm1 -uuid 9300bfe2-2b9c-d9f0-3b03-9c7fe9934393 -monitor unix:/var/lib/libvirt/qemu/f12kvm1.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/f12.img,if=ide,bus=0,unit=0,boot=on,format=raw -drive if=ide,media=cdrom,bus=1,unit=0,format=raw -net nic,macaddr=52:54:00:51:7c:39,vlan=0,model=virtio,name=net0 -net tap,fd=21,vlan=0,name=hostnet0 -serial pty -parallel none -usb -vnc 127.0.0.1:0 -k en-us -vga cirrus -balloon virtio If I start a similar vm using qemu-kvm directly, the performance matches with the host. qemu kvm : [ 3] 0.0-30.0 sec 329 MBytes 91.9 Mbits/sec TCP window size is 64K for all the cases. Command used : qemu-kvm vdisk.img -m 512 -net nic,model=virtio macaddr=$macaddress -net tap,script=/etc/qemu-ifup Any clues? Thanks, Nirmal

On Tue, Aug 3, 2010 at 11:04 PM, Nirmal Guhan <vavatutu@gmail.com> wrote:
I am seeing a performance degradation while using libvirt to start my vm (kvm). vm is fedora 12 and host is also fedora 12, both with 2.6.32.10-90.fc12.i686. Here are the statistics from iperf :
From VM: [ 3] 0.0-30.0 sec 199 MBytes 55.7 Mbits/sec [...] qemu kvm : [ 3] 0.0-30.0 sec 329 MBytes 91.9 Mbits/sec
Is this what you are comparing: 91.9 -> 55.7 Mbits/s?
Command used : qemu-kvm vdisk.img -m 512 -net nic,model=virtio macaddr=$macaddress -net tap,script=/etc/qemu-ifup
Have you tried to bisect the command-lines by dropping options from the libvirt command-line until you arrive at the manual qemu-kvm command-line? Try using your own tap networking instead of libvirt's but otherwise keeping libvirt's command-line as much as possible. Can you use /var/lib/libvirt/f12.img with the manual qemu-kvm instead of the vdisk.img file? In general, try to compare same with same and eliminate variables. Stefan
participants (2)
-
Nirmal Guhan
-
Stefan Hajnoczi