Re: kvm very slow

Ulrich Schreiner
2007-08-02T19:31:27Z

/sbin/hdparm /dev/sda

/dev/sda:
IO_support = 0 (default 16-bit)
readonly = 0 (off)
readahead = 256 (on)
geometry = 3263/255/63, sectors = 52428800, start = 0

top in the guest-vm shows nothing special

top - 10:27:37 up 13:09, 2 users, load average: 0.05, 0.07, 0.02
Tasks: 74 total, 2 running, 72 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 0.0%sy, 0.0%ni, 99.7%id, 0.3%wa, 0.0%hi, 0.0%si,
0.0%st
Mem: 255396k total, 161060k used, 94336k free, 8728k buffers
Swap: 1048568k total, 4k used, 1048564k free, 42716k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4592 root 15 0 2204 976 792 R 0.3 0.4 0:00.04 top
1 root 18 0 2140 636 548 S 0.0 0.2 0:01.44 init
2 root RT 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
3 root 34 19 0 0 0 S 0.0 0.0 0:00.00 ksoftirqd/0

dmesg in the host: well i cannot find any entries of interest. here is a
link to the dmesg:

http://usc.innuendo.de/kvm/dmesg.txt

Avi Kivity schrieb:
> Ulrich Schreiner wrote:
>> dmesg|grep kvm
>>
>> SELinux: initialized (dev kvmfs, type kvmfs), uses genfs_contexts
>> kvm: emulating exchange as write
>>
>>
>
> There may be messages that aren't prefixed with 'kvm:' (that's a bug
> btw). Please check.
>
>> now booting into a F7 image, after the system is ready (and in idle):
>>
>> top
>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
>> 14917 root 20 0 332m 71m 66m S 6 0.9 1:17.05 qemu-kvm
>> 14954 root 20 0 14552 1072 812 R 0 0.0 0:00.01 top
>> 1 root 20 0 10320 680 572 S 0 0.0 0:02.02 init
>>
>> kvm_stat (snapshot):
>>
>> kvm statistics
>>
>> exits 12254399 79079
>> halt_exits 326543 4632
>> invlpg 0 0
>> io_exits 6539798 74320
>> irq_exits 43523 29
>> irq_window 4984 0
>> mmio_exits 1319016 0
>> pf_fixed 3140955 56
>> pf_guest 448187 6
>> request_irq 0 0
>> signal_exit 39728 0
>> tlb_flush 29511 31
>>
>
> Wow -- lots of I/O exits. What does 'top' in the guest say? 'hdparm
> /dev/hda' in the guest?
>
>> when logging into the virtual machine (via ssh) the virtual world is
>> very slow: i set the time with "ntpdate" and wait exact one minute in
>> reality. in the virtual image only 24sec are gone!
>>
>> and everything else in the image is really slow.
>>
>>