Update mailing list references to point at lists.samba.org
[samba.git] / docs-xml / smbdotconf / tuning / socketoptions.xml
1 <samba:parameter name="socket options"
2                  context="G"
3                                  type="string"
4                  developer="1"
5                  constant="1"
6                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
7 <description>
8     <para>
9         <warning>
10         <para>Modern server operating systems are tuned for high
11         network performance in the majority of situations; when you set socket
12         options you are overriding those settings.  Linux in particular has an
13         auto-tuning mechanism for buffer sizes that will be disabled if you
14         specify a socket buffer size.  This can potentially cripple your
15         TCP/IP stack.</para>
16
17         <para> Getting the socket options correct can make a big difference to
18         your performance, but getting them wrong can degrade it by just as
19         much.  As with any other low level setting, if you must make changes
20         to it, make small changes and <emphasis>test</emphasis> the effect
21         before making any large changes.</para>
22         </warning>
23     </para>
24
25     <para>This option allows you to set socket options 
26     to be used when talking with the client.</para>
27
28     <para>Socket options are controls on the networking layer 
29     of the operating systems which allow the connection to be 
30     tuned.</para>
31
32     <para>This option will typically be used to tune your Samba  server
33     for optimal performance for your local network. There is  no way
34     that Samba can know what the optimal parameters are for  your net,
35     so you must experiment and choose them yourself. We  strongly
36     suggest you read the appropriate documentation for your  operating
37     system first (perhaps <command moreinfo="none">man
38     setsockopt</command> will help).</para>
39
40     <para>You may find that on some systems Samba will say 
41     &quot;Unknown socket option&quot; when you supply an option. This means you 
42     either incorrectly  typed it or you need to add an include file 
43     to includes.h for your OS.  If the latter is the case please 
44     send the patch to <ulink url="mailto:samba-technical@lists.samba.org">
45     samba-technical@lists.samba.org</ulink>.</para>
46
47     <para>Any of the supported socket options may be combined 
48     in any way you like, as long as your OS allows it.</para>
49
50     <para>This is the list of socket options currently settable 
51     using this option:</para>
52
53     <itemizedlist>
54         <listitem><para>SO_KEEPALIVE</para></listitem>
55         <listitem><para>SO_REUSEADDR</para></listitem>
56         <listitem><para>SO_BROADCAST</para></listitem>
57         <listitem><para>TCP_NODELAY</para></listitem>
58         <listitem><para>IPTOS_LOWDELAY</para></listitem>
59         <listitem><para>IPTOS_THROUGHPUT</para></listitem>
60         <listitem><para>SO_SNDBUF *</para></listitem>
61         <listitem><para>SO_RCVBUF *</para></listitem>
62         <listitem><para>SO_SNDLOWAT *</para></listitem>
63         <listitem><para>SO_RCVLOWAT *</para></listitem>
64     </itemizedlist>
65
66     <para>Those marked with a <emphasis>'*'</emphasis> take an integer 
67     argument. The others can optionally take a 1 or 0 argument to enable 
68     or disable the option, by default they will be enabled if you 
69     don't specify 1 or 0.</para>
70
71     <para>To specify an argument use the syntax SOME_OPTION = VALUE 
72     for example <command moreinfo="none">SO_SNDBUF = 8192</command>. Note that you must 
73     not have any spaces before or after the = sign.</para>
74
75     <para>If you are on a local network then a sensible option 
76     might be:</para>
77
78     <para><command moreinfo="none">socket options = IPTOS_LOWDELAY</command></para>
79
80     <para>If you have a local network then you could try:</para>
81
82     <para><command moreinfo="none">socket options = IPTOS_LOWDELAY TCP_NODELAY</command></para>
83
84     <para>If you are on a wide area network then perhaps try 
85     setting IPTOS_THROUGHPUT. </para>
86
87     <para>Note that several of the options may cause your Samba 
88                 server to fail completely. Use these options with caution!</para>
89 </description>
90
91 <value type="default">TCP_NODELAY</value>
92 <value type="example">IPTOS_LOWDELAY</value>
93 </samba:parameter>