1 <?xml version='1.0' encoding='UTF-8'?><chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="configurationfilesmoduleparameters">
2 <title xml:id="configurationfilesmoduleparameters.title">Configuration Files and Module Parameters</title>
3 <para>This section describes configuration files and module parameters and includes the following sections:</para>
6 <para><xref linkend="dbdoclet.50438293_15350"/></para>
9 <para><xref linkend="dbdoclet.50438293_78010"/></para>
12 <section xml:id="dbdoclet.50438293_15350">
14 <indexterm><primary>configuring</primary></indexterm>
15 <indexterm><primary>LNet</primary><see>configuring</see></indexterm>
19 <para>LNet network hardware and routing are now configured via module parameters. Parameters should be specified in the <literal>/etc/modprobe.d/lustre.conf</literal>file, for example:</para>
20 <screen>options lnet networks=tcp0(eth2)</screen>
21 <para>The above option specifies that this node should use the TCP protocol on the eth2 network interface.</para>
22 <para>Module parameters are read when the module is first loaded. Type-specific LND modules (for instance, <literal>ksocklnd</literal>) are loaded automatically by the LNet module when LNet starts (typically upon <literal>modprobe ptlrpc</literal>).</para>
23 <para>LNet configuration parameters can be viewed under <literal>/sys/module/lnet/parameters/</literal>, and LND-specific parameters under the name of the corresponding LND, for example <literal>/sys/module/ksocklnd/parameters/</literal> for the socklnd (TCP) LND.</para>
24 <para>For the following parameters, default option settings are shown in parenthesis. Changes to parameters marked with a W affect running systems. Unmarked parameters can only be set when LNet loads for the first time. Changes to parameters marked with <literal>Wc</literal> only have effect when connections are established (existing connections are not affected by these changes.)</para>
26 <section xml:id="dbdoclet.50438293_78010">
28 <indexterm><primary>configuring</primary><secondary>module options</secondary></indexterm>
30 Module Options</title>
33 <para>With routed or other multi-network configurations, use <literal>ip2nets</literal> rather than networks, so all nodes can use the same configuration.</para>
36 <para>For a routed network, use the same 'routes' configuration everywhere. Nodes specified as routers automatically enable forwarding and any routes that are not relevant to a particular node are ignored. Keep a common configuration to guarantee that all nodes have consistent routing tables.</para>
39 <para>A separate <literal>lustre.conf</literal> file makes distributing the configuration much easier.</para>
42 <para>If you set <literal>config_on_load=1</literal>, LNet starts at
43 <literal>modprobe</literal> time rather than waiting for the Lustre file system to
44 start. This ensures routers start working at module load time.</para>
48 # lctl> net down</screen>
51 <para>Remember the <literal>lctl ping {nid}</literal> command - it is a handy way to check your LNet configuration.</para>
55 <title><indexterm><primary>configuring</primary><secondary>LNet options</secondary></indexterm>
57 <para>This section describes LNet options.</para>
59 <title><indexterm><primary>configuring</primary><secondary>network topology</secondary></indexterm>
60 Network Topology</title>
61 <para>Network topology module parameters determine which networks a node should join, whether it should route between these networks, and how it communicates with non-local networks.</para>
62 <para>Here is a list of various networks and the supported software stacks:</para>
63 <informaltable frame="all">
65 <colspec colname="c1" colwidth="50*"/>
66 <colspec colname="c2" colwidth="50*"/>
70 <para><emphasis role="bold">Network</emphasis></para>
73 <para><emphasis role="bold">Software Stack</emphasis></para>
83 <para> OFED Version 2</para>
90 <para>The Lustre software ignores the loopback interface (<literal>lo0</literal>), but the
91 Lustre file system uses any IP addresses aliased to the loopback (by default). When in
92 doubt, explicitly specify networks.</para>
96 <title><indexterm><primary>configuring</primary>
97 <secondary>network</secondary><tertiary>ip2nets</tertiary></indexterm>
98 ip2nets ("tcp")</title>
99 <para><literal>ip2nets</literal> is a string that lists globally
100 available networks, each with a set of IP address ranges. LNet
101 determines the locally-available networks from this list by matching
102 the IP address ranges with the local IPs of a node. Its purpose is
103 to allow the same <literal>modules.conf</literal> file to be used
104 across a variety of nodes on different networks. The string has the
105 following syntax.</para>
106 <screen><ip2nets> :== <net-match> [ <comment> ] { <net-sep> <net-match> }
107 <net-match> :== [ <w> ] <net-spec> <w> <ip-range> { <w> <ip-range> }
109 <net-spec> :== <network> [ "(" <interface-list> ")" ]
110 <network> :== <nettype> [ <number> ]
111 <nettype> :== "tcp" | "elan" | "o2ib" | ...
112 <iface-list> :== <interface> [ "," <iface-list> ]
113 <ip-range> :== <r-expr> "." <r-expr> "." <r-expr> "." <r-expr>
114 <r-expr> :== <number> | "*" | "[" <r-list> "]"
115 <r-list> :== <range> [ "," <r-list> ]
116 <range> :== <number> [ "-" <number> [ "/" <number> ] ]
117 <comment :== "#" { <non-net-sep-chars> }
118 <net-sep> :== ";" | "\n"
119 <w> :== <whitespace-chars> { <whitespace-chars> }
121 <para><literal><net-spec></literal> contains enough information to
122 uniquely identify the network and load an appropriate LND. The LND
123 determines the missing "address-within-network" part of the
124 NID based on the interfaces it can use.</para>
125 <para><literal><iface-list></literal> specifies which hardware
126 interface the network can use. If omitted, all interfaces are used. LNDs
127 that do not support the <literal><iface-list></literal> syntax
128 cannot be configured to use particular interfaces and just use what is
129 there. Only a single instance of these LNDs can exist on a node at any
130 time, and <literal><iface-list></literal> must be omitted.</para>
131 <para><literal><net-match></literal> entries are scanned in the
132 order declared to see if one of the node's IP addresses matches one
133 of the <literal><ip-range></literal> expressions. If there is a
134 match, <literal><net-spec></literal> specifies the network to
135 instantiate. Note that it is the first match for a particular network
136 that counts. This can be used to simplify the match expression for the
137 general case by placing it after the special cases. For example:</para>
138 <screen>ip2nets="tcp(eth1,eth2) 134.32.1.[4-10/2]; tcp(eth1) *.*.*.*"</screen>
139 <para>4 nodes on the 134.32.1.* network have 2 interfaces
140 (134.32.1.{4,6,8,10}) but all the rest have 1.</para>
141 <screen>ip2nets="<emphasis role="bold">o2ib</emphasis> 192.168.0.*; tcp(eth2) 192.168.0.[1,7,4,12]" </screen>
142 <para>This describes an IB cluster on 192.168.0.*. Four of these nodes
143 also have IP interfaces; these four could be used as routers.</para>
144 <para>Note that match-all expressions (For instance,
145 <literal>*.*.*.*</literal>) effectively mask all other</para>
146 <para> <literal><net-match></literal> entries specified after
147 them. They should be used with caution.</para>
148 <para>Here is a more complicated situation, the route parameter is
149 explained below. We have:</para>
152 <para>Two TCP subnets</para>
155 <para>One Elan subnet</para>
158 <para>One machine set up as a router, with both TCP and Elan
162 <para>IP over Elan configured, but only IP will be used to label the
166 <screen>options lnet ip2nets=â€tcp 198.129.135.* 192.128.88.98; \
167 elan 198.128.88.98 198.129.135.3; \
168 routes='cp 1022@elan # Elan NID of router; \
169 elan 198.128.88.98@tcp # TCP NID of router '</screen>
172 <title><indexterm><primary>configuring</primary>
173 <secondary>network</secondary><tertiary>tcp</tertiary></indexterm>
174 networks ("tcp")</title>
175 <para>This is an alternative to "<literal>ip2nets</literal>"
176 which can be used to specify the networks to be instantiated explicitly.
177 The syntax is a simple comma separated list of
178 <literal><net-spec></literal>s (see above). The default is only
179 used if neither 'ip2nets' nor 'networks' is
183 <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>routes</tertiary></indexterm>
184 routes ("")</title>
185 <para>This is a string that lists networks and the NIDs of routers that forward to them.</para>
186 <para>It has the following syntax (<literal><w></literal> is one or more whitespace characters):</para>
187 <screen><routes> :== <route>{ ; <route> }
188 <route> :== [<net>[<w><hopcount>]<w><nid>[:<priority>]{<w><nid>[:<priority>]}</screen>
189 <para>Note: the priority parameter was added in release 2.5.</para>
190 <para>So a node on the network <literal>tcp1</literal> that needs to go through a router to get to the Elan network:</para>
191 <screen>options lnet networks=tcp1 routes="elan 1 192.168.2.2@tcpA"</screen>
192 <para>The hopcount and priority numbers are used to help choose the best path between multiply-routed configurations.</para>
193 <para>A simple but powerful expansion syntax is provided, both for target networks and router NIDs as follows.</para>
194 <screen><expansion> :== "[" <entry> { "," <entry> } "]"
195 <entry> :== <numeric range> | <non-numeric item>
196 <numeric range> :== <number> [ "-" <number> [ "/" <number> ] ]</screen>
197 <para>The expansion is a list enclosed in square brackets. Numeric items in the list may be a single number, a contiguous range of numbers, or a strided range of numbers. For example, <literal>routes="elan 192.168.1.[22-24]@tcp"</literal> says that network <literal>elan0</literal> is adjacent (hopcount defaults to 1); and is accessible via 3 routers on the <literal>tcp0</literal> network (<literal>192.168.1.22@tcp</literal>, <literal>192.168.1.23@tcp</literal> and <literal>192.168.1.24@tcp</literal>).</para>
198 <para><literal>routes="[tcp,o2ib] 2 [8-14/2]@elan"</literal>
199 says that 2 networks (<literal>tcp0</literal> and <literal>o2ib0</literal>) are accessible through 4 routers (<literal>8@elan</literal>, <literal>10@elan</literal>, <literal>12@elan</literal> and <literal>14@elan</literal>). The hopcount of 2 means that traffic to both these networks will be traversed 2 routers - first one of the routers specified in this entry, then one more.</para>
200 <para>Duplicate entries, entries that route to a local network, and entries that specify routers on a non-local network are ignored.</para>
201 <para>Prior to release 2.5, a conflict between equivalent entries was resolved in favor of the route with the shorter hopcount. The hopcount, if omitted, defaults to 1 (the remote network is adjacent)..</para>
202 <para condition='l25'>Since 2.5, equivalent entries are resolved in favor of the route with the lowest priority number or shorter hopcount if the priorities are equal. The priority, if omitted, defaults to 0. The hopcount, if omitted, defaults to 1 (the remote network is adjacent).</para>
203 <para>It is an error to specify routes to the same destination with routers on different local networks.</para>
204 <para>If the target network string contains no expansions, then the hopcount defaults to 1 and may be omitted (that is, the remote network is adjacent). In practice, this is true for most multi-network configurations. It is an error to specify an inconsistent hop count for a given target network. This is why an explicit hopcount is required if the target network string specifies more than one network.</para>
207 <title><indexterm><primary>configuring</primary>
208 <secondary>network</secondary>
209 <tertiary>forwarding</tertiary></indexterm>
210 forwarding ("")</title>
211 <para>This is a string that can be set either to
212 "<literal>enabled</literal>" or
213 "<literal>disabled</literal>" for explicit control of whether
214 this node should act as a router, forwarding communications between all
215 local networks.</para>
216 <para>A standalone router can be started by simply starting LNet
217 ('<literal>modprobe ptlrpc</literal>') with appropriate
218 network topology options.</para>
221 <title><indexterm><primary>configuring</primary>
222 <secondary>network</secondary>
223 <tertiary>accept</tertiary></indexterm>accept (secure)</title>
224 <para>The acceptor is a TCP/IP service that some LNDs use to
225 establish communications. If a local network requires it and it has
226 not been disabled, the acceptor listens on a single port for
227 connection requests that it redirects to the appropriate local
228 network. The acceptor is part of the LNet module and configured
229 by the following options:</para>
230 <informaltable frame="all">
232 <colspec colname="c1" colwidth="50*"/>
233 <colspec colname="c2" colwidth="50*"/>
237 <para><emphasis role="bold">Variable</emphasis></para>
240 <para><emphasis role="bold">Description</emphasis></para>
247 <para><literal>accept</literal></para>
248 <para><literal>(secure)</literal></para>
251 <para>The type of connections that the acceptor will allow
252 from remote nodes.</para>
255 <para><literal>secure</literal> - Accept connections
256 only from reserved TCP ports (below 1023). This is the
257 default, and prevents userspace processes from trying
258 to connect to the server.</para>
261 <para><literal>all</literal> - Accept connections from
262 any TCP port. This may be needed to allow connections
263 on non-privileged ports, for example from a client in a
264 virtual machine running in userspace.</para>
267 <para><literal>none</literal> - Do not run the acceptor.
268 This may prevent the client from receiving server RPCs
269 if the TCP connection is lost and the server needs to
270 contact the client for some reason (e.g. LDLM lock
271 callback or size glimpse).
279 <para> <literal>accept_port</literal></para>
280 <para> <literal>(988)</literal></para>
283 <para>Port number on which the acceptor should listen for
284 connection requests. All nodes in a site configuration that
285 require an acceptor must use the same port.</para>
290 <para> <literal>accept_backlog</literal></para>
291 <para> <literal>(127)</literal></para>
294 <para>Maximum length that the queue of pending connections may
295 grow to (see listen(2)).</para>
300 <para> <literal>accept_timeout</literal></para>
301 <para> <literal>(5, W)</literal></para>
304 <para>Maximum time in seconds the acceptor is allowed to block
305 while communicating with a peer.</para>
310 <para> <literal>accept_proto_version</literal></para>
313 <para>Version of the acceptor protocol that should be used by
314 outgoing connection requests. It defaults to the most recent
315 acceptor protocol version, but it may be set to the previous
316 version to allow the node to initiate connections with nodes
317 that only understand that version of the acceptor protocol.
318 The acceptor can, with some restrictions, handle either
319 version (that is, it can accept connections from both
320 'old' and 'new' peers). For the current
321 version of the acceptor protocol (version 1), the acceptor
322 is compatible with old peers if it is only required by a
323 single local network.</para>
331 <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>rnet_htable_size</tertiary></indexterm>
332 <literal>rnet_htable_size</literal></title>
333 <para><literal>rnet_htable_size</literal> is an integer that indicates how many remote networks the internal LNet hash table is configured to handle. <literal>rnet_htable_size</literal> is used for optimizing the hash table size and does not put a limit on how many remote networks you can have. The default hash table size when this parameter is not specified is: 128.</para>
336 <section remap="h3" xml:id="section_ngq_qhy_zl">
338 <primary>configuring</primary>
339 <secondary>network</secondary>
340 <tertiary>SOCKLND</tertiary>
342 <literal>SOCKLND</literal> Kernel TCP/IP LND</title>
343 <para>The <literal>SOCKLND</literal> kernel TCP/IP LND (<literal>socklnd</literal>) is
344 connection-based and uses the acceptor to establish communications via sockets with its
346 <para>It supports multiple instances and load balances dynamically over multiple interfaces.
347 If no interfaces are specified by the <literal>ip2nets</literal> or networks module
348 parameter, all non-loopback IP interfaces are used. The address-within-network is determined
349 by the address of the first IP interface an instance of the <literal>socklnd</literal>
351 <para>Consider a node on the 'edge' of an InfiniBand network,
352 with a low-bandwidth management Ethernet (<literal>eth0</literal>), IP
353 over IB configured (<literal>ipoib0</literal>), and a pair of GigE NICs
354 (<literal>eth1</literal>,<literal>eth2</literal>) providing off-cluster
355 connectivity. This node should be configured with '
356 <literal>networks=o2ib,tcp(eth1,eth2)</literal>' to ensure that the
357 <literal>socklnd</literal> ignores the management Ethernet and IPoIB.
359 <informaltable frame="all">
361 <colspec colname="c1" colwidth="50*"/>
362 <colspec colname="c2" colwidth="50*"/>
366 <para><emphasis role="bold">Variable</emphasis></para>
369 <para><emphasis role="bold">Description</emphasis></para>
377 <literal>timeout</literal></para>
379 <literal>(50,W)</literal></para>
382 <para>Time (in seconds) that communications may be stalled before the LND completes
383 them with failure.</para>
389 <literal>nconnds</literal></para>
391 <literal>(4)</literal></para>
394 <para>Sets the number of connection daemons.</para>
400 <literal>min_reconnectms</literal></para>
402 <literal>(1000,W)</literal></para>
405 <para>Minimum connection retry interval (in milliseconds). After a failed connection
406 attempt, this is the time that must elapse before the first retry. As connections
407 attempts fail, this time is doubled on each successive retry up to a maximum of
408 '<literal>max_reconnectms</literal>'.</para>
414 <literal>max_reconnectms</literal></para>
416 <literal>(6000,W)</literal></para>
419 <para>Maximum connection retry interval (in milliseconds).</para>
425 <literal>eager_ack</literal></para>
427 <literal>(0 on linux,</literal></para>
429 <literal>1 on darwin,W)</literal></para>
432 <para>Boolean that determines whether the <literal>socklnd</literal> should attempt
433 to flush sends on message boundaries.</para>
439 <literal>typed_conns</literal></para>
441 <literal>(1,Wc)</literal></para>
444 <para>Boolean that determines whether the <literal>socklnd</literal> should use
445 different sockets for different types of messages. When clear, all communication
446 with a particular peer takes place on the same socket. Otherwise, separate sockets
447 are used for bulk sends, bulk receives and everything else.</para>
453 <literal>min_bulk</literal></para>
455 <literal>(1024,W)</literal></para>
458 <para>Determines when a message is considered "bulk".</para>
464 <literal>tx_buffer_size, rx_buffer_size</literal></para>
466 <literal>(8388608,Wc)</literal></para>
469 <para>Socket buffer sizes. Setting this option to zero (0), allows the system to
470 auto-tune buffer sizes. </para>
472 <para>Be very careful changing this value as improper sizing can harm
480 <literal>nagle</literal></para>
482 <literal>(0,Wc)</literal></para>
485 <para>Boolean that determines if <literal>nagle</literal> should be enabled. It
486 should never be set in production systems.</para>
492 <literal>keepalive_idle</literal></para>
494 <literal>(30,Wc)</literal></para>
497 <para>Time (in seconds) that a socket can remain idle before a keepalive probe is
498 sent. Setting this value to zero (0) disables keepalives.</para>
504 <literal>keepalive_intvl</literal></para>
506 <literal>(2,Wc)</literal></para>
509 <para>Time (in seconds) to repeat unanswered keepalive probes. Setting this value to
510 zero (0) disables keepalives.</para>
516 <literal>keepalive_count</literal></para>
518 <literal>(10,Wc)</literal></para>
521 <para>Number of unanswered keepalive probes before pronouncing socket (hence peer)
528 <literal>enable_irq_affinity</literal></para>
530 <literal>(0,Wc)</literal></para>
533 <para>Boolean that determines whether to enable IRQ affinity. The default is zero
535 <para>When set, <literal>socklnd</literal> attempts to maximize performance by
536 handling device interrupts and data movement for particular (hardware) interfaces
537 on particular CPUs. This option is not available on all platforms. This option
538 requires an SMP system to exist and produces best performance with multiple NICs.
539 Systems with multiple CPUs and a single NIC may see increase in the performance
540 with this parameter disabled.</para>
546 <literal>zc_min_frag</literal></para>
548 <literal>(2048,W)</literal></para>
551 <para>Determines the minimum message fragment that should be considered for
552 zero-copy sends. Increasing it above the platform's <literal>PAGE_SIZE
553 </literal>disables all zero copy sends. This option is not available on all