socket options

Scott Lovenberg scott.lovenberg at
Wed Feb 20 14:15:25 MST 2013

On Sun, Feb 17, 2013 at 4:11 AM, Andrew Bartlett <abartlet at> wrote:
> Would you like to write a patch to at least improve the warnings in 'man
> smb.conf'?  Probably not ascii-art, but some clear text explaining why
> this should be the last, not first resort, particularly on Linux.
> Thanks,
> Andrew Bartlett

How about this wording?  If everyone is ok with it, I'll format it for
a man page and submit it as a patch (since the mailing list hates
non-plain text).

"Premature optimization is the root of all evil." -- Donald Knuth

Changing socket options should be attempted only after consulting the
Samba Performance Tuning chapter of _The Official Samba HOWTO and
Reference Guide_
and exhausting all other means of improving performance.

Modern server operating systems are tuned for high network performance
in the majority of situations; when you set socket options you are
overriding those settings.  Linux in particular has an auto-tuning
mechanism for buffer sizes that will be disabled if you specify a
socket buffer size.  This can potentially cripple your TCP/IP stack.

Getting the socket options correct can make a big difference to your
performance, but getting them wrong can degrade it by just as much.
As with any other low level setting, if you must make changes to it,
make small changes and test the effect before making any large

Is this wording acceptable?  I could definitely drop the Knuth quote,
but I think it sets the tone perfectly for socket tuning.  Plus, I
like to quote Knuth.
Peace and Blessings,

More information about the samba-technical mailing list