WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] [RFC] Correct/fast timestamping in apps under Xen [1 of

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: RE: [Xen-devel] [RFC] Correct/fast timestamping in apps under Xen [1 of 4]: Reliable TSC
From: Dan Magenheimer <dan.magenheimer@xxxxxxxxxx>
Date: Sat, 10 Oct 2009 07:22:51 -0700 (PDT)
Cc: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>, kurt.hackel@xxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, "Xen-Devel \(E-mail\)" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sat, 10 Oct 2009 07:23:44 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C6F5E9BC.171C1%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> On 10/10/2009 06:55, "Jeremy Fitzhardinge" <jeremy@xxxxxxxx> wrote:
> 
> > The kernel does about between 400k and 1.4M/sec, median 
> around ~600k,
> > for a git pull (which I think is single-threaded), and about
> > 200k-500k/sec for a kernel compile (-j4 on 2 vcpus).  
> Usermode is a much
> > lower rate; around 1000/sec for the kernel compile.
> > 
> > Baseline idle is around 1000/sec kernel, 10/sec user.
> > 
> > Also, my inline naked rdtsc benchmark shows that the 
> emulated rdtsc is
> > taking around 465ns (vs 30, a 15x slowdown).
> 
> Hmmm... So at 600k/sec, the kernel spends an appreciable 
> amount of time
> (1-2%) doing RDTSCs? And with emulation that'll be more like 25-30%.
> 
> It's quite a surprisingly high rate.
> 
>  -- Keir

I'm trying a kernel compile (-j4, 2 vcpus, 2 pcpus)
and seeing about 1300/sec kernel and 500/sec user.
My "idle" rate appears to be about 400/sec (kernel,
and every now and then a handful of user rdtscs).
That's with a cpu-only load.... 

# while true; do i=i+1; done && while true; do i=i+1; done

It seems to be about 100/sec for a truly idle domain.

With an NFS untar I am seeing higher numbers though
(~10K/sec).

(All these loads are on a EL5u2 32-bit PV guest.)

Jeremy, were you maybe measuring per hundred seconds, or
per minute?  Or, on the git pull, maybe your VNIC
throughput is much much higher than mine and there
is a getnstimeofday() call for each packet?

Another scary thought... what is gcc doing using
rdtsc?  Might it be randomly sensitive to the rdtsc
discontinuites one will encounter with migration
and we've just not seen it yet?  In other words,
is gcc a "fundamentally broken" app? ;-)  And what
is that other usermode app (service?) that seems to use
a handful of rdtsc's when the system is cpu-only loaded?
Is it using rdtsc safely?

The time ratio of emulated rdtsc to native rdtsc matches
what I measured on my machine (360 vs 22), so 15x
seems like a safe multiplier estimate to use.

Curiouser and curiouser...

Dan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel