[Samba] Small file performance
John Gardeniers
jgardeniers at objectmastery.com
Sun Jan 8 22:39:31 UTC 2017
Hi All,
We are experiencing painfully slow performance when transferring many
small files via Samba. We are currently running Samba 4.5.1, although
based on my searches the version doesn't seem to make any difference and
this is a long standing problem.
The servers, both the primary file server and the testbed, have dual
bonded 10Gb NICs and the client network is 1Gb.
Using a test directory of about 6,700 files, totalling about 200MB, the
speed starts off almost reasonable but quickly slows down, ending up at
around 3.5MB per second, in either direction. Testing from both Windows
and Linux clients shows no discernible difference. When using NFS, SFTP,
rsync, etc. the transfer happens so fast that it's difficult to time.
Large files also transfer quickly.
Based on my searches I've been playing around with a number of settings.
The testbed right now has the following options added to the basic smb.conf:
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=32768
SO_SNDBUF=32768
read raw = yes
write raw = yes
strict locking = no
min receivefile size = 16384
use sendfile = yes
aio read size = 16384
aio write size = 16384
strict allocate = yes
None of these options have made even the slightest difference. Playing
around with the numeric values has at times caused the performance to
deteriorate but never improve on not using these parameters at all.
Equally, some other settings being suggested as a solution in Google
searches have made absolutely no difference.
Is there anything else I can try that might actually improve
performance? Perhaps something I missed in my searches? Or is this just
a Samba issue that looks like never going away?
regards,
John
More information about the samba
mailing list