All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <compudj@krystal.dyndns.org>
To: Andrew McDermott <andrew.mcdermott@windriver.com>
Cc: Davide Libenzi <davidel@xmailserver.org>,
	Ingo Molnar <mingo@elte.hu>,
	ltt-dev@lists.casi.polymtl.ca,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	William Lee Irwin III <wli@holomorphy.com>
Subject: Re: [ltt-dev] [PATCH] Poll : introduce poll_wait_exclusive() new function
Date: Wed, 26 Nov 2008 17:27:15 -0500	[thread overview]
Message-ID: <20081126222714.GA10981@Krystal> (raw)
In-Reply-To: <v4skpeent3.fsf@swi-aim.swindon.wrsec.fr>

* Andrew McDermott (andrew.mcdermott@windriver.com) wrote:
> 
> Mathieu Desnoyers <compudj@krystal.dyndns.org> writes:
> 
> [...]
> 
> >> > Mathieu Desnoyers explained it cause following problem to LTTng.
> >> > 
> >> >    In LTTng, all lttd readers are polling all the available debugfs files
> >> >    for data. This is principally because the number of reader threads is
> >> >    user-defined and there are typical workloads where a single CPU is
> >> >    producing most of the tracing data and all other CPUs are idle,
> >> >    available to consume data. It therefore makes sense not to tie those
> >> >    threads to specific buffers. However, when the number of threads grows,
> >> >    we face a "thundering herd" problem where many threads can be woken up
> >> >    and put back to sleep, leaving only a single thread doing useful work.
> >> 
> >> Why do you need to have so many threads banging a single device/file?
> >> Have one (or any other very little number) puller thread(s), that 
> >> activates with chucks of pulled data the other processing threads. That 
> >> way there's no need for a new wakeup abstraction.
> >> 
> >> 
> >> 
> >> - Davide
> >
> > One of the key design rule of LTTng is to do not depend on such
> > system-wide data structures, or entity (e.g. single manager thread).
> > Everything is per-cpu, and it does scale very well.
> >
> > I wonder how badly the approach you propose can scale on large NUMA
> > systems, where having to synchronize everything through a single thread
> > might become an important point of contention, just due to the cacheline
> > bouncing and extra scheduler activity involved.
> 
> But at the end of the day these threads end up writing to the (possibly)
> single spindle.  Isn't that the biggest bottlneck here?
> 

Not if those threads are either

- analysing the data on-the-fly without exporting it to disk
- sending the data through more than one network card
- Writing data to multiple disks

There are therefore ways to improve scalability by adding more data
output paths. Therefore, I don't want to limit scalability due to the
inner design, so that if someone has the resources to send the
information out at great speed scaleably, he can.

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2008-11-26 22:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-24 11:24 [RFC PATCH] Poll : add poll_wait_set_exclusive (fixing thundering herd problem in LTTng) Mathieu Desnoyers
2008-11-24 11:44 ` [ltt-dev] " KOSAKI Motohiro
2008-11-24 11:51   ` Mathieu Desnoyers
2008-11-24 12:11     ` KOSAKI Motohiro
2008-11-24 12:16       ` Mathieu Desnoyers
2008-11-25 10:50         ` [PATCH] Poll : introduce poll_wait_exclusive() new function KOSAKI Motohiro
2008-11-25 21:19           ` Davide Libenzi
2008-11-26  1:09             ` KOSAKI Motohiro
2008-11-26 11:15             ` [ltt-dev] " Mathieu Desnoyers
2008-11-26 11:20               ` Andrew McDermott
2008-11-26 22:27                 ` Mathieu Desnoyers [this message]
2008-11-27  0:08               ` Davide Libenzi
2008-11-27 12:50                 ` KOSAKI Motohiro
2008-11-28 13:13                 ` Mathieu Desnoyers
2008-12-02  1:27                   ` Davide Libenzi
2008-12-02  4:44                     ` KOSAKI Motohiro

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=20081126222714.GA10981@Krystal \
    --to=compudj@krystal.dyndns.org \
    --cc=andrew.mcdermott@windriver.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltt-dev@lists.casi.polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=wli@holomorphy.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.