All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Williams <Nicolas.Williams@sun.com>
To: lustre-devel@lists.lustre.org
Subject: [Lustre-devel] SMP Scalability, MDS, reducing cpu pingpong
Date: Wed, 29 Jul 2009 14:22:30 -0500	[thread overview]
Message-ID: <20090729192230.GU1020@Sun.COM> (raw)
In-Reply-To: <002001ca1062$7b526fc0$71f74f40$@com>

On Wed, Jul 29, 2009 at 04:37:29PM +0100, Eric Barton wrote:
> > Also on lustre front - something I plan to tackle, though not yet
> > completely sure how: Lustre has a concept of reserving one thread for
> > difficult replies handling + one thread for high priority messages
> > handling (if enabled). In SMP scalability branch that becomes 2x
> > num_cpus reserved threads potentially per service since naturally
> > rep_ack reply or high prio message might arrive on any cpu separately
> > now (and message queues are per cpu) - seems like huge overkill to
> > me. I see that there is a handle reply separate threads in HEAD now,
> > so perhaps this could be greatly simplified by proper usage of those.
> > the high prio seems to be harder to improve, though.
> 
> These threads are required in case all normal service threads are
> blocking.  I don't suppose this can be a performance critical case, so
> voilating CPU affinity for the sake of deadlock avoidance seems OK.
> However is 1 extra thread per CPU such a big deal?  We'll have
> 10s-100s of them in any case.

Probably not.  You could have a single thread per-CPU if everything was
written in async I/O, continuation passing style (CPS), blocking only in
an event loop per-CPU.  That'd reduce context switches, but it'd
increase the amount of context being saved and read as that one thread
services each event/event completion.  In other words, you'd still have
context switches!

Also, the code would get insanely complicated -- CPS is for compilers,
not humans (nor do we have Scheme-like continuations in C nor in the
Linux kernel, and if we did that'd add quite a bit of run-time overhead
too).  And kernels are not usually written this way either, so it may
not even be feasible.  The thread model is just easier to code to.

> > Do anybody else have any extra thoughts for lustre side  
> > improvements we can get off this?
> 
> I think we need measurements to prove/disprove whether object affinity
> trumps client affinity.

If we have secure PTLRPC in the picture then client affinity is more
likely to trump object affinity: between keys, key schedules, and
sequence number windows may add up to enough.  (Of course, we could have
multiple streams per-client, so that a client could be serviced by
multiple server CPUs.)

Nico
-- 

  parent reply	other threads:[~2009-07-29 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7580C3C1-7634-47C8-827B-C93157C1301A@Sun.COM>
2009-07-29 15:37 ` [Lustre-devel] SMP Scalability, MDS, reducing cpu pingpong Eric Barton
2009-07-29 16:01   ` Oleg Drokin
2009-07-29 18:55     ` Ricardo M. Correia
2009-07-29 19:05       ` Oleg Drokin
2009-07-29 19:22   ` Nicolas Williams [this message]
2009-07-30  1:40   ` Andreas Dilger
2009-07-30  9:25     ` Liang Zhen
2009-07-30 13:35       ` Oleg Drokin
2009-07-30 13:53         ` Liang Zhen
2009-07-30 23:19       ` Andreas Dilger

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=20090729192230.GU1020@Sun.COM \
    --to=nicolas.williams@sun.com \
    --cc=lustre-devel@lists.lustre.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 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.