Bug 540970

Summary: virt-manager default parameters order of magnitude slower qemu-kvm default parameters
Product: [Fedora] Fedora Reporter: Josh Cogliati <jjcogliati-r1>
Component: kvmAssignee: Glauber Costa <gcosta>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: berrange, clalance, ehabkost, gcosta, markmc, quintela, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-24 11:50:10 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Josh Cogliati 2009-11-24 10:46:12 EST
Description of problem:
Running virtual images with virt-manager is much slower than just manually running the image.  This makes virt-manager unusable for most purposes. This is due to some of the parameters used by virt-manager.

Version-Release number of selected component (if applicable):
qemu-system-x86-0.11.0-11.fc12.x86_64
Linux lithium.inel.gov 2.6.31.5-127.fc12.x86_64 #1 SMP Sat Nov 7 21:11:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux
Physical CPU: Intel(R) Xeon(R) CPU 5150  @ 2.66GHz


How reproducible:
Every time.


Steps to Reproduce:
1. First try running the Fedora 12 live cd manually:
qemu-kvm -boot d -m 512 -cdrom Fedora-12-x86_64-Live.iso
Approximately 30 second boot time.
2. Next create a run with virt-manager.  Use the live cd, put in the same amount of ram etc.
Note that this uses the following command line:
/usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name livecd -uuid 0586f280-f718-60d8-5bd4-4d258f16e823 -monitor unix:/var/lib/libvirt/qemu/livecd.monitor,server,nowait -boot d -drive file=/var/lib/libvirt/images/Fedora-12-x86_64-Live.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:00:73:9b,vlan=0,model=virtio,name=virtio.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370
Boot time is approximately 9 minutes.  

Actual results:
Boot times and other things are vastly slower with virt-manager than direct qemu-kvm runs.  Once the image is booted up, the cpu usage is too slow to be reasonable for using the virtual image.


Expected results:
The boot times and other usages should be comparable.  

Additional Info:
Using the same command line as virt-manager (without the -monitor parameter and the -S parameter) uses results in the same slowdown.  

That is:
/usr/bin/qemu-kvm -M pc-0.11 -m 512 -smp 1 -name livecd -uuid 0586f280-f718-60d8-5bd4-4d258f16e823  -boot d -drive file=/var/lib/libvirt/images/Fedora-12-x86_64-Live.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:00:73:9b,vlan=0,model=virtio,name=virtio.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370
Comment 1 Daniel Berrange 2009-11-24 10:53:59 EST
Please provide the following data

  - Output of     virsh -c qemu:///system capabilities
  - Log file /var/log/libvirt/qemu/livecd.log
  - Log file $HOME/.virt-manager/virt-manager.log
Comment 2 Josh Cogliati 2009-11-24 11:50:10 EST
Okay.  Thanks.  It was my mistake.  I had set the /dev/kvm permissions to 0660 in Fedora 10 via a udev file, and when I upgraded to Fedora 12, that was the permissions that were used.  

I am closing this as not a bug, since it is particular to how I had set up my computer.  The only thing that I can think might be a bug is that virt-manager does not report the "Could not initialize KVM, will disable KVM support".  Neither for that matter does "virsh -c qemu:///system start livecd"

Partial listing of /var/log/libvirt/qemu/livecd.log
#Before
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name livecd -uuid 0586f280-f718-60d8-5bd4-4d258f16e823 -monitor unix:/var/lib/libvirt/qemu/livecd.monitor,server,nowait -boot d -drive file=/var/lib/libvirt/images/Fedora-12-x86_64-Live.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:00:73:9b,vlan=0,model=virtio,name=virtio.0 -net tap,fd=18,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:0 -vga cirrus -soundhw es1370 
open /dev/kvm: Permission denied
Could not initialize KVM, will disable KVM support
char device redirected to /dev/pts/3

#After fixing permissions
LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/bin QEMU_AUDIO_DRV=none /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name livecd -uuid 0586f280-f718-60d8-5bd4-4d258f16e823 -monitor unix:/var/lib/libvirt/qemu/livecd.monitor,server,nowait -boot d -drive file=/var/lib/libvirt/images/Fedora-12-x86_64-Live.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:00:73:9b,vlan=0,model=virtio,name=virtio.0 -net tap,fd=22,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -vga cirrus -soundhw es1370 
char device redirected to /dev/pts/6
Comment 3 Daniel Berrange 2009-11-24 12:03:52 EST
FYI, in Fedora 12, we provide a udev rule out of the box which sets  0666 on /dev/kvm, so all users can have hardware acceleration.