[Samba] Asynchronous I/O

Jeremy Allison jra at samba.org
Mon Jun 7 13:23:15 MDT 2010


On Mon, Jun 07, 2010 at 07:07:46PM -0400, Andy Liebman wrote:
> Hello,
>
> Is there any straightforward way to see whether Samba is using  
> "asynchronous i/o"?  In other words, if you specify in smb.conf to use  
> aio for all transfers larger than 1 KB (pretty much everything), how can  
> you tell that aio is actually being used?   Are there any counters in  
> Linux or in some samba logs that you can see incrementing over time?

Currently aio on Linux is horribly broken due to a conservative
glibc, which limits asynchronous requests to one outstanding one
per file descriptor (which pretty much makes all io synchronous
on Linux, whether you set aio sizes or not :-( ). I think this
is a bug which needs fixing but haven't yet had time to do the
work to prove this to glibc maintanence. This will be increasingly
important for SMB2, as the Windows redirector now properly
pipelines io (which the SMB1 redirector doesn't).

Currently the only way to get real aio on Linux is to use
Volker's vfs_aio_fork module, which uses processes to get
true async io working. Volker is also doing a lot of work
making aio work correctly on Linux (he has a git branch
you can track for this). Should be working properly in
3.6.x and above (that's the plan :-).

aio on Solaris, HPUX, AIX and other platforms that
implement the POSIX aio_XX calls without limitations
should be fine.

Jeremy.


More information about the samba mailing list