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

Re: [Xen-devel] XEN PV Linux performance



At 22:54 +0800 on 30 Jun (1341096874), 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.

gettimeofday() is often a vsyscall on native/HVM linux (i.e. it doesn't
actually make a system call), and I'm not sure that's the case on PV.
You could try coding up an actual system call (in assembly), or using a
libc wrapper that always makes a system call (I think getppid() is a
good choice but you should use strace to confirm it's making system
calls).

> So it seems that PV linux guest has poor performance in context switch case.

By context switch people usually mean changing from one process to
another, which is not what's happening here.

> How can I tune this or if there's any plan fixing this issue?

That depends -- what's your actual goal?  Do you actually care about
gettimeofday() performance or is there some other workload that's
running slowly for you?

Tim.

_______________________________________________
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®.