[Samba] aio settings for samba 4.3

Russell R Poyner russell.poyner at wisc.edu
Thu Jul 21 15:57:16 UTC 2016


Volker,

Today I built samba43 with support for both posix and pthread aio. I 
then ran the diskspd tests using either vfs objects = aio_pthread or vfs 
objects = aio_posix.

There appears to be a very small advantage to the aio_pthread 
implementation. Hard to say for sure given the run to run variation in 
the numbers.

I'm left to conclude that something else in samba is limiting 
performance. The best I've been able to measure was 48MB/s using 64k 
blocks against a memdisk on the FreeBSD server. Still only around 1/2 of 
wire speed as measured by iperf, and much less than I see running the 
same test against a windows 8.1 server sharing from a single 7200rpm disk.

Any suggestions on to where to look next are welcome.

Thanks again
Russ Poyner

On 07/20/2016 03:58 AM, Volker Lendecke wrote:
> On Tue, Jul 19, 2016 at 12:42:53PM -0700, Jeremy Allison wrote:
>> On Tue, Jul 19, 2016 at 12:49:09PM -0500, Russell R Poyner wrote:
>>> I'm tuning a samba 4.3 install on freebsd and I'm confused about aio
>>> settings.
>>>
>>> I've loaded the freebsd aio kernel module and tried various values
>>> or aio read size and aio write size, but it seems to make no
>>> difference in the speed.
>>>
>>> Using MS diskspd against a samba share from a fast zfs pool I get
>>> something like 25MB/s tops. That's well below the capacity of my Gb
>>> network and my disk system. FWIW iperf shows >900Mbits/sec in both
>>> directions on the link.
>>>
>>> # smbd -b|grep aio
>>>     vfs_aio_fork_init
>>>     vfs_aio_posix_init
>>>     vfs_aio_pthread_init
>> You don't need these, modern Samba includes a pthread pool
>> implementation that will parallelize SMB io requests.
> The main reason for our user-space threaded approach is lack of aio in
> Linux. Proper kernel support for posix AIO might be faster than our
> implementation. "vfs objects = aio_posix" will give you that.
>
> This needs very thorough performance testing. If it turns out to be
> faster than our threaded aio on FreeBSD, we might have to revive
> the aio_posix module, it went away last year.
>
> Volker




More information about the samba mailing list