All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Phillips <phillips@phunq.net>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: A peek at the future of storage
Date: Wed, 12 Dec 2007 10:02:44 -0800	[thread overview]
Message-ID: <200712121002.44643.phillips@phunq.net> (raw)
In-Reply-To: <20071212174613.GA16656@fieldses.org>

On Wednesday 12 December 2007 09:46, J. Bruce Fields wrote:
> On Wed, Dec 12, 2007 at 08:46:18AM -0800, Daniel Phillips wrote:
> > Incidentally, we ran our tests with 128 knfsd threads.  The default
> > of 8 threads produces miserable performance on the SSD, which gave
> > us a good scare on our initial test run.  It would be very nice to
> > implement an algorithm to scale the knfsd thread pool
> > automatically, in order to eliminate this class of thing that can
> > go wrong.  If somebody became inspired to take on that little
> > project that would be great, otherwise it is in our pipeline for,
> > hmm, Christmas delivery.  (Exactly which Christmas is left
> > unspecified.)
>
> People have proposed writing a daemon that just reads
> /proc/net/rpc/nfsd periodically and uses that to adjust the number of
> threads from userspace, probably subject to some limits in a config
> file someplace. (Think that could do the job, or is there some reason
> this would be easier in the kernel?)

I didn't actually say "kernel", though that was what I was thinking, 
perhaps just out of habit.  It seems to me it would be a relatively 
small change to the existing code, essentially just finishing the idea, 
without needing to be patched up by userspace. 

So how would a userspace daemon know that kernel is blocking and new 
threads are needed?  In kernel this is pretty easy: when a new request 
arrives, look on the thread list and if none are available, generate a 
new one.  Something special needs to be done to handle the case where 
there are no threads available because they are all piled up on a 
semaphore due to, for example, somebody unplugging the network cable 
for a remote disk.  We have to avoid generating infinite threads in 
that case.  Ideas?

Daniel

  reply	other threads:[~2007-12-12 18:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-12 16:46 A peek at the future of storage Daniel Phillips
2007-12-12 17:46 ` J. Bruce Fields
2007-12-12 18:02   ` Daniel Phillips [this message]
2007-12-12 18:39     ` Bernd Petrovitsch
2007-12-12 19:57       ` J. Bruce Fields

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=200712121002.44643.phillips@phunq.net \
    --to=phillips@phunq.net \
    --cc=bfields@fieldses.org \
    --cc=linux-kernel@vger.kernel.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.