public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: David Sharp <dhsharp@google.com>
Cc: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>, Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michael Rubin <mrubin@google.com>
Subject: Re: Benchmarks of kernel tracing options (ftrace, ktrace, lttng and perf)
Date: Tue, 16 Nov 2010 15:28:44 -0500	[thread overview]
Message-ID: <20101116202844.GA1016@Krystal> (raw)
In-Reply-To: <AANLkTi=6EBZeZ+56z_wbDuU1xTmC0saSTMDmqbqDS4Jr@mail.gmail.com>

* David Sharp (dhsharp@google.com) wrote:
[...]
> Results for amount of time to execute a tracepoint (includes previous results):
> ktrace: 200ns   (old)
> ftrace: 224ns   (old, w/ handcoded tracepoint, not syscall tracing)
> lttng: 449ns    (new)
> perf: 1047ns    (new)
> 
> Also interesting:
> ftrace: 587ns   (old, w/ syscall tracing)
> This just shows that syscall tracing is much slower than a normal tracepoint.

As I pointed out in my email a few weeks ago, the LTTng comparison is simply
bogus because the "syscall tracing" thread-flag is active, which calls into
syscall tracing, after saving all registers, from entry_*.S, both at syscall
entry and exit.

I did benchmarks using Steven's ring_buffer_benchmark kernel module, which calls
tracing in a loop, for both Ftrace and the Generic Ring Buffer (which is derived
from LTTng). The results are:

Intel Xeon 2.0GHz

ftrace:  103 ns/entry (no reader)
lttng:    83 ns/entry (no reader) (with the generic ring buffer library)

So, given that even after I pointed out that the results above were bogus,
people took the numbers for granted, and given that David seems busy on other
things, I thought I should set records straight.

Thanks,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

      parent reply	other threads:[~2010-11-16 20:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTim8c+FLo11XJbTmTjiuucn-9UJD0Vui=fvUgCd+@mail.gmail.com>
     [not found] ` <AANLkTikd6sawwJeBm76QLeowXj0GBAf=wpRVgG8x5MOp@mail.gmail.com>
     [not found]   ` <AANLkTi=Dw-dxkUgYLZYBKb5sGYcdGcpS0OH_fEHW51Jr@mail.gmail.com>
2010-10-28 18:20     ` Benchmarks of kernel tracing options (ftrace, ktrace, lttng and perf) David Sharp
2010-10-28 19:27       ` Mathieu Desnoyers
2010-10-28 23:24         ` Michael Rubin
2010-10-29  4:37           ` Mathieu Desnoyers
2010-11-16 20:28       ` Mathieu Desnoyers [this message]

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=20101116202844.GA1016@Krystal \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=dhsharp@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mrubin@google.com \
    --cc=rostedt@goodmis.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