Re: [ANNOUNCE] kvm-14 release

Aurelien Jarno
2007-02-21T14:06:27Z

Avi Kivity a écrit :
> Aurelien Jarno wrote:
>> Avi Kivity a écrit :
>>
>>> Aurelien Jarno wrote:
>>>
>>>> The bad news is that kvm-14 seems to be a lot slower than kvm-12 +
>>>> modules from kernel 2.6.20. This is the case with a GNU/kFreeBSD guest.
>>>> kvm-12 was about 1.5 time faster than qemu + kqemu. kvm-20 is slower
>>>> than qemu without kqemu...
>>>>
>>>> Does anybody have an idea about this performance regression?
>>>>
>>>>
>>> What is your workload? How are you measuring performance?
>>>
>> Sorry to answer only now, it took me some time to do some more
>> measurements and have some numbers. I am simply building a Debian
>> package (simulpic) and measuring the build time. Basically the command is:
>>
>> apt-get source simulpic
>> cd simulpic-2005-1-28
>> time debuild -uc us
>>
>> It surely not a performance index, but I guess it is ok to compare
>> performances between version. It is also quite representative of my use
>> of the machine.
>>
>
> Real workloads (likr this) are more important than synthetic benchmarks.
>
>> The guest is Debian GNU/kFreeBSD amd64 (ie FreeBSD kernel + GNU libc).
>> It is accessed via ssh, and kvm is started with -nographic, so there is
>> no influence of xorg.
>>
>> I am doing my tests on an Athlon X2 3800+ machine, running a 2.6.20
>> kernel. During all my tests, the machine is not loaded with other tasks
>> (except systems tasks), so qemu or kvm have a full core available. Top
>> shows that the core is used between 95 and 100% during the whole build
>> in all cases.
>>
>> The tests I have made are presented below. In all cases I have verified
>> that the real time correspond to the time of my wall clock, it is
>> correct in all case given the resolution of my wall clock (1 s):
>>
>> qemu
>> ----
>> real 3m16.626s
>> user 2m22.654s
>> sys 0m41.738s
>>
>
> Is this qemu 0.8.2 or qemu 0.9.0?

It's qemu 0.9.0 + kqemu 1.3.0pre11. kqemu is enabled in user mode only
(kernel mode does not work well on amd64)

>> qemu + kqemu
>> ------------
>> real 0m51.529s
>> user 0m11.775s
>> sys 0m36.215s
>>
>> kvm 12 + modules from kernel 2.6.20
>> -----------------------------------
>> real 0m30.635s
>> user 0m16.357s
>> sys 0m8.511s
>>
>> kvm 12
>> ------
>> real 0m25.357s
>> user 0m16.259s
>> sys 0m6.496s
>>
>> kvm 13
>> ------
>> real 0m23.415s
>> user 0m15.177s
>> sys 0m5.811s
>>
>
> So far so good. Steady improvement. The low system time indicates a
> lot of I/O and inefficiency in the qemu device emulation (guest time is
> charged as system time).
>
>> kvm 14
>> ------
>> real 7m47.310s
>> user 5m17.359s
>> sys 2m3.184s
>>
>>
>> Using kvm 14, the system is clearly not responsive at all. You can see
>> that without running a benchmark.
>>
>
> kvm-14 is mostly qemu 0.9.0. Do you get the same results with kvm-14
> -no-kvm?

Here are the results:

real 3m45.459s
user 2m48.581s
sys 0m48.585s

It's a bit slower than qemu 0.9.0, but a lot faster than kvm 0.9.0 with
kvm enable.

> What is your disk image file format, or are you using a partition?

I am using a raw image file on an ext3 partition.

> Do the results change (on kvm-14) if you pin the guest to a core with
> 'taskset 1 qemu ...'

Bingo. It now works even faster than kvm-13!

real 0m22.307s
user 0m13.935s
sys 0m4.720

> Thank you for taking the time to do real measurements and report the
> results clearly. That makes it possible (I hope) to find the cause and
> fix it.

Thanks for your help! Do you think this problem is fixable? On my final
machine, I have a dozen of qemu/kvm running, and when I start them I
don't know how they will be used, and so how to pin them on the two cores.

--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32-8fiUuRrzOP0dnm+yROfE0A@public.gmane.org | aurelien-rXXEIb44qovR7s880joybQ@public.gmane.org
`- people.debian.org/~aurel32 | www.aurel32.net