socket options

Andrew Bartlett abartlet at samba.org
Wed Feb 20 14:27:59 MST 2013


On Wed, 2013-02-20 at 16:15 -0500, Scott Lovenberg wrote:
> On Sun, Feb 17, 2013 at 4:11 AM, Andrew Bartlett <abartlet at samba.org> 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).
> 
> "
> Warning:
> "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_
> (http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/speed.html)
> and exhausting all other means of improving performance.

The problem with linking to that document is that it is more a source of
confusion and outdated information than a solution to it. 

I'm actually in a mood to totally remove it, or if not to gut it,
because I have no indication (in the commit logs) that it has had any
significant attention to technical detail in 10 (probably more like 15)
years.  (Notice it compares with NT, and mentions NetBEUI as a common
network protocol...).

> 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
> changes.
> "
> 
> 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.

Otherwise, I like it.  Perhaps we start with just the last two
paragraphs (and the quote, if you can find the right docbook syntax). 

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list