Moving docs tree to docs-xml to make room for generated docs in the release tarball.
[sfrench/samba-autobuild/.git] / docs-xml / smbdotconf / tuning / socketoptions.xml
1 <samba:parameter name="socket options"
2                  context="G"
3                                  type="list"
4                  developer="1"
5                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
6 <description>
7     <para>This option allows you to set socket options 
8     to be used when talking with the client.</para>
9
10     <para>Socket options are controls on the networking layer 
11     of the operating systems which allow the connection to be 
12     tuned.</para>
13
14     <para>This option will typically be used to tune your Samba  server
15     for optimal performance for your local network. There is  no way
16     that Samba can know what the optimal parameters are for  your net,
17     so you must experiment and choose them yourself. We  strongly
18     suggest you read the appropriate documentation for your  operating
19     system first (perhaps <command moreinfo="none">man
20     setsockopt</command> will help).</para>
21
22     <para>You may find that on some systems Samba will say 
23     &quot;Unknown socket option&quot; when you supply an option. This means you 
24     either incorrectly  typed it or you need to add an include file 
25     to includes.h for your OS.  If the latter is the case please 
26     send the patch to <ulink url="mailto:samba-technical@samba.org">
27     samba-technical@samba.org</ulink>.</para>
28
29     <para>Any of the supported socket options may be combined 
30     in any way you like, as long as your OS allows it.</para>
31
32     <para>This is the list of socket options currently settable 
33     using this option:</para>
34
35     <itemizedlist>
36         <listitem><para>SO_KEEPALIVE</para></listitem>
37         <listitem><para>SO_REUSEADDR</para></listitem>
38         <listitem><para>SO_BROADCAST</para></listitem>
39         <listitem><para>TCP_NODELAY</para></listitem>
40         <listitem><para>IPTOS_LOWDELAY</para></listitem>
41         <listitem><para>IPTOS_THROUGHPUT</para></listitem>
42         <listitem><para>SO_SNDBUF *</para></listitem>
43         <listitem><para>SO_RCVBUF *</para></listitem>
44         <listitem><para>SO_SNDLOWAT *</para></listitem>
45         <listitem><para>SO_RCVLOWAT *</para></listitem>
46     </itemizedlist>
47
48     <para>Those marked with a <emphasis>'*'</emphasis> take an integer 
49     argument. The others can optionally take a 1 or 0 argument to enable 
50     or disable the option, by default they will be enabled if you 
51     don't specify 1 or 0.</para>
52
53     <para>To specify an argument use the syntax SOME_OPTION = VALUE 
54     for example <command moreinfo="none">SO_SNDBUF = 8192</command>. Note that you must 
55     not have any spaces before or after the = sign.</para>
56
57     <para>If you are on a local network then a sensible option 
58     might be:</para>
59
60     <para><command moreinfo="none">socket options = IPTOS_LOWDELAY</command></para>
61
62     <para>If you have a local network then you could try:</para>
63
64     <para><command moreinfo="none">socket options = IPTOS_LOWDELAY TCP_NODELAY</command></para>
65
66     <para>If you are on a wide area network then perhaps try 
67     setting IPTOS_THROUGHPUT. </para>
68
69     <para>Note that several of the options may cause your Samba 
70                 server to fail completely. Use these options with caution!</para>
71 </description>
72
73 <value type="default">TCP_NODELAY</value>
74 <value type="example">IPTOS_LOWDELAY</value>
75 </samba:parameter>