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

Re: [Xen-devel] XEN PV Linux performance



On Sat, Jun 30, 2012 at 10:54:34PM +0800, Zhou Jacky wrote:
>    I re-post this from Xen-User maillist.
>

Hello,

>    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
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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