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