Does with-aio-support work?

Jeff Layton jlayton at
Fri Aug 20 08:08:56 MDT 2010

On Thu, 19 Aug 2010 17:39:07 +0200
Volker Lendecke <Volker.Lendecke at SerNet.DE> wrote:

> On Thu, Aug 19, 2010 at 09:43:37AM -0400, Yuehai Xu wrote:
> > Since the processes in the client are very simple program that I
> > write, they just read data with certain stride size, so, the
> > asynchronous from client should work. Is it because I use cifs to
> > mount the directory from samba server so that no asynchronous requests
> > are found? You have said I need to look at the specific docs when
> > cifsfs is used, but the client is also running in Linux, is it
> > different that I use smbclient to read data or mount with cifsfs and
> > then read?
> Yes, using a cifs mountpoint is different from using
> smbclient. I would have to look into the network traces to
> see whether cifs can multiplex different processes in a way
> that requests are sent out in parallel. I would hope it does
> so, but I'm pretty certain that for example smbfs does not
> do that, neither does smbclient before version 3.2.

That should work with cifs, at least up to the "cifs_max_pending" value
that defaults to 50. IOW, you only get 50 requests on a single socket
at a time.

Unfortunately though, CIFS does *not* parallelize requests from the
same task. So writes done in the context of a single thread will
generally serialize.

> > In my opinion, because smbd might handle several clients at the same
> > time, so, dispatching the requests from different clients
> > asynchronously does make sense because it is no need for one client to
> > wait for the completion of request from another client.
> This right now is being taken care of by the fact that Samba
> uses a process per client.
> > Should this be the motivation to use libaio?
> We're not using libaio, we're using the glibc async io
> facilities. Async I/O is just not supported propely in the
> Linux kernel, this has to be done in user space with
> multiple threads or processes.
> Volker

Jeff Layton <jlayton at>

More information about the samba-technical mailing list