Does with-aio-support work?

Yuehai Xu yuehaixu at
Thu Aug 19 07:43:37 MDT 2010

On Thu, Aug 19, 2010 at 4:58 AM, Volker Lendecke
<Volker.Lendecke at> wrote:
> On Wed, Aug 18, 2010 at 06:03:13PM -0400, Yuehai Xu wrote:
>> The version of my samba is 3.3.2 and I rebuild it with the configure
>> "--with-aio-suport". Then, I just follow the man of smb.conf, adding "
>> aio read size = 1" to my smb.conf. The, the read request dispatched by
>> smbd should be asynchronous, is that correct?
>> I am puzzled about it. I use another Linux machine mount a certain
>> directory of my samba server with cifs, then, I start 4 processes to
>> read files in this directory concurrently. In order to avoid
>> readahead, I set the stride size between each read request of a
>> process to 8K, in that way, readahead should not work. According to
>> the man, the requests from different process should be asynchronous to
>> each other.
>> I know that if I run processes in different machine, multi smbds will
>> handle these requests and they are of course asynchronous, however,
>> will a smbd handle all requests from a client? If there are several
>> processes in this client, are the requests async? I trace the requests
>> using blktrace, and find that even I have set "aio read size = 1", all
>> the requests are sync because I use only one client machine on which
>> there are multi processes.
>> So, I am wondering, what does asynchronous here really mean?
> You need to look at the network trace. Samba aio will help
> in the case where the client issues multiple requests at
> once. If your client does not do that, aio will not do any
> good. You will see this behaviour with smbclient >= 3.2. For
> other clients like Windows, cifsfs or smbfs you need to look
> at the specific docs of those clients. --with-aio-support is
> a pure server setting.
> Volker
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?

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. Should this be
the motivation to use libaio?


The client I am using is also in Linux

More information about the samba-technical mailing list