[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] XEN PV Linux performance

Thank for your quickly response.
Yes, it's a 64bit PV domU and also dom0 is 64bit.
So in this case can 32bit PAE PV domU get better performance since the hardware is x86_64 architecture?(there's not enough ring levels for hypervisor/kernel/user)
Need i change dom0 OS from 64bit to 32 bit?
Other question, in PAE PV kernel PSE need be enable? (I mean PAE 2MB page, I find PSE always be clear by XEN code)

2012/7/1 Pasi Kärkkäinen <pasik@xxxxxx>
On Sat, Jun 30, 2012 at 10:54:34PM +0800, Zhou Jacky wrote:
>    I re-post this from Xen-User maillist.


>    I found that xen PV linux performance is very poor comparing with native
>    linux or HVMPV linux in some case such as system call (which will cause
>    context switch).
>    Here is a very simple sample:
>    double geTime() {
>            struct timeval t;
>            gettimeofday(&t, 0);
>            return (double) t.tv_sec + (double) t.tv_usec / 1000000.0;
>    }
>    int geInc(int sum) {
>           return sum+1;
>    }
>    int main() {
>           for (i=0; i<; i++) {
>         geTime();
>    }
>    In PV linux guest, It will be 10 times slower than PVHVM linux guest.
>     While call getInc()  10000000 times, PV guest is a little faster then
>    HVMPV.
>    So it seems that PV linux guest has poor performance in context switch
>    case.
>    How can I tune this or if there's any plan fixing this issue?
>    I'm looking forward to get your feedback. Thank you.

Is this a 64bit PV domU ? If yes, then try with a 32bit PAE PV kernel.

64bit PV has a performance hit per x86_64 (amd64) architecture design,
there's not enough ring levels for hypervisor/kernel/user split in the amd64 spec,
so syscalls from usermode need to be trapped by the hypervisor.

32bit x86 does not have this limitation, ie. x86 has enough ring levels.

If you need 64bit VM, then it's better to use Xen PVHVM for this kind of workloads
with a lot of syscalls.

>    ---------------------------------------------------------------------------
>    XEN 4.1.2 + Dom 0 kernel 3.2 + Ubuntu 12.04 guest,  Intel(R) Xeon(R) CPU
>    E5620
>    Jacky

-- Pasi

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.