xen-devel
RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation
To: |
Avi Kivity <avi@xxxxxxxxxx> |
Subject: |
RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation |
From: |
Dan Magenheimer <dan.magenheimer@xxxxxxxxxx> |
Date: |
Thu, 29 Oct 2009 08:55:55 -0700 (PDT) |
Cc: |
Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>, kurt.hackel@xxxxxxxxxx, Glauber Costa <glommer@xxxxxxxxxx>, the arch/x86 maintainers <x86@xxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Glauber de Oliveira Costa <gcosta@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, zach.brown@xxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, chris.mason@xxxxxxxxxx |
Delivery-date: |
Thu, 29 Oct 2009 08:57:21 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<4AE9AFAE.5020306@xxxxxxxxxx> |
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 |
> From: Avi Kivity [mailto:avi@xxxxxxxxxx]
> Sent: Thursday, October 29, 2009 9:07 AM
> To: Dan Magenheimer
> Cc: Jeremy Fitzhardinge; Glauber Costa; Jeremy Fitzhardinge; Kurt
> Hackel; the arch/x86 maintainers; Linux Kernel Mailing List;
> Glauber de
> Oliveira Costa; Xen-devel; Keir Fraser; Zach Brown; Chris Mason; Ingo
> Molnar
> Subject: Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall
> implementation
>
>
> On 10/29/2009 04:46 PM, Dan Magenheimer wrote:
> > No, the apps I'm familiar with (a DB and a JVM) need a timestamp
> > not a monotonic counter. The timestamps must be relatively
> > accurate (e.g. we've been talking about gettimeofday generically,
> > but these apps would use clock_gettime for nsec resolution),
> > monotonically increasing, and work properly across a VM
> > migration. The timestamps are taken up to a 100K/sec or
> > more so the apps need to ensure they are using the fastest
> > mechanism available that meets those requirements.
>
> Out of interest, do you know (and can you relate) why those apps need
> 100k/sec monotonically increasing timestamps?
I don't have any public data available for this DB usage, but basically
assume it is measuring transactions at a very high throughput, some
of which are to a memory-resident portion of the DB. Anecdotally,
I'm told the difference between non-vsyscall gettimeofday
and native rdtsc (on a machine with Invariant TSC support) can
affect overall DB performance by as much as 10-20%.
I did find the following public link for the JVM:
http://download.oracle.com/docs/cd/E13188_01/jrockit/tools/intro/jmc3.html
Search for "flight recorder". This feature is intended to
be enabled all the time, but with non-vsyscall gettimeofday
the performance impact is unacceptably high, so they are using
rdtscp instead (on those machines where it is available). With
rdtscp, the performance impact is not measureable.
Though the processor/server vendors have finally fixed the
"unsynced TSC" problem on recent x86 platforms, thus allowing
enterprise software to obtain timestamps at rdtsc performance,
the problem comes back all over again with virtualization
because of migration. Jeremy's vsyscall+pvclock is a great
solution if the app can ensure that it is present; if not,
the apps will instead continue to use rdtsc as even emulated
rdtsc is 2-3x faster than non-vsyscall gettimeofday.
Does that help?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, (continued)
- RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Dan Magenheimer
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Jeremy Fitzhardinge
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Avi Kivity
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Glauber Costa
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Avi Kivity
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Jeremy Fitzhardinge
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Avi Kivity
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Chris Mason
- RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Dan Magenheimer
- Re: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Avi Kivity
- RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation,
Dan Magenheimer <=
- RE: [Xen-devel] Re: [PATCH 3/5] x86/pvclock: add vsyscall implementation, Dan Magenheimer
- [Xen-devel] pvclock implementation in pv_ops kernel: why not __native_read_tsc()?, Dan Magenheimer
- [Xen-devel] Re: pvclock implementation in pv_ops kernel: why not __native_read_tsc()?, Jeremy Fitzhardinge
|
|
|