[Gluster-devel] Setup recommendations - 2 (io-threads)
Martin Fick
mogulguy at yahoo.com
Tue Aug 19 16:58:06 UTC 2008
--- On Mon, 8/18/08, Raghavendra G <raghavendra.hg at gmail.com> wrote:
> On Tue, Aug 19, 2008 at 1:16 AM, Martin Fick
> <mogulguy at yahoo.com> wrote:
>
> > --- On Thu, 5/15/08, Amar S. Tumballi
> <amar at zresearch.com> wrote:
> >
> > > ''io-threads'' translator creates seperate
> > > threads (as specified by the option). But, it
> > > doesn't make sense to have more threads than
> > > number of CPUs available. It works good if the
> > > thread count is same as number of CPUs you
> > > have in server.
> >
> > Wouldn't adding multiple threads on a single CPU
> > server still allow a server thread to potentially
> > serve files to other clients while it is blocked
> > serving one client?
>
>
> Couple of points to be noted are,
>
> * Apart from the io-threads, there is a separate fuse
> thread which reads/writes to /dev/fuse.
> * Since glusterfs operates in asynchronous framework,
> potentially there are very less scenarios, where a thread
> can block.
>
> Hence the purpose of io-threads is only for simultaneous
> executions. And the number of simultaneous execution paths
> is determined by the number of processors present.
>
> Can anyone confirm this? Threaded I/O Translator
Hmm, the wiki says this about io threads:
AIO adds asynchronous (background) read and write
functionality. By loading this translator, you can
utilize the server idle blocked time to handle new
incoming requests. CPU, memory or network is not
utilized when the server is blocked on read or write
calls while DMA'ing disk. This translator makes best
use of all the resources under load and improves
concurrent I/O performance.
So it sounds like that without io threads the io is
blocking? Does this mean that even with one CPU it
is worth using 1 iothread because it splits the io
out of the main thread allowing the main thread to
still service incoming requests? Does it look like
this?
|
|
SERVER
Thread
/ | \
/ | \
IO1 IO2...IOn
Thread Thread Thread
-Martin
More information about the Gluster-devel
mailing list