Re: performance tuning, problem with paravirtualized clock

Avi Kivity
2008-04-07T04:14:39Z

Nikola Ciprich wrote:
> Hi,
> I spent some time trying to tune performance of KVM guest using kernel
> compilation as a kind of benchmark (I'm using virtual machines for
> compiling a lot, so it's good benchmark for me in general)
>
> Host machine: 2x quad core XEON E5420 @ 2.50GHz, 4GB RAM, 2.6.24 + kvm-64
> guest configuration: all 8 cores available, 2GB RAM, 2.6.24 or latest GIT
> + kvm-64
>
> some results:
> - compilation in KVM guest is roughly 2x slower than on bare metal.
>

50% scaling is actually quite good for 8-way.

What do you get for 4-way guests?

> - enabling CONFIG_KVM_GUEST under latest GIT with kvm-64 patch applied
> decreased compile time by about 10%, which is nice!
>
>

We expect to improve this some more as paravirt_ops improves.

> Is there currently anything more I could do to improve performance? I'm
> wandering what is slowing compilation, if I compare some CPU intensive
> application (ie bzip2), it seems to run in nearly native speed, but kernel
> compilation is much slower even if run from ramdisk, maybe it could be
> improved further by tunning scheduler etc?
>
>

As others mentioned, large pages may help somewhat, as well as newer
hardware. kvm-65 also improves scalability.

How much cpu does the qemu process consume? Perfect utilization would
be around 800%. What's the system/user ratio (I think you need to use
2.6.25-rc to get accurate results for this)?

Can you provide the result of 'kvm_stat -1' taken a few times during a
compile run?

--
Any sufficiently difficult bug is indistinguishable from a feature.