Bug 576924
Summary: | KVM is too slow (~16% of the time is spent in disas_insn) and the load is high (15%) | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Catalin BOIE <fedora-bugzilla> |
Component: | kvm | Assignee: | Glauber Costa <gcosta> |
Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 12 | CC: | berrange, clalance, ehabkost, gcosta, knoel, 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: | 2010-03-27 12:29:49 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Catalin BOIE
2010-03-25 16:10:40 UTC
After a night, I can provide some missing information: SELinux in enforcing, hardware virtualization enabled and used. That 15% is from a host core, maybe was not clear. Guest has 1 CPU. Host details: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU 6400 @ 2.13GHz stepping : 6 cpu MHz : 1600.000 cache size : 2048 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow bogomips : 4266.54 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual disas_insn() is only run in tcg mode. Make sure you processor supports hardware virtualization and that the kvm modules are loaded. lsmod|grep kvm kvm_intel 34764 3 kvm 205352 1 kvm_intel ps ax|grep kvm /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name f13alpha -uuid ca7ce04f-3482-cea9-876b-e17667d65ed9 -monitor unix:/var/lib/libvirt/qemu/f13alpha.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/f13alpha.img,if=virtio,index=0,boot=on,format=qcow2 -drive file=/var/lib/libvirt/images/Fedora-13-Alpha-i386-DVD.iso,if=ide,media=cdrom,index=2,format=raw -net nic,macaddr=52:54:00:15:e1:a5,vlan=0,model=virtio,name=virtio.0 -net tap,fd=17,vlan=0,name=tap.0 -serial pty -parallel none -usb -usbdevice tablet -vnc 127.0.0.1:1 -k en-us -vga cirrus -soundhw es1370 Seems that kvm is used, right? But, surprise, perf says: 8.37% qemu-kvm /usr/bin/qemu-kvm [.] slirp_init 6.15% qemu-kvm /lib/libc-2.11.1.so [.] __GI_memcpy 3.54% qemu-kvm /usr/bin/qemu-kvm [.] main 3.25% qemu-kvm /usr/bin/qemu-kvm [.] cpu_x86_exec 2.76% qemu-kvm /usr/bin/qemu-kvm [.] watch_mem_writel 2.35% qemu-kvm [kernel] [k] fget_light 2.27% qemu-kvm [kernel] [k] system_call 1.87% qemu-kvm /usr/bin/qemu-kvm [.] gen_helper_cmpneqpd 1.85% qemu-kvm [kernel] [k] do_select 1.78% qemu-kvm /lib/librt-2.11.1.so [.] __GI_clock_gettime 1.68% qemu-kvm [kernel] [k] _spin_lock_irqsave 1.60% qemu-kvm /usr/bin/qemu-kvm [.] m_copy 1.59% qemu-kvm /usr/bin/qemu-kvm [.] dsp_write 1.56% qemu-kvm [kernel] [k] fput 1.33% qemu-kvm [kernel] [k] _spin_unlock_irqrestore 1.33% qemu-kvm /usr/bin/qemu-kvm [.] watch_mem_writew 1.32% qemu-kvm [kernel] [k] sysenter_past_esp So, no trace of disas_insn(). Very strange. But, the load on the host is still at 15% when the guest is in text mode and running nothing (almost). New perf report: 7.09% qemu-kvm /lib/libc-2.11.1.so [.] __GI_memcpy 4.00% qemu-kvm /usr/bin/qemu-kvm [.] cpu_x86_exec 3.63% qemu-kvm /usr/bin/qemu-kvm [.] main 3.63% qemu-kvm /usr/bin/qemu-kvm [.] watch_mem_writel 2.74% qemu-kvm [kernel] [k] system_call 2.68% qemu-kvm /usr/bin/qemu-kvm [.] gen_helper_cmpneqpd 2.51% qemu-kvm [kernel] [k] fget_light 2.40% qemu-kvm /lib/librt-2.11.1.so [.] __GI_clock_gettime 2.24% qemu-kvm [kernel] [k] do_select 2.03% qemu-kvm [kernel] [k] _spin_lock_irqsave 1.86% qemu-kvm [kernel] [k] _spin_unlock_irqrestore 1.85% qemu-kvm /usr/bin/qemu-kvm [.] watch_mem_writew 1.77% qemu-kvm [kernel] [k] fput 1.69% qemu-kvm [kernel] [k] sysenter_past_esp 1.53% qemu-kvm /usr/bin/qemu-kvm [.] sunkbd_event 1.43% qemu-kvm /usr/bin/qemu-kvm [.] gen_helper_cmpunordss 1.42% qemu-kvm /usr/bin/qemu-kvm [.] gen_helper_cmpltpd It is normal? Thank you! More data: Guest: # init 1: what remain running: udev and init, modules: ipv6, sunrpc and virtio_blk. Host: Around 12% CPU usage for qemu-kvm process; perf: samples pcnt kernel function _______ _____ _______________ 816.00 - 5.2% : fget_light 762.00 - 4.9% : system_call 672.00 - 4.3% : do_select 599.00 - 3.8% : _spin_lock_irqsave 569.00 - 3.6% : fput 512.00 - 3.3% : sysenter_past_esp 458.00 - 2.9% : _spin_unlock_irqrestore 391.00 - 2.5% : avc_has_perm_noaudit 382.00 - 2.4% : copy_from_user 336.00 - 2.1% : copy_to_user 291.00 - 1.9% : ktime_get_ts 290.00 - 1.9% : read_tsc 288.00 - 1.8% : audit_syscall_entry 259.00 - 1.7% : _spin_lock_irq 247.00 - 1.6% : __copy_to_user_ll 12% seems too much for a idle guest, isn't it? kvm module being loaded, does not mean kvm is necessarily being used. Your bios can disable it, for example. If this is the case, your dmesg should be saying something. lsmod|grep kvm kvm_intel 34764 3 kvm 205352 1 kvm_intel dmesg | grep -i kvm: kvm: emulating exchange as write Reference count 3 means that is used, right? Yes. But gen_helper_cmpneqpd() means it isn't used by the qemu you are tracing. Please make sure there is only one qemu-kvm running and that it is using kvm (verify using lsof). # fuser /dev/kvm -> nothing Started a f13 guest fuser /dev/kvm returns only one pid: 6457 (correct one) ps ax|grep 6457: 6457 ? Sl 1:03 /usr/bin/qemu-kvm -S -M pc-0.11 -m 512 -smp 1 -name f13alpha -uuid ca7ce04f-3482-cea9-876b-e17667d65ed9 -monitor unix:/var/lib/libvirt/qemu/f13alpha.monitor,server,nowait -boot c -drive file=/var/lib/libvirt/images/f13alpha.img,if=virtio,index=0,boot=on,format=qcow2 -net none -serial none -parallel none -usb -vnc 127.0.0.1:1 -k en-us -vga cirrus Inside guest: init 1 perf top --pid=6457: 54.00 - 8.3% : fget_light 44.00 - 6.8% : system_call 41.00 - 6.3% : do_select 35.00 - 5.4% : _spin_lock_irqsave 33.00 - 5.1% : fput 33.00 - 5.1% : sysenter_past_esp 32.00 - 4.9% : avc_has_perm_noaudit 26.00 - 4.0% : _spin_unlock_irqrestore 21.00 - 3.2% : __might_sleep 17.00 - 2.6% : copy_to_user 16.00 - 2.5% : ktime_get_ts 16.00 - 2.5% : copy_from_user 15.00 - 2.3% : read_tsc 11.00 - 1.7% : audit_syscall_entry 11.00 - 1.7% : audit_syscall_exit Host load is at around 1%. I do not understand why I cannot reproduce anymore! So, let's close it and I will reopen it if I can reproduce. |