Re: performance tuning, problem with paravirtualized clock

Anthony Liguori
2008-04-06T22:08:29Z

Nikola Ciprich wrote:
> Hi Anthony!
> Anthony Liguori wrote:
>
>> I would think you should get about 70% of native with what you've done
>> about. I've not seen instabilities with CONFIG_KVM_CLOCK myself.
>>
>> Setting up a hugetlbfs mount and using -mem-path may give you a bit of
>> a bump too but I'd be surprised if it was more than 5%
>>
> I've tried it now, and starting kvm with -mem-path pointing to hugetlbfs
> mounted dir immediately fails and I see following message in dmesg of host:
> VM: killing process qemu-system-x86
> pointing to tmpfs mounted dir seems to work, I'll measure performance
> gain...
>

You won't see a gain with tmpfs. Make sure you reserve huge pages
first. For a 1GB guest, you'll need something like:

echo 540 > /proc/sys/vm/nr_hugepages

When you create a VM, you need a bit more memory than 1GB for per-guest
overhead. That's why I reserve 540 instead of 512. You can probably
get away with 530 really.

Check that it succeeded by cat'ing /proc/meminfo.

>> The next biggest win you're going to see is using NPT (available in
>> the recent AMD Barcelona/Phenom processors). NPT + hugetblfs should
>> get you pretty close to native (I'd reckon 95-98%).
>>
> Yup, it seemed to me that kvm performes WAY better on my phenom based
> home desktop! I'll check that later too
>

Definitely. A parallel compile is one of the best case scenarios for
NPT so you should see the most dramatic improvement there.

>> On the Intel side of things, you'll have to wait until the Nehalem
>> which will support EPT (which is Intel's version of NPT).
>>
>> Can you be specific about your guest configurations? Are you using
>> -smp 8?
>>
> yes, I'm using -smp 8
>

It's not quite apples to apples then since you're sharing CPUs with the
host. Typically, if I'm benchmarking an 8-way system with 2GB of RAM,
I'll create a 4-way guest with 1GB of RAM and then to generate native
numbers, reboot the host with maxcpus=4 mem=1G.

Regards,

Anthony Liguori

>> Regards,
>>
>> Anthony Liguori
>>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Register now and save $200. Hurry, offer ends at 11:59 p.m.,
> Monday, April 7! Use priority code J8TLD2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel