After upgrading my file server from Ubuntu 10.04 Lucid to Ubuntu 12.04 Precise I had a few problems with Samba. Mac OS X 10.6 clients were very very slow. A 1MB file would take several minutes to transfer completely, making browsing photos and general use impractical. Windows (Vista and 7) clients could not connect at all, the file server did not appear in the browse list and typing the name manually did not work either. Unsurprisingly, Linux Samba clients worked perfectly.
I suspected the problem was related to the Samba upgrade from version 3.4.7 to 3.6.3, although I never really confirmed this. I was able to resolve the issues by making configuration changes to the [global] section of /etc/samba/smb.conf.
The problem with Windows clients was fixed by enabling Samba’s experimental SMB2 protocol implementation. I added this line:
max protocol = SMB2
This still left the speed issue for Mac clients, the solution for me was to remove this line:
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
This was a non-default setting that I’d carried around for many years because it apparently made Samba much faster. I’d never bothered to measure it, so I don’t know if this was true in previous versions. In any case, with this version after removing it transfers are now very fast again.
Problem solved! :)