From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Thomas Gleixner <tglx@linutronix.de>,
Nick Piggin <npiggin@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [benchmark] 1% performance overhead of paravirt_ops on native kernels
Date: Tue, 26 May 2009 11:42:13 -0700 [thread overview]
Message-ID: <4A1C3805.7060404@goop.org> (raw)
In-Reply-To: <20090525091527.GA7535@elte.hu>
Ingo Molnar wrote:
> I did more 'perf stat mmap-perf 1' measurements (bound to a single
> core, running single thread - to exclude cross-CPU noise), which in
> essence measures CONFIG_PARAVIRT=y overhead on native kernels:
>
Thanks for taking the time to make these measurements. You'll agree
they're much better numbers than the last time you ran these tests?
> Performance counter stats for './mmap-perf':
>
> [vanilla] [PARAVIRT=y]
>
> 1230.805297 1242.828348 task clock ticks (msecs) + 0.97%
> 3602663413 3637329004 CPU cycles (events) + 0.96%
> 1927074043 1958330813 instructions (events) + 1.62%
>
> That's around 1% on really fast hardware (Core2 E6800 @ 2.93 GHz,
> 4MB L2 cache), i.e. still significant overhead. Distros generally
> enable CONFIG_PARAVIRT, even though a large majority of users never
> actually runs them as Xen guests.
>
Did you do only a single run, or is this the result of multiple runs?
If so, what was your procedure? How did you control for page
placement/cache effects/other boot-to-boot variations?
Your numbers are not dissimilar to my measurements, but I also saw up to
1% performance improvement vs native from boot to boot (I saw up to 10%
reduction of cache misses with pvops, possibly because of its
de-inlining effects).
I also saw about 1% boot to boot variation with the non-pvops kernel.
While I think pvops does add *some* overhead, I think the absolute
magnitude is swamped in the noise. The best we can say is "somewhere
under 1% on modern hardware".
> Are there plans to analyze and fix this overhead too, beyond the
> paravirt-spinlocks overhead you analyzed? (Note that i had
> CONFIG_PARAVIRT_SPINLOCKS disabled in this test.)
>
> I think only those users should get overhead who actually run such
> kernels in a virtualized environment.
>
> I cannot cite a single other kernel feature that has so much
> performance impact when runtime-disabled. For example, an often
> cited bloat and overhead source is CONFIG_SECURITY=y.
>
Your particular benchmark does many, many mmap/mprotect/munmap/mremap
calls, and takes a lot of pagefaults. That's going to hit the hot path
with lots of pte updates and so on, but very few security hooks. How
does it compare with a more balanced workload?
> Its runtime overhead (same system, same workload) is:
>
> [vanilla] [SECURITY=y]
>
> 1219.652255 1230.805297 task clock ticks (msecs) + 0.91%
> 3574548461 3602663413 CPU cycles (events) + 0.78%
> 1915177924 1927074043 instructions (events) + 0.62%
>
> ( With the difference that the distros that enable CONFIG_SECURITY=y
> tend to install and use at least one security module by default. )
>
> So everyone who runs a CONFIG_PARAVIRT=y distro kernel has 1% of
> overhead in this mmap-test workload - even if no Xen is used on that
> box, ever.
>
So you're saying that:
* CONFIG_SECURITY adding +0.91% to wallclock time is OK, but pvops
adding +0.97% is not,
* your test is sensitive enough to make 0.06% difference
significant, and
* this benchmark is representative enough of real workloads that its
results are overall meaningful?
> Config attached.
>
Is this derived from a RH distro config?
J
next prev parent reply other threads:[~2009-05-26 18:42 UTC|newest]
Thread overview: 80+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 0:16 Performance overhead of paravirt_ops on native identified Jeremy Fitzhardinge
2009-05-14 1:10 ` H. Peter Anvin
2009-05-14 8:25 ` Peter Zijlstra
2009-05-14 14:05 ` H. Peter Anvin
2009-05-14 17:36 ` Jeremy Fitzhardinge
2009-05-14 17:50 ` H. Peter Anvin
2009-05-14 8:05 ` [Xen-devel] Performance overhead of paravirt_ops on nativeidentified Jan Beulich
2009-05-14 8:33 ` Peter Zijlstra
2009-05-14 17:45 ` Jeremy Fitzhardinge
2009-05-15 8:10 ` Jan Beulich
2009-05-15 18:50 ` Jeremy Fitzhardinge
2009-05-18 7:19 ` Jan Beulich
2009-05-20 22:42 ` Jeremy Fitzhardinge
2009-05-15 18:18 ` [tip:x86/urgent] x86: Fix performance regression caused by paravirt_ops on native kernels tip-bot for Jeremy Fitzhardinge
2009-05-21 22:42 ` Performance overhead of paravirt_ops on native identified Chuck Ebbert
2009-05-21 22:48 ` Jeremy Fitzhardinge
2009-05-21 23:10 ` H. Peter Anvin
2009-05-22 1:26 ` Xin, Xiaohui
2009-05-22 3:39 ` H. Peter Anvin
2009-05-22 4:27 ` Jeremy Fitzhardinge
2009-05-22 5:59 ` Xin, Xiaohui
2009-05-22 16:33 ` H. Peter Anvin
2009-05-22 22:44 ` Jeremy Fitzhardinge
2009-05-22 22:47 ` H. Peter Anvin
2009-05-25 9:15 ` [benchmark] 1% performance overhead of paravirt_ops on native kernels Ingo Molnar
2009-05-26 18:42 ` Jeremy Fitzhardinge [this message]
2009-05-28 6:17 ` Nick Piggin
2009-05-28 20:57 ` Jeremy Fitzhardinge
2009-05-30 10:23 ` Ingo Molnar
2009-06-02 14:18 ` Chris Mason
2009-06-02 14:49 ` Ulrich Drepper
2009-06-02 15:03 ` Chris Mason
2009-06-02 15:22 ` Ulrich Drepper
2009-06-02 16:20 ` Chris Mason
2009-06-02 18:13 ` Pekka Enberg
2009-06-02 18:06 ` Pekka Enberg
2009-06-02 18:27 ` Chris Mason
2009-06-03 6:33 ` Jeremy Fitzhardinge
2009-06-02 19:14 ` Thomas Gleixner
2009-06-02 19:51 ` Chris Mason
2009-06-03 12:38 ` Rusty Russell
2009-06-03 16:09 ` Linus Torvalds
[not found] ` <200906041554.37102.rusty@rustcorp.com.au>
2009-06-04 15:02 ` Linus Torvalds
2009-06-04 21:52 ` Dave McCracken
2009-06-05 7:31 ` Gerd Hoffmann
2009-06-05 14:31 ` Rusty Russell
2009-06-06 18:54 ` Anders K. Pedersen
2009-06-05 4:46 ` Rusty Russell
2009-06-05 14:54 ` Linus Torvalds
2009-06-07 0:53 ` Rusty Russell
2009-06-08 14:53 ` Linus Torvalds
2009-06-09 9:39 ` Nick Piggin
2009-06-09 11:17 ` Ingo Molnar
2009-06-09 12:10 ` Nick Piggin
2009-06-09 12:25 ` Ingo Molnar
2009-06-09 12:42 ` Nick Piggin
2009-06-09 12:56 ` Avi Kivity
2009-06-09 15:18 ` Linus Torvalds
2009-06-09 23:33 ` Paul Mackerras
2009-06-10 1:26 ` Ingo Molnar
2009-06-09 15:07 ` Linus Torvalds
2009-06-09 15:09 ` H. Peter Anvin
2009-06-09 18:06 ` Linus Torvalds
2009-06-09 18:07 ` Linus Torvalds
2009-06-09 22:48 ` Matthew Garrett
2009-06-09 22:54 ` H. Peter Anvin
2009-06-09 14:54 ` Linus Torvalds
2009-06-09 14:57 ` Ingo Molnar
2009-06-09 15:55 ` Avi Kivity
2009-06-09 15:38 ` Nick Piggin
2009-06-09 16:00 ` Linus Torvalds
2009-06-09 16:21 ` Nick Piggin
2009-06-09 16:26 ` Linus Torvalds
2009-06-09 16:45 ` Nick Piggin
2009-06-09 17:08 ` Linus Torvalds
2009-06-10 5:53 ` Nick Piggin
2009-06-17 9:40 ` Pavel Machek
2009-06-17 9:56 ` Nick Piggin
2009-06-10 6:29 ` Peter Zijlstra
2009-06-04 6:58 Rusty Russell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1C3805.7060404@goop.org \
--to=jeremy@goop.org \
--cc=a.p.zijlstra@chello.nl \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome