Whamcloud - gitweb
LUDOC-263 wrap: wrap lines for review convenience.
[doc/manual.git] / ConfigurationFilesModuleParameters.xml
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>
4   <itemizedlist>
5     <listitem>
6       <para><xref linkend="dbdoclet.50438293_15350"/></para>
7     </listitem>
8     <listitem>
9       <para><xref linkend="dbdoclet.50438293_78010"/></para>
10     </listitem>
11   </itemizedlist>
12   <section xml:id="dbdoclet.50438293_15350">
13       <title>
14           <indexterm><primary>configuring</primary></indexterm>
15           <indexterm><primary>LNET</primary><see>configuring</see></indexterm>
16           
17           
18           Introduction</title>
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>
25   </section>
26   <section xml:id="dbdoclet.50438293_78010">
27       <title>
28           <indexterm><primary>configuring</primary><secondary>module options</secondary></indexterm>
29           
30           Module Options</title>
31     <itemizedlist>
32       <listitem>
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>
34       </listitem>
35       <listitem>
36         <para>For a routed network, use the same &apos;routes&apos; 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>
37       </listitem>
38       <listitem>
39         <para>A separate <literal>lustre.conf</literal> file makes distributing the configuration much easier.</para>
40       </listitem>
41       <listitem>
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>
45       </listitem>
46     </itemizedlist>
47     <screen># lctl 
48 # lctl&gt; net down</screen>
49     <itemizedlist>
50       <listitem>
51         <para>Remember the <literal>lctl ping {nid}</literal> command - it is a handy way to check your LNET configuration.</para>
52       </listitem>
53     </itemizedlist>
54     <section remap="h3">
55       <title><indexterm><primary>configuring</primary><secondary>LNET options</secondary></indexterm>
56 LNET Options</title>
57       <para>This section describes LNET options.</para>
58       <section remap="h4">
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">
64           <tgroup cols="2">
65             <colspec colname="c1" colwidth="50*"/>
66             <colspec colname="c2" colwidth="50*"/>
67             <thead>
68               <row>
69                 <entry>
70                   <para><emphasis role="bold">Network</emphasis></para>
71                 </entry>
72                 <entry>
73                   <para><emphasis role="bold">Software Stack</emphasis></para>
74                 </entry>
75               </row>
76             </thead>
77             <tbody>
78               <row>
79                 <entry>
80                   <para> o2ib</para>
81                 </entry>
82                 <entry>
83                   <para> OFED Version 2</para>
84                 </entry>
85               </row>
86               <row>
87                 <entry>
88                   <para> mx</para>
89                 </entry>
90                 <entry>
91                   <para> Myrinet MX</para>
92                 </entry>
93               </row>
94               <row>
95                 <entry>
96                   <para> gm</para>
97                 </entry>
98                 <entry>
99                   <para> Myrinet GM-2</para>
100                 </entry>
101               </row>
102             </tbody>
103           </tgroup>
104         </informaltable>
105         <note>
106           <para>The Lustre software ignores the loopback interface (<literal>lo0</literal>), but the
107             Lustre file system uses any IP addresses aliased to the loopback (by default). When in
108             doubt, explicitly specify networks.</para>
109         </note>
110         <para><literal>ip2nets</literal> (&quot;&quot;) is a string that lists globally-available networks, each with a set of IP address ranges. LNET determines the locally-available networks from this list by matching the IP address ranges with the local IPs of a node. The purpose of this option is to be able to use the same <literal>modules.conf</literal> file across a variety of nodes on different networks. The string has the following syntax.</para>
111         <screen>&lt;ip2nets&gt; :== &lt;net-match&gt; [ &lt;comment&gt; ] { &lt;net-sep&gt; &lt;net-match&gt; }
112 &lt;net-match&gt; :== [ &lt;w&gt; ] &lt;net-spec&gt; &lt;w&gt; &lt;ip-range&gt; { &lt;w&gt; &lt;ip-range&gt; }
113 [ &lt;w&gt; ]
114 &lt;net-spec&gt; :== &lt;network&gt; [ &quot;(&quot; &lt;interface-list&gt; &quot;)&quot; ]
115 &lt;network&gt; :== &lt;nettype&gt; [ &lt;number&gt; ]
116 &lt;nettype&gt; :== &quot;tcp&quot; | &quot;elan&quot; | &quot;openib&quot; | ...
117 &lt;iface-list&gt; :== &lt;interface&gt; [ &quot;,&quot; &lt;iface-list&gt; ]
118 &lt;ip-range&gt; :== &lt;r-expr&gt; &quot;.&quot; &lt;r-expr&gt; &quot;.&quot; &lt;r-expr&gt; &quot;.&quot; &lt;r-expr&gt;
119 &lt;r-expr&gt; :== &lt;number&gt; | &quot;*&quot; | &quot;[&quot; &lt;r-list&gt; &quot;]&quot;
120 &lt;r-list&gt; :== &lt;range&gt; [ &quot;,&quot; &lt;r-list&gt; ]
121 &lt;range&gt; :== &lt;number&gt; [ &quot;-&quot; &lt;number&gt; [ &quot;/&quot; &lt;number&gt; ] ]
122 &lt;comment :== &quot;#&quot; { &lt;non-net-sep-chars&gt; }
123 &lt;net-sep&gt; :== &quot;;&quot; | &quot;\n&quot;
124 &lt;w&gt; :== &lt;whitespace-chars&gt; { &lt;whitespace-chars&gt; }
125 </screen>
126         <para><literal>&lt;net-spec&gt;</literal> contains enough information to uniquely identify the network and load an appropriate LND. The LND determines the missing &quot;address-within-network&quot; part of the NID based on the interfaces it can use.</para>
127         <para><literal>&lt;iface-list&gt;</literal> specifies which hardware interface the network can use. If omitted, all interfaces are used. LNDs that do not support the <literal>&lt;iface-list&gt;</literal> syntax cannot be configured to use particular interfaces and just use what is there. Only a single instance of these LNDs can exist on a node at any time, and <literal>&lt;iface-list&gt;</literal> must be omitted.</para>
128         <para><literal>&lt;net-match&gt;</literal> entries are scanned in the order declared to see if one of the node&apos;s IP addresses matches one of the <literal>&lt;ip-range&gt;</literal> expressions. If there is a match, <literal>&lt;net-spec&gt;</literal> specifies the network to instantiate. Note that it is the first match for a particular network that counts. This can be used to simplify the match expression for the general case by placing it after the special cases. For example:</para>
129         <screen>ip2nets=&quot;tcp(eth1,eth2) 134.32.1.[4-10/2]; tcp(eth1) *.*.*.*&quot;</screen>
130         <para>4 nodes on the 134.32.1.* network have 2 interfaces (134.32.1.{4,6,8,10}) but all the rest have 1.</para>
131         <screen>ip2nets=&quot;<emphasis role="bold">vib</emphasis> 192.168.0.*; tcp(eth2) 192.168.0.[1,7,4,12]&quot; </screen>
132         <para>This describes an IB cluster on 192.168.0.*. Four of these nodes also have IP interfaces; these four could be used as routers.</para>
133         <para>Note that match-all expressions (For instance, <literal>*.*.*.*</literal>) effectively mask all other</para>
134         <para> <literal>&lt;net-match&gt;</literal> entries specified after them. They should be used with caution.</para>
135         <para>Here is a more complicated situation, the route parameter is explained below. We have:</para>
136         <itemizedlist>
137           <listitem>
138             <para>Two TCP subnets</para>
139           </listitem>
140           <listitem>
141             <para>One Elan subnet</para>
142           </listitem>
143           <listitem>
144             <para>One machine set up as a router, with both TCP and Elan interfaces</para>
145           </listitem>
146           <listitem>
147             <para>IP over Elan configured, but only IP will be used to label the nodes.</para>
148           </listitem>
149         </itemizedlist>
150         <screen>options lnet ip2nets=â€tcp 198.129.135.* 192.128.88.98; \
151         elan 198.128.88.98 198.129.135.3; \ 
152         routes=&apos;cp 1022@elan # Elan NID of router; \
153         elan  198.128.88.98@tcp # TCP NID of router  &apos;</screen>
154       </section>
155       <section remap="h4">
156           <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>tcp</tertiary></indexterm>
157 networks (&quot;tcp&quot;)</title>
158         <para>This is an alternative to &quot;<literal>ip2nets</literal>&quot; which can be used to specify the networks to be instantiated explicitly. The syntax is a simple comma separated list of <literal>&lt;net-spec&gt;</literal>s (see above). The default is only used if neither &apos;ip2nets&apos; nor &apos;networks&apos; is specified.</para>
159       </section>
160       <section remap="h4">
161           <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>routes</tertiary></indexterm>
162 routes (&quot;&quot;)</title>
163         <para>This is a string that lists networks and the NIDs of routers that forward to them.</para>
164         <para>It has the following syntax (<literal>&lt;w&gt;</literal> is one or more whitespace characters):</para>
165         <screen>&lt;routes&gt; :== &lt;route&gt;{ ; &lt;route&gt; }
166 &lt;route&gt; :== [&lt;net&gt;[&lt;w&gt;&lt;hopcount&gt;]&lt;w&gt;&lt;nid&gt;[:&lt;priority&gt;]{&lt;w&gt;&lt;nid&gt;[:&lt;priority&gt;]}</screen>
167         <para>Note: the priority parameter was added in release 2.5.</para>
168         <para>So a node on the network <literal>tcp1</literal> that needs to go through a router to get to the Elan network:</para>
169         <screen>options lnet networks=tcp1 routes=&quot;elan 1 192.168.2.2@tcpA&quot;</screen>
170         <para>The hopcount and priority numbers are used to help choose the best path between multiply-routed configurations.</para>
171         <para>A simple but powerful expansion syntax is provided, both for target networks and router NIDs as follows.</para>
172         <screen>&lt;expansion&gt; :== &quot;[&quot; &lt;entry&gt; { &quot;,&quot; &lt;entry&gt; } &quot;]&quot;
173 &lt;entry&gt; :== &lt;numeric range&gt; | &lt;non-numeric item&gt;
174 &lt;numeric range&gt; :== &lt;number&gt; [ &quot;-&quot; &lt;number&gt; [ &quot;/&quot; &lt;number&gt; ] ]</screen>
175         <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=&quot;elan 192.168.1.[22-24]@tcp&quot;</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>
176         <para><literal>routes=&quot;[tcp,vib] 2 [8-14/2]@elan&quot;</literal> says that 2 networks (<literal>tcp0</literal> and <literal>vib0</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>
177         <para>Duplicate entries, entries that route to a local network, and entries that specify routers on a non-local network are ignored.</para>
178         <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>
179         <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>
180         <para>It is an error to specify routes to the same destination with routers on different local networks.</para>
181         <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>
182       </section>
183       <section remap="h4">
184           <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>forwarding</tertiary></indexterm>
185 forwarding (&quot;&quot;)</title>
186         <para>This is a string that can be set either to &quot;<literal>enabled</literal>&quot; or &quot;<literal>disabled</literal>&quot; for explicit control of whether this node should act as a router, forwarding communications between all local networks.</para>
187         <para>A standalone router can be started by simply starting LNET (&apos;<literal>modprobe ptlrpc</literal>&apos;) with appropriate network topology options.</para>
188         <informaltable frame="all">
189           <tgroup cols="2">
190             <colspec colname="c1" colwidth="50*"/>
191             <colspec colname="c2" colwidth="50*"/>
192             <thead>
193               <row>
194                 <entry>
195                   <para><emphasis role="bold">Variable</emphasis></para>
196                 </entry>
197                 <entry>
198                   <para><emphasis role="bold">Description</emphasis></para>
199                 </entry>
200               </row>
201             </thead>
202             <tbody>
203               <row>
204                 <entry>
205                   <para> <literal>acceptor</literal></para>
206                 </entry>
207                 <entry>
208                   <para>The acceptor is a TCP/IP service that some LNDs use to establish communications. If a local network requires it and it has not been disabled, the acceptor listens on a single port for connection requests that it redirects to the appropriate local network. The acceptor is part of the LNET module and configured by the following options:</para>
209                   <itemizedlist>
210                     <listitem>
211                       <para><literal>secure</literal>  - Accept connections only from reserved TCP ports (below 1023).</para>
212                     </listitem>
213                     <listitem>
214                       <para><literal>all</literal>  - Accept connections from any TCP port. </para>
215                       <note>
216                         <para>This is required for liblustre clients to allow connections on non-privileged ports.</para>
217                       </note>
218                     </listitem>
219                     <listitem>
220                       <para><literal>none</literal>  - Do not run the acceptor.</para>
221                     </listitem>
222                   </itemizedlist>
223                 </entry>
224               </row>
225               <row>
226                 <entry>
227                   <para> <literal>accept_port</literal></para>
228                   <para> <literal>(988)</literal></para>
229                 </entry>
230                 <entry>
231                   <para>  Port number on which the acceptor should listen for connection requests. All nodes in a site configuration that require an acceptor must use the same port.</para>
232                 </entry>
233               </row>
234               <row>
235                 <entry>
236                   <para> <literal>accept_backlog</literal></para>
237                   <para> <literal>(127)</literal></para>
238                 </entry>
239                 <entry>
240                   <para>Maximum length that the queue of pending connections may grow to (see listen(2)).</para>
241                 </entry>
242               </row>
243               <row>
244                 <entry>
245                   <para> <literal>accept_timeout</literal></para>
246                   <para> <literal>(5, W)</literal></para>
247                 </entry>
248                 <entry>
249                   <para>Maximum time in seconds the acceptor is allowed to block while communicating with a peer.</para>
250                 </entry>
251               </row>
252               <row>
253                 <entry>
254                   <para> <literal>accept_proto_version</literal></para>
255                 </entry>
256                 <entry>
257                   <para>Version of the acceptor protocol that should be used by outgoing connection requests. It defaults to the most recent acceptor protocol version, but it may be set to the previous version to allow the node to initiate connections with nodes that only understand that version of the acceptor protocol. The acceptor can, with some restrictions, handle either version (that is, it can accept connections from both &apos;old&apos; and &apos;new&apos; peers). For the current version of the acceptor protocol (version 1), the acceptor is compatible with old peers if it is only required by a single local network.</para>
258                 </entry>
259               </row>
260             </tbody>
261           </tgroup>
262         </informaltable>
263       </section>
264       <section>
265           <title><indexterm><primary>configuring</primary><secondary>network</secondary><tertiary>rnet_htable_size</tertiary></indexterm>
266 <literal>rnet_htable_size</literal></title>
267         <para condition='l23'><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>
268       </section>
269     </section>
270     <section remap="h3" xml:id="section_ngq_qhy_zl">
271       <title><indexterm>
272           <primary>configuring</primary>
273           <secondary>network</secondary>
274           <tertiary>SOCKLND</tertiary>
275         </indexterm>
276         <literal>SOCKLND</literal> Kernel TCP/IP LND</title>
277       <para>The <literal>SOCKLND</literal> kernel TCP/IP LND (<literal>socklnd</literal>) is
278         connection-based and uses the acceptor to establish communications via sockets with its
279         peers.</para>
280       <para>It supports multiple instances and load balances dynamically over multiple interfaces.
281         If no interfaces are specified by the <literal>ip2nets</literal> or networks module
282         parameter, all non-loopback IP interfaces are used. The address-within-network is determined
283         by the address of the first IP interface an instance of the <literal>socklnd</literal>
284         encounters.</para>
285       <para>Consider a node on the &apos;edge&apos; of an InfiniBand network, with a low-bandwidth
286         management Ethernet (<literal>eth0</literal>), IP over IB configured
287           (<literal>ipoib0</literal>), and a pair of GigE NICs
288           (<literal>eth1</literal>,<literal>eth2</literal>) providing off-cluster connectivity. This
289         node should be configured with &apos;<literal>networks=vib,tcp(eth1,eth2)</literal>&apos; to
290         ensure that the <literal>socklnd</literal> ignores the management Ethernet and IPoIB.</para>
291       <informaltable frame="all">
292         <tgroup cols="2">
293           <colspec colname="c1" colwidth="50*"/>
294           <colspec colname="c2" colwidth="50*"/>
295           <thead>
296             <row>
297               <entry>
298                 <para><emphasis role="bold">Variable</emphasis></para>
299               </entry>
300               <entry>
301                 <para><emphasis role="bold">Description</emphasis></para>
302               </entry>
303             </row>
304           </thead>
305           <tbody>
306             <row>
307               <entry>
308                 <para>
309                   <literal>timeout</literal></para>
310                 <para>
311                   <literal>(50,W)</literal></para>
312               </entry>
313               <entry>
314                 <para>Time (in seconds) that communications may be stalled before the LND completes
315                   them with failure.</para>
316               </entry>
317             </row>
318             <row>
319               <entry>
320                 <para>
321                   <literal>nconnds</literal></para>
322                 <para>
323                   <literal>(4)</literal></para>
324               </entry>
325               <entry>
326                 <para>Sets the number of connection daemons.</para>
327               </entry>
328             </row>
329             <row>
330               <entry>
331                 <para>
332                   <literal>min_reconnectms</literal></para>
333                 <para>
334                   <literal>(1000,W)</literal></para>
335               </entry>
336               <entry>
337                 <para>Minimum connection retry interval (in milliseconds). After a failed connection
338                   attempt, this is the time that must elapse before the first retry. As connections
339                   attempts fail, this time is doubled on each successive retry up to a maximum of
340                     &apos;<literal>max_reconnectms</literal>&apos;.</para>
341               </entry>
342             </row>
343             <row>
344               <entry>
345                 <para>
346                   <literal>max_reconnectms</literal></para>
347                 <para>
348                   <literal>(6000,W)</literal></para>
349               </entry>
350               <entry>
351                 <para>Maximum connection retry interval (in milliseconds).</para>
352               </entry>
353             </row>
354             <row>
355               <entry>
356                 <para>
357                   <literal>eager_ack</literal></para>
358                 <para>
359                   <literal>(0 on linux,</literal></para>
360                 <para>
361                   <literal>1 on darwin,W)</literal></para>
362               </entry>
363               <entry>
364                 <para>Boolean that determines whether the <literal>socklnd</literal> should attempt
365                   to flush sends on message boundaries.</para>
366               </entry>
367             </row>
368             <row>
369               <entry>
370                 <para>
371                   <literal>typed_conns</literal></para>
372                 <para>
373                   <literal>(1,Wc)</literal></para>
374               </entry>
375               <entry>
376                 <para>Boolean that determines whether the <literal>socklnd</literal> should use
377                   different sockets for different types of messages. When clear, all communication
378                   with a particular peer takes place on the same socket. Otherwise, separate sockets
379                   are used for bulk sends, bulk receives and everything else.</para>
380               </entry>
381             </row>
382             <row>
383               <entry>
384                 <para>
385                   <literal>min_bulk</literal></para>
386                 <para>
387                   <literal>(1024,W)</literal></para>
388               </entry>
389               <entry>
390                 <para>Determines when a message is considered &quot;bulk&quot;.</para>
391               </entry>
392             </row>
393             <row>
394               <entry>
395                 <para>
396                   <literal>tx_buffer_size, rx_buffer_size</literal></para>
397                 <para>
398                   <literal>(8388608,Wc)</literal></para>
399               </entry>
400               <entry>
401                 <para>Socket buffer sizes. Setting this option to zero (0), allows the system to
402                   auto-tune buffer sizes. </para>
403                 <warning>
404                   <para>Be very careful changing this value as improper sizing can harm
405                     performance.</para>
406                 </warning>
407               </entry>
408             </row>
409             <row>
410               <entry>
411                 <para>
412                   <literal>nagle</literal></para>
413                 <para>
414                   <literal>(0,Wc)</literal></para>
415               </entry>
416               <entry>
417                 <para>Boolean that determines if <literal>nagle</literal> should be enabled. It
418                   should never be set in production systems.</para>
419               </entry>
420             </row>
421             <row>
422               <entry>
423                 <para>
424                   <literal>keepalive_idle</literal></para>
425                 <para>
426                   <literal>(30,Wc)</literal></para>
427               </entry>
428               <entry>
429                 <para>Time (in seconds) that a socket can remain idle before a keepalive probe is
430                   sent. Setting this value to zero (0) disables keepalives.</para>
431               </entry>
432             </row>
433             <row>
434               <entry>
435                 <para>
436                   <literal>keepalive_intvl</literal></para>
437                 <para>
438                   <literal>(2,Wc)</literal></para>
439               </entry>
440               <entry>
441                 <para>Time (in seconds) to repeat unanswered keepalive probes. Setting this value to
442                   zero (0) disables keepalives.</para>
443               </entry>
444             </row>
445             <row>
446               <entry>
447                 <para>
448                   <literal>keepalive_count</literal></para>
449                 <para>
450                   <literal>(10,Wc)</literal></para>
451               </entry>
452               <entry>
453                 <para>Number of unanswered keepalive probes before pronouncing socket (hence peer)
454                   death.</para>
455               </entry>
456             </row>
457             <row>
458               <entry>
459                 <para>
460                   <literal>enable_irq_affinity</literal></para>
461                 <para>
462                   <literal>(0,Wc)</literal></para>
463               </entry>
464               <entry>
465                 <para>Boolean that determines whether to enable IRQ affinity. The default is zero
466                   (0).</para>
467                 <para>When set, <literal>socklnd</literal> attempts to maximize performance by
468                   handling device interrupts and data movement for particular (hardware) interfaces
469                   on particular CPUs. This option is not available on all platforms. This option
470                   requires an SMP system to exist and produces best performance with multiple NICs.
471                   Systems with multiple CPUs and a single NIC may see increase in the performance
472                   with this parameter disabled.</para>
473               </entry>
474             </row>
475             <row>
476               <entry>
477                 <para>
478                   <literal>zc_min_frag</literal></para>
479                 <para>
480                   <literal>(2048,W)</literal></para>
481               </entry>
482               <entry>
483                 <para>Determines the minimum message fragment that should be considered for
484                   zero-copy sends. Increasing it above the platform&apos;s <literal>PAGE_SIZE
485                   </literal>disables all zero copy sends. This option is not available on all
486                   platforms.</para>
487               </entry>
488             </row>
489           </tbody>
490         </tgroup>
491       </informaltable>
492     </section>
493     <section remap="h3">
494       <title><indexterm>
495           <primary>configuring</primary>
496           <secondary>portals</secondary>
497         </indexterm>Portals LND Linux (ptllnd)</title>
498       <para>The Portals LND Linux (<literal>ptllnd</literal>) can be used as a interface layer to communicate with Sandia Portals networking devices. This version is intended to work on Cray XT3 Linux nodes that use Cray Portals as a network transport.</para>
499       <para><emphasis role="bold">Message Buffers</emphasis></para>
500       <para>When <literal>ptllnd</literal> starts up, it allocates and posts sufficient message buffers to allow all expected peers (set by concurrent_peers) to send one unsolicited message. The first message that a peer actually sends is (so-called) &quot;<literal>HELLO</literal>&quot; message, used to negotiate how much additional buffering to setup (typically 8 messages). If 10000 peers actually exist, then enough buffers are posted for 80000 messages.</para>
501       <para>The maximum message size is set by the <literal>max_msg_size</literal> module parameter (default value is 512). This parameter sets the bulk transfer breakpoint. Below this breakpoint, payload data is sent in the message itself. Above this breakpoint, a buffer descriptor is sent and the receiver gets the actual payload.</para>
502       <para>The buffer size is set by the <literal>rxb_npages</literal> module parameter (default value is <literal>1</literal>). The default conservatively avoids allocation problems due to kernel memory fragmentation. However, increasing this value to 2 is probably not risky.</para>
503       <para>The <literal>ptllnd</literal> also keeps an additional <literal>rxb_nspare</literal> buffers (default value is 8) posted to account for full buffers being handled.</para>
504       <para>Assuming a 4K page size with 10000 peers, 1258 buffers can be expected to be posted at startup, increasing to a maximum of 10008 as peers that are actually connected. By doubling <literal>rxb_npages</literal> halving <literal>max_msg_size</literal>, this number can be reduced by a factor of 4.</para>
505       <para><emphasis role="bold">ME/MD Queue Length</emphasis></para>
506       <para>The <literal>ptllnd</literal> uses a single portal set by the portal module parameter (default value of 9) for both message and bulk buffers. Message buffers are always attached with <literal>PTL_INS_AFTER</literal> and match anything sent with &quot;message&quot; matchbits. Bulk buffers are always attached with <literal>PTL_INS_BEFORE</literal> and match only specific matchbits for that particular bulk transfer.</para>
507       <para>This scheme assumes that the majority of ME/MDs posted are for &quot;message&quot; buffers, and that the overhead of searching through the preceding &quot;bulk&quot; buffers is acceptable. Since the number of &quot;bulk&quot; buffers posted at any time is also dependent on the bulk transfer breakpoint set by <literal>max_msg_size</literal>, this seems like an issue worth measuring at scale.</para>
508       <para><emphasis role="bold">TX Descriptors</emphasis></para>
509       <para>The <literal>ptllnd</literal> has a pool of so-called &quot;tx descriptors&quot;, which it uses not only for outgoing messages, but also to hold state for bulk transfers requested by incoming messages. This pool should scale with the total number of peers.</para>
510       <para>To enable the building of the Portals LND (<literal>ptllnd.ko</literal>) configure with this option:</para>
511       <screen>./configure --with-portals=<replaceable>/path/to/portals/headers</replaceable></screen>
512       <informaltable frame="all">
513         <tgroup cols="2">
514           <colspec colname="c1" colwidth="50*"/>
515           <colspec colname="c2" colwidth="50*"/>
516           <thead>
517             <row>
518               <entry>
519                 <para><emphasis role="bold">Variable</emphasis></para>
520               </entry>
521               <entry>
522                 <para><emphasis role="bold">Description</emphasis></para>
523               </entry>
524             </row>
525           </thead>
526           <tbody>
527             <row>
528               <entry>
529                 <para> <literal>ntx</literal></para>
530                 <para> <literal>(256)</literal></para>
531               </entry>
532               <entry>
533                 <para>Total number of messaging descriptors.</para>
534               </entry>
535             </row>
536             <row>
537               <entry>
538                 <para> <literal>concurrent_peers</literal></para>
539                 <para> <literal>(1152)</literal></para>
540               </entry>
541               <entry>
542                 <para>Maximum number of concurrent peers. Peers that attempt to connect beyond the maximum are not allowed.</para>
543               </entry>
544             </row>
545             <row>
546               <entry>
547                 <para> <literal>peer_hash_table_size</literal></para>
548                 <para> <literal>(101)</literal></para>
549               </entry>
550               <entry>
551                 <para>Number of hash table slots for the peers. This number should scale with <literal>concurrent_peers</literal>. The size of the peer hash table is set by the module parameter <literal>peer_hash_table_size</literal> which defaults to a value of 101. This number should be prime to ensure the peer hash table is populated evenly. It is advisable to increase this value to 1001 for ~10000 peers.</para>
552               </entry>
553             </row>
554             <row>
555               <entry>
556                 <para> <literal>cksum</literal></para>
557                 <para> <literal>(0)</literal></para>
558               </entry>
559               <entry>
560                 <para>Set to non-zero to enable message (not RDMA) checksums for outgoing packets. Incoming packets are always check-summed if necessary, independent of this value.</para>
561               </entry>
562             </row>
563             <row>
564               <entry>
565                 <para> <literal>timeout</literal></para>
566                 <para> <literal>(50)</literal></para>
567               </entry>
568               <entry>
569                 <para>Amount of time (in seconds) that a request can linger in a peers-active queue before the peer is considered dead.</para>
570               </entry>
571             </row>
572             <row>
573               <entry>
574                 <para> <literal>portal</literal></para>
575                 <para> <literal>(9)</literal></para>
576               </entry>
577               <entry>
578                 <para>Portal ID to use for the <literal>ptllnd</literal> traffic.</para>
579               </entry>
580             </row>
581             <row>
582               <entry>
583                 <para> <literal>rxb_npages</literal></para>
584                 <para> <literal>(64 * #cpus)</literal></para>
585               </entry>
586               <entry>
587                 <para>Number of pages in an RX buffer.</para>
588               </entry>
589             </row>
590             <row>
591               <entry>
592                 <para> <literal>credits</literal></para>
593                 <para> <literal>(128)</literal></para>
594               </entry>
595               <entry>
596                 <para>Maximum total number of concurrent sends that are outstanding to a single peer at a given time.</para>
597               </entry>
598             </row>
599             <row>
600               <entry>
601                 <para> <literal>peercredits</literal></para>
602                 <para> <literal>(8)</literal></para>
603               </entry>
604               <entry>
605                 <para>Maximum number of concurrent sends that are outstanding to a single peer at a given time.</para>
606               </entry>
607             </row>
608             <row>
609               <entry>
610                 <para> <literal>max_msg_size</literal></para>
611                 <para> <literal>(512)</literal></para>
612               </entry>
613               <entry>
614                 <para>Maximum immediate message size. This MUST be the same on all nodes in a cluster. A peer that connects with a different <literal>max_msg_size</literal> value will be rejected.</para>
615               </entry>
616             </row>
617           </tbody>
618         </tgroup>
619       </informaltable>
620     </section>
621     <section remap="h3">
622       <title><indexterm><primary>configuring</primary><secondary>MX LND</secondary></indexterm>MX LND</title>
623       <para><literal>MXLND</literal> supports a number of load-time parameters using Linux&apos;s module parameter system. The following variables are available:</para>
624       <informaltable frame="all">
625         <tgroup cols="2">
626           <colspec colname="c1" colwidth="50*"/>
627           <colspec colname="c2" colwidth="50*"/>
628           <thead>
629             <row>
630               <entry>
631                 <para><emphasis role="bold">Variable</emphasis></para>
632               </entry>
633               <entry>
634                 <para><emphasis role="bold">Description</emphasis></para>
635               </entry>
636             </row>
637           </thead>
638           <tbody>
639             <row>
640               <entry>
641                 <para> <literal>n_waitd</literal></para>
642               </entry>
643               <entry>
644                 <para>Number of completion daemons.</para>
645               </entry>
646             </row>
647             <row>
648               <entry>
649                 <para> <literal>max_peers</literal></para>
650               </entry>
651               <entry>
652                 <para>Maximum number of peers that may connect.</para>
653               </entry>
654             </row>
655             <row>
656               <entry>
657                 <para> <literal>cksum</literal></para>
658               </entry>
659               <entry>
660                 <para>Enables small message (below 4 KB) checksums if set to a non-zero value.</para>
661               </entry>
662             </row>
663             <row>
664               <entry>
665                 <para> <literal>ntx</literal></para>
666               </entry>
667               <entry>
668                 <para>Number of total tx message descriptors.</para>
669               </entry>
670             </row>
671             <row>
672               <entry>
673                 <para> <literal>credits</literal></para>
674               </entry>
675               <entry>
676                 <para>Number of concurrent sends to a single peer.</para>
677               </entry>
678             </row>
679             <row>
680               <entry>
681                 <para> <literal>board</literal></para>
682               </entry>
683               <entry>
684                 <para>Index value of the Myrinet board (NIC).</para>
685               </entry>
686             </row>
687             <row>
688               <entry>
689                 <para> <literal>ep_id</literal></para>
690               </entry>
691               <entry>
692                 <para>MX endpoint ID.</para>
693               </entry>
694             </row>
695             <row>
696               <entry>
697                 <para> <literal>polling</literal></para>
698               </entry>
699               <entry>
700                 <para>Use zero (0) to block (wait). A value greater than 0 will poll that many times before blocking.</para>
701               </entry>
702             </row>
703             <row>
704               <entry>
705                 <para> <literal>hosts</literal></para>
706               </entry>
707               <entry>
708                 <para>IP-to-hostname resolution file.</para>
709               </entry>
710             </row>
711           </tbody>
712         </tgroup>
713       </informaltable>
714       <para>Of the described variables, only hosts is required. It must be the absolute path to the MXLND hosts file.</para>
715       <para>For example:</para>
716       <screen>options kmxlnd hosts=/etc/hosts.mxlnd</screen>
717       <para>The file format for the hosts file is:</para>
718       <screen>IP  HOST  BOARD   EP_ID</screen>
719       <para>The values must be space and/or tab separated where:</para>
720       <para><literal>IP</literal> is a valid IPv4 address</para>
721       <para><literal>HOST</literal> is the name returned by <literal>`hostname`</literal> on that machine</para>
722       <para><literal>BOARD</literal> is the index of the Myricom NIC (0 for the first card, etc.)</para>
723       <para><literal>EP_ID</literal> is the MX endpoint ID</para>
724       <para>To obtain the optimal performance for your platform, you may want to vary the remaining options.</para>
725       <para><literal>n_waitd(1)</literal> sets the number of threads that process completed MX requests (sends and receives).</para>
726       <para><literal>max_peers(1024)</literal> tells MXLND the upper limit of machines that it will need to communicate with. This affects how many receives it will pre-post and each receive will use one page of memory. Ideally, on clients, this value will be equal to the total number of Lustre servers (MDS and OSS). On servers, it needs to equal the total number of machines in the storage system. cksum (0) turns on small message checksums. It can be used to aid in troubleshooting. MX also provides an optional checksumming feature which can check all messages (large and small). For details, see the MX README.</para>
727       <para><literal>ntx(256)</literal> is the number of total sends in flight from this machine. In actuality, MXLND reserves half of them for connect messages so make this value twice as large as you want for the total number of sends in flight.</para>
728       <para><literal>credits(8)</literal> is the number of in-flight messages for a specific peer.
729         This is part of the flow-control system in provided by the Lustre software. Increasing this
730         value may improve performance but it requires more memory because each message requires at
731         least one page.</para>
732       <para><literal>board(0)</literal> is the index of the Myricom NIC. Hosts can have multiple Myricom NICs and this identifies which one MXLND should use. This value must match the board value in your MXLND hosts file for this host.</para>
733       <para><literal>ep_id(3)</literal> is the MX endpoint ID. Each process that uses MX is required to have at least one MX endpoint to access the MX library and NIC. The ID is a simple index starting at zero (0). This value must match the endpoint ID value in your MXLND hosts file for this host.</para>
734       <para><literal>polling(0)</literal> determines whether this host will poll or block for MX request completions. A value of 0 blocks and any positive value will poll that many times before blocking. Since polling increases CPU usage, we suggest that you set this to zero (0) on the client and experiment with different values for servers.</para>
735     </section>
736   </section>
737 </chapter>