Before tuning, I was able to achieve 6-7 MB/s in either direction. I've then upgraded from default samba to samba 3.2 (newsflash: samba33 is in the ports!) and after some trial and error fiddling with the config file settled on these lines:
socket options=SO_RCVBUF=131072 SO_SNDBUF=131072 TCP_NODELAY
min receivefile size=16384
use sendfile=true
Simply installing samba32 isn't enough. Apparently something is wrong with either the documentation or the implementation of the "min receivefile size" option - larger values result in worse performance.
With the above settings I can now receive files on the machine at about 9.3 MB/s (which nearly saturates this slow machine) and serve them to clients at around 7.5 MB/s (both results are for big files). I have no idea why sending is that much slower. Increasing vfs.readmax doesn't help.
#1 Re: Magical incantations for Samba
Hi, have you also tried smb3.3? If you did, what is the result?
#2 Re: Magical incantations for Samba
Just tried samba33 (it's in the ports!). It looks like there could be a slight improvement but it's inconsistent - perhaps a few hundred kB/s at most, which is within measurement uncertainty for this machine.
#3 Re: Magical incantations for Samba
It looks like a few hundred more kB/s can be wrought from Samba it by using AIO. I used these settings:
aio read size = 16384
aio write size = 16384
aio write behind = true
(don't forget to load the AIO kernel module)
#4 Re: Magical incantations for Samba
A different area to optimize but any tests comparisons on using tdbsam versus ldap to store uids?
#5 Re: Magical incantations for Samba
No, I have no need to test Samba on hundreds or thousands of users :)