Whamcloud - gitweb
LUDOC-117 style: use <replaceable> in example text
[doc/manual.git] / LustreProc.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <!-- This document was created with Syntext Serna Free. --><chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="lustreproc">
3   <title xml:id="lustreproc.title">LustreProc</title>
4   <para>The <literal>/proc</literal> file system acts as an interface to internal data structures in the kernel. The <literal>/proc</literal> variables can be used to control aspects of Lustre performance and provide information.</para>
5   <para>This chapter describes Lustre /proc entries and includes the following sections:</para>
6   <itemizedlist>
7     <listitem>
8       <para><xref linkend="dbdoclet.50438271_90999"/></para>
9     </listitem>
10     <listitem>
11       <para><xref linkend="dbdoclet.50438271_78950"/></para>
12     </listitem>
13     <listitem>
14       <para><xref linkend="dbdoclet.50438271_83523"/></para>
15     </listitem>
16   </itemizedlist>
17   <section xml:id="dbdoclet.50438271_90999">
18     <title><indexterm><primary>proc</primary></indexterm>Proc Entries for Lustre</title>
19     <para>This section describes <literal>/proc</literal> entries for Lustre.</para>
20     <section remap="h3">
21       <title>Locating Lustre File Systems and Servers</title>
22       <para>Use the proc files on the MGS to locate the following:</para>
23       <itemizedlist>
24         <listitem>
25           <para> All known file systems</para>
26           <screen>mgs# cat /proc/fs/lustre/mgs/MGS/filesystems
27 spfs
28 lustre</screen>
29         </listitem>
30       </itemizedlist>
31       <itemizedlist>
32         <listitem>
33           <para> The server names participating in a file system (for each file system that has at least one server running)</para>
34           <screen>mgs# cat /proc/fs/lustre/mgs/MGS/live/spfs
35 fsname: spfs
36 flags: 0x0         gen: 7
37 spfs-MDT0000
38 spfs-OST0000</screen>
39         </listitem>
40       </itemizedlist>
41       <para>All servers are named according to this convention: <literal><replaceable>fsname</replaceable>-<replaceable>MDT|OSTnumber</replaceable></literal>. This can be shown for live servers under <literal>/proc/fs/lustre/devices</literal>:</para>
42       <screen>mds# cat /proc/fs/lustre/devices 
43 0 UP mgs MGS MGS 11
44 1 UP mgc MGC192.168.10.34@tcp 1f45bb57-d9be-2ddb-c0b0-5431a49226705
45 2 UP mdt MDS MDS_uuid 3
46 3 UP lov lustre-mdtlov lustre-mdtlov_UUID 4
47 4 UP mds lustre-MDT0000 lustre-MDT0000_UUID 7
48 5 UP osc lustre-OST0000-osc lustre-mdtlov_UUID 5
49 6 UP osc lustre-OST0001-osc lustre-mdtlov_UUID 5
50 7 UP lov lustre-clilov-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa04
51 8 UP mdc lustre-MDT0000-mdc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05
52 9 UP osc lustre-OST0000-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05
53 10 UP osc lustre-OST0001-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05</screen>
54       <para>Or from the device label at any time:</para>
55       <screen>mds# e2label /dev/sda
56 lustre-MDT0000</screen>
57     </section>
58     <section remap="h3">
59       <title><indexterm><primary>proc</primary><secondary>timeouts</secondary></indexterm>Lustre Timeouts</title>
60       <para>Lustre uses two types of timeouts.</para>
61       <itemizedlist>
62         <listitem>
63           <para>LND timeouts that ensure point-to-point communications complete in finite time in the presence of failures. These timeouts are logged with the <literal>S_LND</literal> flag set. They may <emphasis>not</emphasis> be printed as console messages, so you should check the Lustre log for <literal>D_NETERROR</literal> messages, or enable printing of <literal>D_NETERROR</literal> messages to the console (<literal>lctl set_param printk=+neterror</literal>).</para>
64         </listitem>
65       </itemizedlist>
66       <para>Congested routers can be a source of spurious LND timeouts. To avoid this, increase the number of LNET router buffers to reduce back-pressure and/or increase LND timeouts on all nodes on all connected networks. You should also consider increasing the total number of LNET router nodes in the system so that the aggregate router bandwidth matches the aggregate server bandwidth.</para>
67       <itemizedlist>
68         <listitem>
69           <para>Lustre timeouts that ensure Lustre RPCs complete in finite time in the presence of failures. These timeouts should <emphasis>always</emphasis> be printed as console messages. If Lustre timeouts are not accompanied by LNET timeouts, then you need to increase the lustre timeout on both servers and clients.</para>
70         </listitem>
71       </itemizedlist>
72       <para>Specific Lustre timeouts are described below.</para>
73       <para><literal> /proc/sys/lustre/timeout </literal></para>
74       <para>This is the time period that a client waits for a server to complete an RPC (default is 100s). Servers wait half of this time for a normal client RPC to complete and a quarter of this time for a single bulk request (read or write of up to 1 MB) to complete. The client pings recoverable targets (MDS and OSTs) at one quarter of the timeout, and the server waits one and a half times the timeout before evicting a client for being &quot;stale.&quot;</para>
75       <note>
76         <para>Lustre sends periodic &apos;PING&apos; messages to servers with which it had no communication for a specified period of time. Any network activity on the file system that triggers network traffic toward servers also works as a health check.</para>
77       </note>
78       <para><literal> /proc/sys/lustre/ldlm_timeout </literal></para>
79       <para>This is the time period for which a server will wait for a client to reply to an initial AST (lock cancellation request) where default is 20s for an OST and 6s for an MDS. If the client replies to the AST, the server will give it a normal timeout (half of the client timeout) to flush any dirty data and release the lock.</para>
80       <para><literal> /proc/sys/lustre/fail_loc </literal></para>
81       <para>This is the internal debugging failure hook.</para>
82       <para>See <literal>lustre/include/linux/obd_support.h</literal> for the definitions of individual failure locations. The default value is 0 (zero).</para>
83       <screen>sysctl -w lustre.fail_loc=0x80000122 # drop a single reply</screen>
84       <para><literal> /proc/sys/lustre/dump_on_timeout </literal></para>
85       <para>This triggers dumps of the Lustre debug log when timeouts occur. The default value is 0 (zero).</para>
86       <para><literal> /proc/sys/lustre/dump_on_eviction </literal></para>
87       <para>This triggers dumps of the Lustre debug log when an eviction occurs. The default value is 0 (zero). By default, debug logs are dumped to the /tmp folder; this location can be changed via /proc.</para>
88     </section>
89     <section remap="h3">
90       <title><indexterm><primary>proc</primary><secondary>adaptive timeouts</secondary></indexterm>Adaptive Timeouts</title>
91       <para>Lustre offers an adaptive mechanism to set RPC timeouts. The adaptive timeouts feature (enabled, by default) causes servers to track actual RPC completion times, and to report estimated completion times for future RPCs back to clients. The clients use these estimates to set their future RPC timeout values. If server request processing slows down for any reason, the RPC completion estimates increase, and the clients allow more time for RPC completion.</para>
92       <para>If RPCs queued on the server approach their timeouts, then the server sends an early reply to the client, telling the client to allow more time. In this manner, clients avoid RPC timeouts and disconnect/reconnect cycles. Conversely, as a server speeds up, RPC timeout values decrease, allowing faster detection of non-responsive servers and faster attempts to reconnect to a server&apos;s failover partner.</para>
93       <para>In previous Lustre versions, the static obd_timeout (<literal>/proc/sys/lustre/timeout</literal>) value was used as the maximum completion time for all RPCs; this value also affected the client-server ping interval and initial recovery timer. Now, with adaptive timeouts, obd_timeout is only used for the ping interval and initial recovery estimate. When a client reconnects during recovery, the server uses the client&apos;s timeout value to reset the recovery wait period; i.e., the server learns how long the client had been willing to wait, and takes this into account when adjusting the recovery period.</para>
94       <section remap="h4">
95         <title><indexterm><primary>proc</primary><secondary>configuring adaptive timeouts</secondary></indexterm><indexterm><primary>configuring</primary><secondary>adaptive timeouts</secondary></indexterm>Configuring Adaptive Timeouts</title>
96         <para>One of the goals of adaptive timeouts is to relieve users from having to tune the <literal>obd_timeout</literal> value. In general, <literal>obd_timeout</literal> should no longer need to be changed. However, there are several parameters related to adaptive timeouts that users can set. In most situations, the default values should be used.</para>
97         <para>The following parameters can be set persistently system-wide using <literal>lctl conf_param</literal> on the MGS. For example, <literal>lctl conf_param work1.sys.at_max=1500</literal> sets the at_max value for all servers and clients using the work1 file system.</para>
98         <note>
99           <para>Nodes using multiple Lustre file systems must use the same <literal>at_*</literal> values for all file systems.)</para>
100         </note>
101         <informaltable frame="all">
102           <tgroup cols="2">
103             <colspec colname="c1" colwidth="50*"/>
104             <colspec colname="c2" colwidth="50*"/>
105             <thead>
106               <row>
107                 <entry>
108                   <para><emphasis role="bold">Parameter</emphasis></para>
109                 </entry>
110                 <entry>
111                   <para><emphasis role="bold">Description</emphasis></para>
112                 </entry>
113               </row>
114             </thead>
115             <tbody>
116               <row>
117                 <entry>
118                   <para> <literal> at_min </literal></para>
119                 </entry>
120                 <entry>
121                   <para>Sets the minimum adaptive timeout (in seconds). Default value is 0. The at_min parameter is the minimum processing time that a server will report. Clients base their timeouts on this value, but they do not use this value directly. If you experience cases in which, for unknown reasons, the adaptive timeout value is too short and clients time out their RPCs (usually due to temporary network outages), then you can increase the at_min value to compensate for this. Ideally, users should leave at_min set to its default.</para>
122                 </entry>
123               </row>
124               <row>
125                 <entry>
126                   <para> <literal> at_max </literal></para>
127                 </entry>
128                 <entry>
129                   <para>Sets the maximum adaptive timeout (in seconds). The <literal>at_max</literal> parameter is an upper-limit on the service time estimate, and is used as a &apos;failsafe&apos; in case of rogue/bad/buggy code that would lead to never-ending estimate increases. If at_max is reached, an RPC request is considered &apos;broken&apos; and should time out.</para>
130                   <para>Setting at_max to 0 causes adaptive timeouts to be disabled and the old fixed-timeout method (<literal>obd_timeout</literal>) to be used.</para>
131                   <note>
132                     <para>It is possible that slow hardware might validly cause the service estimate to increase beyond the default value of at_max. In this case, you should increase at_max to the maximum time you are willing to wait for an RPC completion.</para>
133                   </note>
134                 </entry>
135               </row>
136               <row>
137                 <entry>
138                   <para> <literal> at_history </literal></para>
139                 </entry>
140                 <entry>
141                   <para>Sets a time period (in seconds) within which adaptive timeouts remember the slowest event that occurred. Default value is 600.</para>
142                 </entry>
143               </row>
144               <row>
145                 <entry>
146                   <para> <literal> at_early_margin </literal></para>
147                 </entry>
148                 <entry>
149                   <para>Sets how far before the deadline Lustre sends an early reply. Default value is 5<footnote>
150                       <para>This default was chosen as a reasonable time in which to send a reply from the point at which it was sent.</para>
151                     </footnote>.</para>
152                 </entry>
153               </row>
154               <row>
155                 <entry>
156                   <para> <literal> at_extra </literal></para>
157                 </entry>
158                 <entry>
159                   <para>Sets the incremental amount of time that a server asks for, with each early reply. The server does not know how much time the RPC will take, so it asks for a fixed value. Default value is 30<footnote>
160                       <para>This default was chosen as a balance between sending too many early replies for the same RPC and overestimating the actual completion time</para>
161                     </footnote>. When a server finds a queued request about to time out (and needs to send an early reply out), the server adds the at_extra value. If the time expires, the Lustre client enters recovery status and reconnects to restore it to normal status.</para>
162                   <para>If you see multiple early replies for the same RPC asking for multiple 30-second increases, change the at_extra value to a larger number to cut down on early replies sent and, therefore, network load.</para>
163                 </entry>
164               </row>
165               <row>
166                 <entry>
167                   <para> <literal> ldlm_enqueue_min </literal></para>
168                 </entry>
169                 <entry>
170                   <para> Sets the minimum lock enqueue time. Default value is 100. The <literal>ldlm_enqueue</literal> time is the maximum of the measured enqueue estimate (influenced by at_min and at_max parameters), multiplied by a weighting factor, and the <literal>ldlm_enqueue_min</literal> setting. LDLM lock enqueues were based on the <literal>obd_timeout</literal> value; now they have a dedicated minimum value. Lock enqueues increase as the measured enqueue times increase (similar to adaptive timeouts).</para>
171                 </entry>
172               </row>
173             </tbody>
174           </tgroup>
175         </informaltable>
176         <para>Adaptive timeouts are enabled, by default. To disable adaptive timeouts, at run time, set <literal>at_max</literal> to 0. On the MGS, run:</para>
177         <screen>$ lctl conf_param <replaceable>fsname</replaceable>.sys.at_max=0</screen>
178         <note>
179           <para>Changing adaptive timeouts status at runtime may cause transient timeout, reconnect, recovery, etc.</para>
180         </note>
181       </section>
182       <section remap="h4">
183         <title><indexterm><primary>proc</primary><secondary>interpreting adaptive timeouts</secondary></indexterm>Interpreting Adaptive Timeouts Information</title>
184         <para>Adaptive timeouts information can be read from <literal>/proc/fs/lustre/*/timeouts</literal> files (for each service and client) or with the lctl command.</para>
185         <para>This is an example from the <literal>/proc/fs/lustre/*/timeouts</literal> files:</para>
186         <screen>cfs21:~# cat /proc/fs/lustre/ost/OSS/ost_io/timeouts</screen>
187         <para>This is an example using the <literal>lctl</literal> command:</para>
188         <screen>$ lctl get_param -n ost.*.ost_io.timeouts</screen>
189         <para>This is the sample output:</para>
190         <screen>service : cur 33  worst 34 (at 1193427052, 0d0h26m40s ago) 1 1 33 2</screen>
191         <para>The <literal>ost_io</literal> service on this node is currently reporting an estimate of 33 seconds. The worst RPC service time was 34 seconds, and it happened 26 minutes ago.</para>
192         <para>The output also provides a history of service times. In the example, there are 4 &quot;bins&quot; of <literal>adaptive_timeout_history</literal>, with the maximum RPC time in each bin reported. In 0-150 seconds, the maximum RPC time was 1, with the same result in 150-300 seconds. From 300-450 seconds, the worst (maximum) RPC time was 33 seconds, and from 450-600s the worst time was 2 seconds. The current estimated service time is the maximum value of the 4 bins (33 seconds in this example).</para>
193         <para>Service times (as reported by the servers) are also tracked in the client OBDs:</para>
194         <screen>cfs21:# lctl get_param osc.*.timeouts
195 last reply : 1193428639, 0d0h00m00s ago
196 network    : cur   1  worst   2 (at 1193427053, 0d0h26m26s ago)   1   1   1   1
197 portal 6   : cur  33  worst  34 (at 1193427052, 0d0h26m27s ago)  33  33  33   2
198 portal 28  : cur   1  worst   1 (at 1193426141, 0d0h41m38s ago)   1   1   1   1
199 portal 7   : cur   1  worst   1 (at 1193426141, 0d0h41m38s ago)   1   0   1   1
200 portal 17  : cur   1  worst   1 (at 1193426177, 0d0h41m02s ago)   1   0   0   1
201 </screen>
202         <para>In this case, RPCs to portal 6, the <literal>OST_IO_PORTAL</literal> (see <literal>lustre/include/lustre/lustre_idl.h</literal>), shows the history of what the <literal>ost_io</literal> portal has reported as the service estimate.</para>
203         <para>Server statistic files also show the range of estimates in the normal min/max/sum/sumsq manner.</para>
204         <screen>cfs21:~# lctl get_param mdt.*.mdt.stats
205 ...
206 req_timeout               6 samples [sec] 1 10 15 105
207 ...
208 </screen>
209       </section>
210     </section>
211     <section remap="h3">
212       <title><indexterm><primary>proc</primary><secondary>LNET</secondary></indexterm><indexterm><primary>LNET</primary><secondary>proc</secondary></indexterm>LNET Information</title>
213       <para>This section describes<literal> /proc</literal> entries for LNET information.</para>
214       <para><literal> /proc/sys/lnet/peers </literal></para>
215       <para>Shows all NIDs known to this node and also gives information on the queue state.</para>
216       <screen># cat /proc/sys/lnet/peers
217 nid                        refs            state           max             rtr             min             tx              min             queue
218 0@lo                       1               ~rtr            0               0               0               0               0               0
219 192.168.10.35@tcp  1               ~rtr            8               8               8               8               6               0
220 192.168.10.36@tcp  1               ~rtr            8               8               8               8               6               0
221 192.168.10.37@tcp  1               ~rtr            8               8               8               8               6               0</screen>
222       <para>The fields are explained below:</para>
223       <informaltable frame="all">
224         <tgroup cols="2">
225           <colspec colname="c1" colwidth="50*"/>
226           <colspec colname="c2" colwidth="50*"/>
227           <thead>
228             <row>
229               <entry>
230                 <para><emphasis role="bold">Field</emphasis></para>
231               </entry>
232               <entry>
233                 <para><emphasis role="bold">Description</emphasis></para>
234               </entry>
235             </row>
236           </thead>
237           <tbody>
238             <row>
239               <entry>
240                 <para> 
241                         <literal>
242                     <replaceable>refs</replaceable>
243                   </literal>
244                   </para>
245               </entry>
246               <entry>
247                 <para>A reference count (principally used for debugging)</para>
248               </entry>
249             </row>
250             <row>
251               <entry>
252                 <para> 
253                         <literal>
254                     <replaceable>state</replaceable>
255                   </literal>
256                   </para>
257               </entry>
258               <entry>
259                 <para>Only valid to refer to routers. Possible values:</para>
260                 <itemizedlist>
261                   <listitem>
262                     <para>~ rtr (indicates this node is not a router)</para>
263                   </listitem>
264                   <listitem>
265                     <para>up/down (indicates this node is a router)</para>
266                   </listitem>
267                   <listitem>
268                     <para>auto_fail must be enabled</para>
269                   </listitem>
270                 </itemizedlist>
271               </entry>
272             </row>
273             <row>
274               <entry>
275                 <para> <literal> max </literal></para>
276               </entry>
277               <entry>
278                 <para>Maximum number of concurrent sends from this peer</para>
279               </entry>
280             </row>
281             <row>
282               <entry>
283                 <para> <literal> rtr </literal></para>
284               </entry>
285               <entry>
286                 <para>Routing buffer credits.</para>
287               </entry>
288             </row>
289             <row>
290               <entry>
291                 <para> <literal> min </literal></para>
292               </entry>
293               <entry>
294                 <para>Minimum routing buffer credits seen.</para>
295               </entry>
296             </row>
297             <row>
298               <entry>
299                 <para> <literal> tx </literal></para>
300               </entry>
301               <entry>
302                 <para>Send credits.</para>
303               </entry>
304             </row>
305             <row>
306               <entry>
307                 <para> <literal> min </literal></para>
308               </entry>
309               <entry>
310                 <para>Minimum send credits seen.</para>
311               </entry>
312             </row>
313             <row>
314               <entry>
315                 <para> <literal> queue </literal></para>
316               </entry>
317               <entry>
318                 <para>Total bytes in active/queued sends.</para>
319               </entry>
320             </row>
321           </tbody>
322         </tgroup>
323       </informaltable>
324       <para>Credits work like a semaphore. At start they are initialized to allow a certain number of operations (8 in this example). LNET keeps a track of the minimum value so that you can see how congested a resource was.</para>
325       <para>If <literal>rtr/tx</literal> is less than max, there are operations in progress. The number of operations is equal to <literal>rtr</literal> or <literal>tx</literal> subtracted from max.</para>
326       <para>If <literal>rtr/tx</literal> is greater that max, there are operations blocking.</para>
327       <para>LNET also limits concurrent sends and router buffers allocated to a single peer so that no peer can occupy all these resources.</para>
328       <para><literal> /proc/sys/lnet/nis </literal></para>
329       <screen># cat /proc/sys/lnet/nis
330 nid                                refs            peer            max             tx              min
331 0@lo                               3               0               0               0               0
332 192.168.10.34@tcp          4               8               256             256             252
333 </screen>
334       <para>Shows the current queue health on this node. The fields are explained below:</para>
335       <informaltable frame="all">
336         <tgroup cols="2">
337           <colspec colname="c1" colwidth="50*"/>
338           <colspec colname="c2" colwidth="50*"/>
339           <thead>
340             <row>
341               <entry>
342                 <para><emphasis role="bold">Field</emphasis></para>
343               </entry>
344               <entry>
345                 <para><emphasis role="bold">Description</emphasis></para>
346               </entry>
347             </row>
348           </thead>
349           <tbody>
350             <row>
351               <entry>
352                 <para> <literal> nid </literal></para>
353               </entry>
354               <entry>
355                 <para>Network interface</para>
356               </entry>
357             </row>
358             <row>
359               <entry>
360                 <para> <literal> refs </literal></para>
361               </entry>
362               <entry>
363                 <para>Internal reference counter</para>
364               </entry>
365             </row>
366             <row>
367               <entry>
368                 <para> <literal> peer </literal></para>
369               </entry>
370               <entry>
371                 <para>Number of peer-to-peer send credits on this NID. Credits are used to size buffer pools</para>
372               </entry>
373             </row>
374             <row>
375               <entry>
376                 <para> <literal> max </literal></para>
377               </entry>
378               <entry>
379                 <para>Total number of send credits on this NID.</para>
380               </entry>
381             </row>
382             <row>
383               <entry>
384                 <para> <literal> tx </literal></para>
385               </entry>
386               <entry>
387                 <para>Current number of send credits available on this NID.</para>
388               </entry>
389             </row>
390             <row>
391               <entry>
392                 <para> <literal> min </literal></para>
393               </entry>
394               <entry>
395                 <para>Lowest number of send credits available on this NID.</para>
396               </entry>
397             </row>
398             <row>
399               <entry>
400                 <para> <literal> queue </literal></para>
401               </entry>
402               <entry>
403                 <para>Total bytes in active/queued sends.</para>
404               </entry>
405             </row>
406           </tbody>
407         </tgroup>
408       </informaltable>
409       <para>Subtracting <literal>max</literal> - <literal>tx</literal> yields the number of sends currently active. A large or increasing number of active sends may indicate a problem.</para>
410       <screen># cat /proc/sys/lnet/nis
411 nid                                refs            peer            max             tx              min
412 0@lo                               2               0               0               0               0
413 10.67.73.173@tcp           4               8               256             256             253
414 </screen>
415     </section>
416     <section remap="h3">
417       <title><indexterm><primary>proc</primary><secondary>free space</secondary></indexterm>Free Space Distribution</title>
418       <para>Free-space stripe weighting, as set, gives a priority of &quot;0&quot; to free space (versus trying to place the stripes &quot;widely&quot; -- nicely distributed across OSSs and OSTs to maximize network balancing). To adjust this priority (as a percentage), use the <literal>qos_prio_free</literal> proc tunable:</para>
419       <screen>$ cat /proc/fs/lustre/lov/<replaceable>fsname</replaceable>-mdtlov/qos_prio_free</screen>
420       <para>Currently, the default is 90%. You can permanently set this value by running this command on the MGS:</para>
421       <screen>$ lctl conf_param <replaceable>fsname</replaceable>-MDT0000.lov.qos_prio_free=90</screen>
422       <para>Setting the priority to 100% means that OSS distribution does not count in the weighting, but the stripe assignment is still done via weighting. If OST 2 has twice as much free space as OST 1, it is twice as likely to be used, but it is NOT guaranteed to be used.</para>
423       <para>Also note that free-space stripe weighting does not activate until two OSTs are imbalanced by more than 20%. Until then, a faster round-robin stripe allocator is used. (The new round-robin order also maximizes network balancing.)</para>
424       <section remap="h4">
425         <title><indexterm><primary>proc</primary><secondary>striping</secondary></indexterm>Managing Stripe Allocation</title>
426         <para>The MDS uses two methods to manage stripe allocation and determine which OSTs to use for file object storage:</para>
427         <itemizedlist>
428           <listitem>
429             <para><emphasis role="bold">QOS</emphasis></para>
430             <para>Quality of Service (QOS) considers an OST&apos;s available blocks, speed, and the number of existing objects, etc. Using these criteria, the MDS selects OSTs with more free space more often than OSTs with less free space.</para>
431           </listitem>
432         </itemizedlist>
433         <itemizedlist>
434           <listitem>
435             <para><emphasis role="bold">RR</emphasis></para>
436             <para>Round-Robin (RR) allocates objects evenly across all OSTs. The RR stripe allocator is faster than QOS, and used often because it distributes space usage/load best in most situations, maximizing network balancing and improving performance.</para>
437           </listitem>
438         </itemizedlist>
439         <para>Whether QOS or RR is used depends on the setting of the <literal>qos_threshold_rr</literal> proc tunable. The <literal>qos_threshold_rr</literal> variable specifies a percentage threshold where the use of QOS or RR becomes more/less likely. The <literal>qos_threshold_rr</literal> tunable can be set as an integer, from 0 to 100, and results in this stripe allocation behavior:</para>
440         <itemizedlist>
441           <listitem>
442             <para> If <literal>qos_threshold_rr</literal> is set to 0, then QOS is always used</para>
443           </listitem>
444           <listitem>
445             <para> If <literal>qos_threshold_rr</literal> is set to 100, then RR is always used</para>
446           </listitem>
447           <listitem>
448             <para> The larger the <literal>qos_threshold_rr</literal> setting, the greater the possibility that RR is used instead of QOS</para>
449           </listitem>
450         </itemizedlist>
451       </section>
452     </section>
453   </section>
454   <section xml:id="dbdoclet.50438271_78950">
455       <title><indexterm><primary>proc</primary><secondary>I/O tunables</secondary></indexterm>Lustre I/O Tunables</title>
456     <para>The section describes I/O tunables.</para>
457     <para><literal> llite.<replaceable>fsname-instance</replaceable>/max_cache_mb</literal></para>
458     <screen>client# lctl get_param llite.lustre-ce63ca00.max_cached_mb
459 128</screen>
460     <para>This tunable is the maximum amount of inactive data cached by the client (default is 3/4 of RAM).</para>
461     <section remap="h3">
462       <title><indexterm><primary>proc</primary><secondary>RPC tunables</secondary></indexterm>Client I/O RPC Stream Tunables</title>
463       <para>The Lustre engine always attempts to pack an optimal amount of data into each I/O RPC and attempts to keep a consistent number of issued RPCs in progress at a time. Lustre exposes several tuning variables to adjust behavior according to network conditions and cluster size. Each OSC has its own tree of these tunables. For example:</para>
464       <screen>$ ls -d /proc/fs/lustre/osc/OSC_client_ost1_MNT_client_2 /localhost
465 /proc/fs/lustre/osc/OSC_uml0_ost1_MNT_localhost
466 /proc/fs/lustre/osc/OSC_uml0_ost2_MNT_localhost
467 /proc/fs/lustre/osc/OSC_uml0_ost3_MNT_localhost
468 $ ls /proc/fs/lustre/osc/OSC_uml0_ost1_MNT_localhost
469 blocksizefilesfree max_dirty_mb ost_server_uuid stats</screen>
470       <para>... and so on.</para>
471       <para>RPC stream tunables are described below.</para>
472       <para><literal> osc.<replaceable>osc_instance</replaceable>.max_dirty_mb </literal></para>
473       <para xml:id='lustreproc.maxdirtymb'>This tunable controls how many MBs of dirty data can be written and queued up in the OSC. POSIX file writes that are cached contribute to this count. When the limit is reached, additional writes stall until previously-cached writes are written to the server. This may be changed by writing a single ASCII integer to the file. Only values between 0 and 512 are allowable. If 0 is given, no writes are cached. Performance suffers noticeably unless you use large writes (1 MB or more).</para>
474       <para><literal> osc.<replaceable>osc_instance</replaceable>.cur_dirty_bytes </literal></para>
475       <para>This tunable is a read-only value that returns the current amount of bytes written and cached on this OSC.</para>
476       <para><literal> osc.<replaceable>osc_instance</replaceable>.max_pages_per_rpc </literal></para>
477       <para>This tunable is the maximum number of pages that will undergo I/O in a single RPC to the OST. The minimum is a single page and the maximum for this setting is platform dependent (256 for i386/x86_64, possibly less for ia64/PPC with larger <literal>PAGE_SIZE</literal>), though generally amounts to a total of 1 MB in the RPC.</para>
478       <para><literal> osc.<replaceable>osc_instance</replaceable>.max_rpcs_in_flight </literal></para>
479       <para>This tunable is the maximum number of concurrent RPCs in flight from an OSC to its OST. If the OSC tries to initiate an RPC but finds that it already has the same number of RPCs outstanding, it will wait to issue further RPCs until some complete. The minimum setting is 1 and maximum setting is 256. If you are looking to improve small file I/O performance, increase the <literal>max_rpcs_in_flight</literal> value.</para>
480       <para>To maximize performance, the value for <literal>max_dirty_mb</literal> is recommended to be 4 * <literal>max_pages_per_rpc</literal> * <literal>max_rpcs_in_flight</literal>.</para>
481       <note>
482         <para>The 
483             <literal>
484             <replaceable>osc_instance</replaceable>
485           </literal>
486            is typically <literal><replaceable>fsname</replaceable>-OST<replaceable>ost_index</replaceable>-osc-<replaceable>mountpoint_instance</replaceable></literal>. The <literal><replaceable>mountpoint_instance</replaceable></literal> is a unique value per mountpoint to allow associating osc, mdc, lov, lmv, and llite parameters for the same mountpoint. For <literal><replaceable>osc_instance</replaceable></literal> examples, refer to the sample command output.</para>
487       </note>
488     </section>
489     <section remap="h3">
490       <title><indexterm><primary>proc</primary><secondary>watching RPC</secondary></indexterm>Watching the Client RPC Stream</title>
491       <para>The same directory contains a <literal>rpc_stats</literal> file with a histogram showing the composition of previous RPCs. The histogram can be cleared by writing any value into the <literal>rpc_stats</literal> file.</para>
492       <screen># cat /proc/fs/lustre/osc/spfs-OST0000-osc-c45f9c00/rpc_stats
493 snapshot_time:                                     1174867307.156604 (secs.usecs)
494 read RPCs in flight:                               0
495 write RPCs in flight:                              0
496 pending write pages:                               0
497 pending read pages:                                0
498                    read                                    write
499 pages per rpc              rpcs    %       cum     %       |       rpcs    %       cum     %
500 1:                 0       0       0               |       0               0       0
501  
502                    read                                    write
503 rpcs in flight             rpcs    %       cum     %       |       rpcs    %       cum     %
504 0:                 0       0       0               |       0               0       0
505  
506                    read                                    write
507 offset                     rpcs    %       cum     %       |       rpcs    %       cum     %
508 0:                 0       0       0               |       0               0       0
509 </screen>
510       <para>Where:</para>
511       <informaltable frame="all">
512         <tgroup cols="2">
513           <colspec colname="c1" colwidth="50*"/>
514           <colspec colname="c2" colwidth="50*"/>
515           <thead>
516             <row>
517               <entry>
518                 <para><emphasis role="bold">Field</emphasis></para>
519               </entry>
520               <entry>
521                 <para><emphasis role="bold">Description</emphasis></para>
522               </entry>
523             </row>
524           </thead>
525           <tbody>
526             <row>
527               <entry>
528                 <para> <emphasis role="bold">{read,write} RPCs in flight</emphasis></para>
529               </entry>
530               <entry>
531                 <para>Number of read/write RPCs issued by the OSC, but not complete at the time of the snapshot. This value should always be less than or equal to max_rpcs_in_flight.</para>
532               </entry>
533             </row>
534             <row>
535               <entry>
536                 <para> <emphasis role="bold">pending {read,write} pages</emphasis></para>
537               </entry>
538               <entry>
539                 <para>Number of pending read/write pages that have been queued for I/O in the OSC.</para>
540               </entry>
541             </row>
542             <row>
543               <entry>
544                 <para> <emphasis role="bold">pages per RPC</emphasis></para>
545               </entry>
546               <entry>
547                 <para>When an RPC is sent, the number of pages it consists of is recorded (in order). A single page RPC increments the 0: row.</para>
548               </entry>
549             </row>
550             <row>
551               <entry>
552                 <para> <emphasis role="bold">RPCs in flight</emphasis></para>
553               </entry>
554               <entry>
555                 <para>When an RPC is sent, the number of other RPCs that are pending is recorded. When the first RPC is sent, the 0: row is incremented. If the first RPC is sent while another is pending, the 1: row is incremented and so on. As each RPC *completes*, the number of pending RPCs is not tabulated.</para>
556                 <para>This table is a good way to visualize the concurrency of the RPC stream. Ideally, you will see a large clump around the max_rpcs_in_flight value, which shows that the network is being kept busy.</para>
557               </entry>
558             </row>
559             <row>
560               <entry>
561                 <para> <emphasis role="bold">offset</emphasis></para>
562               </entry>
563               <entry>
564                 <para> </para>
565               </entry>
566             </row>
567           </tbody>
568         </tgroup>
569       </informaltable>
570     </section>
571     <section remap="h3">
572         <title><indexterm><primary>proc</primary><secondary>read/write survey</secondary></indexterm>Client Read-Write Offset Survey</title>
573       <para>The offset_stats parameter maintains statistics for occurrences where a series of read or write calls from a process did not access the next sequential location. The offset field is reset to 0 (zero) whenever a different file is read/written.</para>
574       <para>Read/write offset statistics are off, by default. The statistics can be activated by writing anything into the <literal>offset_stats</literal> file.</para>
575       <para>Example:</para>
576       <screen># cat /proc/fs/lustre/llite/lustre-f57dee00/rw_offset_stats
577 snapshot_time: 1155748884.591028 (secs.usecs)
578 R/W                PID             RANGE START             RANGE END               SMALLEST EXTENT         LARGEST EXTENT                          OFFSET
579 R          8385            0                       128                     128                     128                             0
580 R          8385            0                       224                     224                     224                             -128
581 W          8385            0                       250                     50                      100                             0
582 W          8385            100                     1110                    10                      500                             -150
583 W          8384            0                       5233                    5233                    5233                            0
584 R          8385            500                     600                     100                     100                             -610</screen>
585       <para>Where:</para>
586       <informaltable frame="all">
587         <tgroup cols="2">
588           <colspec colname="c1" colwidth="50*"/>
589           <colspec colname="c2" colwidth="50*"/>
590           <thead>
591             <row>
592               <entry>
593                 <para><emphasis role="bold">Field</emphasis></para>
594               </entry>
595               <entry>
596                 <para><emphasis role="bold">Description</emphasis></para>
597               </entry>
598             </row>
599           </thead>
600           <tbody>
601             <row>
602               <entry>
603                 <para> <literal> R/W </literal></para>
604               </entry>
605               <entry>
606                 <para>Whether the non-sequential call was a read or write</para>
607               </entry>
608             </row>
609             <row>
610               <entry>
611                 <para> <literal> PID </literal></para>
612               </entry>
613               <entry>
614                 <para>Process ID which made the read/write call.</para>
615               </entry>
616             </row>
617             <row>
618               <entry>
619                 <para> <literal> Range Start/Range End </literal></para>
620               </entry>
621               <entry>
622                 <para>Range in which the read/write calls were sequential.</para>
623               </entry>
624             </row>
625             <row>
626               <entry>
627                 <para> <literal> Smallest Extent </literal></para>
628               </entry>
629               <entry>
630                 <para>Smallest extent (single read/write) in the corresponding range.</para>
631               </entry>
632             </row>
633             <row>
634               <entry>
635                 <para> <literal> Largest Extent </literal></para>
636               </entry>
637               <entry>
638                 <para>Largest extent (single read/write) in the corresponding range.</para>
639               </entry>
640             </row>
641             <row>
642               <entry>
643                 <para> <literal> Offset </literal></para>
644               </entry>
645               <entry>
646                 <para>Difference from the previous range end to the current range start.</para>
647                 <para>For example, Smallest-Extent indicates that the writes in the range 100 to 1110 were sequential, with a minimum write of 10 and a maximum write of 500. This range was started with an offset of -150. That means this is the difference between the last entry&apos;s range-end and this entry&apos;s range-start for the same file.</para>
648                 <para>The <literal>rw_offset_stats</literal> file can be cleared by writing to it:</para>
649                 <screen>lctl set_param llite.*.rw_offset_stats=0</screen>
650               </entry>
651             </row>
652           </tbody>
653         </tgroup>
654       </informaltable>
655     </section>
656     <section xml:id="lustreproc.clientstats" remap="h3">
657         <title><indexterm><primary>proc</primary><secondary>client stats</secondary></indexterm>Client stats</title>
658       <para>The stats parameter maintains statistics of activity across the VFS interface of the Lustre file system. Only non-zero parameters are displayed in the file. This section of the manual covers the statistics that will accumulate during typical operation of a client.</para>
659       <para>Client statistics are enabled by default. The statistics can be cleared by echoing an empty string into the <literal>stats</literal> file or with the command: <literal>lctl set_param llite.*.stats=0</literal>. Statistics for an individual file system can be displayed, for example:</para>
660       <screen>client# lctl get_param llite.*.stats
661 snapshot_time             1308343279.169704 secs.usecs
662 dirty_pages_hits          14819716 samples [regs]
663 dirty_pages_misses        81473472 samples [regs]
664 read_bytes                36502963 samples [bytes] 1 26843582 55488794
665 write_bytes               22985001 samples [bytes] 0 125912 3379002
666 brw_read                  2279 samples [pages] 1 1 2270
667 ioctl                     186749 samples [regs]
668 open                      3304805 samples [regs]
669 close                     3331323 samples [regs]
670 seek                      48222475 samples [regs]
671 fsync                     963 samples [regs]
672 truncate                  9073 samples [regs]
673 setxattr                  19059 samples [regs]
674 getxattr                  61169 samples [regs]
675 </screen>
676 <note><para>Statistics for all mounted file systems can be discovered by issuing the lctl command: <literal>lctl get_param llite.*.stats</literal></para></note>
677       <informaltable frame="all">
678         <tgroup cols="2">
679           <colspec colname="c1" colwidth="3*"/>
680           <colspec colname="c2" colwidth="7*"/>
681           <thead>
682             <row>
683               <entry>
684                 <para><emphasis role="bold">Field</emphasis></para>
685               </entry>
686               <entry>
687                 <para><emphasis role="bold">Description</emphasis></para>
688               </entry>
689             </row>
690           </thead>
691           <tbody>
692             <row>
693               <entry>
694                 <para> <literal>snapshot_time</literal></para>
695               </entry>
696               <entry>
697                 <para>Unix epoch instant the stats file was read.</para>
698               </entry>
699             </row>
700             <row>
701               <entry>
702                 <para> <literal>dirty_page_hits</literal></para>
703               </entry>
704               <entry>
705                 <para>A count of the number of write operations that have been satisfied by the dirty page cache. See <xref linkend='lustreproc.maxdirtymb'/> for dirty cache behavior in Lustre.</para>
706               </entry>
707             </row>
708             <row>
709               <entry>
710                 <para> <literal>dirty_page_misses</literal></para>
711               </entry>
712               <entry>
713                 <para>A count of the number of write operations that were not satisfied by the dirty page cache.</para>
714               </entry>
715             </row>
716             <row>
717               <entry>
718                 <para> <literal>read_bytes</literal></para>
719               </entry>
720               <entry>
721                   <para>A count of the number of read operations that have occurred (samples). Three additional parameters are given:</para>
722                   <variablelist>
723                       <varlistentry>
724                           <term>min</term>
725                           <listitem><para>The minimum number of bytes read in a single request since the counter was reset.</para>
726                           </listitem>
727                       </varlistentry>
728                       <varlistentry>
729                           <term>max</term>
730                           <listitem><para>The maximum number of bytes read in a single request since the counter was reset.</para>
731                           </listitem>
732                       </varlistentry>
733                       <varlistentry>
734                           <term>sum</term>
735                           <listitem><para>The accumulated sum of bytes of all read requests since the counter was reset.</para>
736                           </listitem>
737                       </varlistentry>
738                   </variablelist>
739               </entry>
740             </row>
741             <row>
742               <entry>
743                 <para> <literal>write_bytes</literal></para>
744               </entry>
745               <entry>
746                   <para>A count of the number of write operations that have occurred (samples). Three additional parameters are given:</para>
747                   <variablelist>
748                       <varlistentry>
749                           <term>min</term>
750                           <listitem><para>The minimum number of bytes written in a single request since the counter was reset.</para>
751                           </listitem>
752                       </varlistentry>
753                       <varlistentry>
754                           <term>max</term>
755                           <listitem><para>The maximum number of bytes written in a single request since the counter was reset.</para>
756                           </listitem>
757                       </varlistentry>
758                       <varlistentry>
759                           <term>sum</term>
760                           <listitem><para>The accumulated sum of bytes of all write requests since the counter was reset.</para>
761                           </listitem>
762                       </varlistentry>
763                   </variablelist>
764               </entry>
765             </row>
766             <row>
767               <entry>
768                 <para> <literal>brw_read</literal></para>
769               </entry>
770               <entry>
771                   <para>A count of the number of pages that have been read.</para> <warning><para><literal>brw_</literal> stats are only tallied when the lloop device driver is present. lloop device is not currently supported.</para></warning><para>Three additional parameters are given:</para>
772                   <variablelist>
773                       <varlistentry>
774                           <term>min</term>
775                           <listitem><para>The minimum number of bytes read in a single brw read requests since the counter was reset.</para>
776                           </listitem>
777                       </varlistentry>
778                       <varlistentry>
779                           <term>max</term>
780                           <listitem><para>The maximum number of bytes read in a single brw read requests since the counter was reset.</para>
781                           </listitem>
782                       </varlistentry>
783                       <varlistentry>
784                           <term>sum</term>
785                           <listitem><para>The accumulated sum of bytes of all brw read requests since the counter was reset.</para>
786                           </listitem>
787                       </varlistentry>
788                   </variablelist>
789               </entry>
790             </row>
791             <row>
792               <entry>
793                 <para> <literal>ioctl</literal></para>
794               </entry>
795               <entry>
796                 <para>A count of the number of the combined file and directory ioctl operations.</para>
797               </entry>
798             </row>
799             <row>
800               <entry>
801                 <para> <literal>open</literal></para>
802               </entry>
803               <entry>
804                 <para>A count of the number of open operations that have succeeded.</para>
805               </entry>
806             </row>
807             <row>
808               <entry>
809                 <para> <literal>close</literal></para>
810               </entry>
811               <entry>
812                 <para>A count of the number of close operations that have succeeded.</para>
813               </entry>
814             </row>
815             <row>
816               <entry>
817                 <para> <literal>seek</literal></para>
818               </entry>
819               <entry>
820                   <para>A count of the number of times <literal>seek</literal> has been called.</para>
821               </entry>
822             </row>
823             <row>
824               <entry>
825                 <para> <literal>fsync</literal></para>
826               </entry>
827               <entry>
828                   <para>A count of the number of times <literal>fsync</literal> has been called.</para>
829               </entry>
830             </row>
831             <row>
832               <entry>
833                 <para> <literal>truncate</literal></para>
834               </entry>
835               <entry>
836                 <para>A count of the total number of calls to both locked and lockless truncate.</para>
837               </entry>
838             </row>
839             <row>
840               <entry>
841                 <para> <literal>setxattr</literal></para>
842               </entry>
843               <entry>
844                   <para>A count of the number of times <literal>ll_setxattr</literal> has been called.</para>
845               </entry>
846             </row>
847             <row>
848               <entry>
849                 <para> <literal>getxattr</literal></para>
850               </entry>
851               <entry>
852                   <para>A count of the number of times <literal>ll_getxattr</literal> has been called.</para>
853               </entry>
854             </row>
855           </tbody>
856         </tgroup>
857       </informaltable>
858     </section>
859     <section remap="h3">
860         <title><indexterm><primary>proc</primary><secondary>read/write survey</secondary></indexterm>Client Read-Write Extents Survey</title>
861       <para><emphasis role="bold">Client-Based I/O Extent Size Survey</emphasis></para>
862       <para>The <literal>rw_extent_stats</literal> histogram in the <literal>llite</literal> directory shows you the statistics for the sizes of the read-write I/O extents. This file does not maintain the per-process statistics.</para>
863       <para>Example:</para>
864       <screen>client# lctl get_param llite.testfs-*.extents_stats
865 snapshot_time:                     1213828728.348516 (secs.usecs)
866                            read            |               write
867 extents                    calls   %       cum%    |       calls   %       cum%
868  
869 0K - 4K :          0       0       0       |       2       2       2
870 4K - 8K :          0       0       0       |       0       0       2
871 8K - 16K :         0       0       0       |       0       0       2
872 16K - 32K :                0       0       0       |       20      23      26
873 32K - 64K :                0       0       0       |       0       0       26
874 64K - 128K :               0       0       0       |       51      60      86
875 128K - 256K :              0       0       0       |       0       0       86
876 256K - 512K :              0       0       0       |       0       0       86
877 512K - 1024K :             0       0       0       |       0       0       86
878 1M - 2M :          0       0       0       |       11      13      100</screen>
879       <para>The file can be cleared by issuing the following command:</para>
880       <screen>client# lctl set_param llite.testfs-*.extents_stats=0</screen>
881       <para><emphasis role="bold">Per-Process Client I/O Statistics</emphasis></para>
882       <para>The <literal>extents_stats_per_process</literal> file maintains the I/O extent size statistics on a per-process basis. So you can track the per-process statistics for the last <literal>MAX_PER_PROCESS_HIST</literal> processes.</para>
883       <para>Example:</para>
884       <screen>lctl get_param llite.testfs-*.extents_stats_per_process
885 snapshot_time:                     1213828762.204440 (secs.usecs)
886                            read            |               write
887 extents                    calls   %       cum%    |       calls   %       cum%
888  
889 PID: 11488
890    0K - 4K :       0       0        0      |       0       0       0
891    4K - 8K :       0       0        0      |       0       0       0
892    8K - 16K :      0       0        0      |       0       0       0
893    16K - 32K :     0       0        0      |       0       0       0
894    32K - 64K :     0       0        0      |       0       0       0
895    64K - 128K :    0       0        0      |       0       0       0
896    128K - 256K :   0       0        0      |       0       0       0
897    256K - 512K :   0       0        0      |       0       0       0
898    512K - 1024K :  0       0        0      |       0       0       0
899    1M - 2M :       0       0        0      |       10      100     100
900  
901 PID: 11491
902    0K - 4K :       0       0        0      |       0       0       0
903    4K - 8K :       0       0        0      |       0       0       0
904    8K - 16K :      0       0        0      |       0       0       0
905    16K - 32K :     0       0        0      |       20      100     100
906    
907 PID: 11424
908    0K - 4K :       0       0        0      |       0       0       0
909    4K - 8K :       0       0        0      |       0       0       0
910    8K - 16K :      0       0        0      |       0       0       0
911    16K - 32K :     0       0        0      |       0       0       0
912    32K - 64K :     0       0        0      |       0       0       0
913    64K - 128K :    0       0        0      |       16      100     100
914  
915 PID: 11426
916    0K - 4K :       0       0        0      |       1       100     100
917  
918 PID: 11429
919    0K - 4K :       0       0        0      |       1       100     100
920  
921 </screen>
922     </section>
923     <section xml:id="dbdoclet.50438271_55057">
924         <title><indexterm><primary>proc</primary><secondary>block I/O</secondary></indexterm>Watching the OST Block I/O Stream</title>
925       <para>Similarly, there is a <literal>brw_stats</literal> histogram in the obdfilter directory which shows you the statistics for number of I/O requests sent to the disk, their size and whether they are contiguous on the disk or not.</para>
926       <screen>oss# lctl get_param obdfilter.testfs-OST0000.brw_stats 
927 snapshot_time:                     1174875636.764630 (secs:usecs)
928                            read                            write
929 pages per brw              brws    %       cum %   |       rpcs    %       cum %
930 1:                 0       0       0       |       0       0       0
931                            read                                    write
932 discont pages              rpcs    %       cum %   |       rpcs    %       cum %
933 1:                 0       0       0       |       0       0       0
934                            read                                    write
935 discont blocks             rpcs    %       cum %   |       rpcs    %       cum %
936 1:                 0       0       0       |       0       0       0
937                            read                                    write
938 dio frags          rpcs    %       cum %   |       rpcs    %       cum %
939 1:                 0       0       0       |       0       0       0
940                            read                                    write
941 disk ios in flight rpcs    %       cum %   |       rpcs    %       cum %
942 1:                 0       0       0       |       0       0       0
943                            read                                    write
944 io time (1/1000s)  rpcs    %       cum %   |       rpcs    %       cum %
945 1:                 0       0       0       |       0       0       0
946                            read                                    write
947 disk io size               rpcs    %       cum %   |       rpcs    %       cum %
948 1:                 0       0       0       |       0       0       0
949                            read                                    write
950 </screen>
951       <para>The fields are explained below:</para>
952       <informaltable frame="all">
953         <tgroup cols="2">
954           <colspec colname="c1" colwidth="50*"/>
955           <colspec colname="c2" colwidth="50*"/>
956           <thead>
957             <row>
958               <entry>
959                 <para><emphasis role="bold">Field</emphasis></para>
960               </entry>
961               <entry>
962                 <para><emphasis role="bold">Description</emphasis></para>
963               </entry>
964             </row>
965           </thead>
966           <tbody>
967             <row>
968               <entry>
969                 <para> <literal> pages per brw </literal></para>
970               </entry>
971               <entry>
972                 <para>Number of pages per RPC request, which should match aggregate client <literal>rpc_stats</literal>.</para>
973               </entry>
974             </row>
975             <row>
976               <entry>
977                 <para> <literal> discont pages </literal></para>
978               </entry>
979               <entry>
980                 <para>Number of discontinuities in the logical file offset of each page in a single RPC.</para>
981               </entry>
982             </row>
983             <row>
984               <entry>
985                 <para> <literal> discont blocks </literal></para>
986               </entry>
987               <entry>
988                 <para>Number of discontinuities in the physical block allocation in the file system for a single RPC.</para>
989               </entry>
990             </row>
991           </tbody>
992         </tgroup>
993       </informaltable>
994       <para>For each Lustre service, the following information is provided:</para>
995       <itemizedlist>
996         <listitem>
997           <para>Number of requests</para>
998         </listitem>
999         <listitem>
1000           <para>Request wait time (avg, min, max and std dev)</para>
1001         </listitem>
1002         <listitem>
1003           <para>Service idle time (% of elapsed time)</para>
1004         </listitem>
1005       </itemizedlist>
1006       <para>Additionally, data on each Lustre service is provided by service type:</para>
1007       <itemizedlist>
1008         <listitem>
1009           <para>Number of requests of this type</para>
1010         </listitem>
1011         <listitem>
1012           <para>Request service time (avg, min, max and std dev)</para>
1013         </listitem>
1014       </itemizedlist>
1015     </section>
1016     <section remap="h3">
1017       <title><indexterm><primary>proc</primary><secondary>readahead</secondary></indexterm>Using File Readahead and Directory Statahead</title>
1018       <para>Lustre 1.6.5.1 introduced file readahead and directory statahead functionality that read data into memory in anticipation of a process actually requesting the data. File readahead functionality reads file content data into memory. Directory statahead functionality reads metadata into memory. When readahead and/or statahead work well, a data-consuming process finds that the information it needs is available when requested, and it is unnecessary to wait for network I/O.</para>
1019       <para>Since Lustre 2.2.0, the directory statahead feature has been improved to enhance directory traversal performance. The improvements have concentrated on two main issues:</para>
1020       <orderedlist>
1021         <listitem>
1022           <para>A race condition between statahead thread and other VFS operations while processing asynchronous getattr RPC replies.</para>
1023         </listitem>
1024         <listitem>
1025           <para>There is no file size/block attributes pre-fetching and the traversing thread has to send synchronous glimpse size RPCs to OST(s).</para>
1026         </listitem>
1027       </orderedlist>
1028       <para>The first issue is resolved by using statahead local dcache, and the second one is resolved by using asynchronous glimpse lock (AGL) RPCs for pre-fetching file size/block attributes from OST(s).</para>
1029       <section remap="h4">
1030         <title>Tuning File Readahead</title>
1031         <para>File readahead is triggered when two or more sequential reads by an application fail to be satisfied by the Linux buffer cache. The size of the initial readahead is 1 MB. Additional readaheads grow linearly, and increment until the readahead cache on the client is full at 40 MB.</para>
1032         <para><literal> llite.<replaceable>fsname-instance</replaceable>.max_read_ahead_mb </literal></para>
1033         <para>This tunable controls the maximum amount of data readahead on a file. Files are read ahead in RPC-sized chunks (1 MB or the size of read() call, if larger) after the second sequential read on a file descriptor. Random reads are done at the size of the read() call only (no readahead). Reads to non-contiguous regions of the file reset the readahead algorithm, and readahead is not triggered again until there are sequential reads again. To disable readahead, set this tunable to 0. The default value is 40 MB.</para>
1034         <para><literal> llite.<replaceable>fsname-instance</replaceable>.max_read_ahead_whole_mb </literal></para>
1035         <para>This tunable controls the maximum size of a file that is read in its entirety, regardless of the size of the <literal>read()</literal>.</para>
1036       </section>
1037       <section remap="h4">
1038         <title>Tuning Directory Statahead and AGL</title>
1039         <para>Many system commands, like <literal>ls â€“l</literal>, <literal>du</literal>, <literal>find</literal>, etc., will traverse directory sequentially. To make these commands run efficiently, the directory statahead and AGL (asynchronous glimpse lock) can be enabled to improve the performance of traversing.</para>
1040         <para><literal> /proc/fs/lustre/llite/*/statahead_max </literal></para>
1041         <para>This proc interface controls whether directory statahead is enabled and the maximum statahead windows size (which means how many files can be pre-fetched by the statahead thread). By default, statahead is enabled and the value of <literal>statahead_max</literal> is 32.</para>
1042         <para>To disable statahead, run:</para>
1043         <screen>lctl set_param llite.*.statahead_max=0</screen>
1044         <para>To set the maximum statahead windows size (n), run:</para>
1045         <screen>lctl set_param llite.*.statahead_max=n</screen>
1046         <para>The maximum value of n is 8192.</para>
1047         <para>The AGL can be controlled as follows:</para>
1048         <screen>lctl set_param llite.*.statahead_agl=n</screen>
1049         <para>If &quot;n&quot; is 0, then the AGL is disabled, else the AGL is enabled.</para>
1050         <para><literal> /proc/fs/lustre/llite/*/statahead_stats </literal></para>
1051         <para>This is a read-only interface that indicates the current statahead and AGL status.</para>
1052         <note>
1053           <para>The AGL is affected by statahead because the inodes processed by AGL are built by the statahead thread, which means the statahead thread is the input of AGL pipeline. So if statahead is disabled, then the AGL is disabled by force.</para>
1054         </note>
1055       </section>
1056     </section>
1057     <section remap="h3">
1058       <title><indexterm><primary>proc</primary><secondary>read cache</secondary></indexterm>OSS Read Cache</title>
1059       <para>The OSS read cache feature provides read-only caching of data on an OSS. This functionality uses the regular Linux page cache to store the data. Just like caching from a regular filesystem in Linux, OSS read cache uses as much physical memory as is allocated.</para>
1060       <para>OSS read cache improves Lustre performance in these situations:</para>
1061       <itemizedlist>
1062         <listitem>
1063           <para>Many clients are accessing the same data set (as in HPC applications and when diskless clients boot from Lustre)</para>
1064         </listitem>
1065         <listitem>
1066           <para>One client is storing data while another client is reading it (essentially exchanging data via the OST)</para>
1067         </listitem>
1068         <listitem>
1069           <para>A client has very limited caching of its own</para>
1070         </listitem>
1071       </itemizedlist>
1072       <para>OSS read cache offers these benefits:</para>
1073       <itemizedlist>
1074         <listitem>
1075           <para>Allows OSTs to cache read data more frequently</para>
1076         </listitem>
1077         <listitem>
1078           <para>Improves repeated reads to match network speeds instead of disk speeds</para>
1079         </listitem>
1080         <listitem>
1081           <para>Provides the building blocks for OST write cache (small-write aggregation)</para>
1082         </listitem>
1083       </itemizedlist>
1084       <section remap="h4">
1085         <title>Using OSS Read Cache</title>
1086         <para>OSS read cache is implemented on the OSS, and does not require any special support on the client side. Since OSS read cache uses the memory available in the Linux page cache, you should use I/O patterns to determine the appropriate amount of memory for the cache; if the data is mostly reads, then more cache is required than for writes.</para>
1087         <para>OSS read cache is enabled, by default, and managed by the following tunables:</para>
1088         <itemizedlist>
1089           <listitem>
1090             <para><literal>read_cache_enable</literal>  controls whether data read from disk during a read request is kept in memory and available for later read requests for the same data, without having to re-read it from disk. By default, read cache is enabled (<literal>read_cache_enable = 1</literal>).</para>
1091           </listitem>
1092         </itemizedlist>
1093         <para>When the OSS receives a read request from a client, it reads data from disk into its memory and sends the data as a reply to the requests. If read cache is enabled, this data stays in memory after the client&apos;s request is finished, and the OSS skips reading data from disk when subsequent read requests for the same are received. The read cache is managed by the Linux kernel globally across all OSTs on that OSS, and the least recently used cache pages will be dropped from memory when the amount of free memory is running low.</para>
1094         <para>If read cache is disabled (<literal>read_cache_enable = 0</literal>), then the OSS will discard the data after the client&apos;s read requests are serviced and, for subsequent read requests, the OSS must read the data from disk.</para>
1095         <para>To disable read cache on all OSTs of an OSS, run:</para>
1096         <screen>root@oss1# lctl set_param obdfilter.*.read_cache_enable=0</screen>
1097         <para>To re-enable read cache on one OST, run:</para>
1098         <screen>root@oss1# lctl set_param obdfilter.{OST_name}.read_cache_enable=1</screen>
1099         <para>To check if read cache is enabled on all OSTs on an OSS, run:</para>
1100         <screen>root@oss1# lctl get_param obdfilter.*.read_cache_enable</screen>
1101         <itemizedlist>
1102           <listitem>
1103             <para><literal>writethrough_cache_enable</literal>  controls whether data sent to the OSS as a write request is kept in the read cache and available for later reads, or if it is discarded from cache when the write is completed. By default, writethrough cache is enabled (<literal>writethrough_cache_enable = 1</literal>).</para>
1104           </listitem>
1105         </itemizedlist>
1106         <para>When the OSS receives write requests from a client, it receives data from the client into its memory and writes the data to disk. If writethrough cache is enabled, this data stays in memory after the write request is completed, allowing the OSS to skip reading this data from disk if a later read request, or partial-page write request, for the same data is received.</para>
1107         <para>If writethrough cache is disabled (<literal>writethrough_cache_enabled = 0</literal>), then the OSS discards the data after the client&apos;s write request is completed, and for subsequent read request, or partial-page write request, the OSS must re-read the data from disk.</para>
1108         <para>Enabling writethrough cache is advisable if clients are doing small or unaligned writes that would cause partial-page updates, or if the files written by one node are immediately being accessed by other nodes. Some examples where this might be useful include producer-consumer I/O models or shared-file writes with a different node doing I/O not aligned on 4096-byte boundaries. Disabling writethrough cache is advisable in the case where files are mostly written to the file system but are not re-read within a short time period, or files are only written and re-read by the same node, regardless of whether the I/O is aligned or not.</para>
1109         <para>To disable writethrough cache on all OSTs of an OSS, run:</para>
1110         <screen>root@oss1# lctl set_param obdfilter.*.writethrough_cache_enable=0</screen>
1111         <para>To re-enable writethrough cache on one OST, run:</para>
1112         <screen>root@oss1# lctl set_param \
1113 obdfilter.{OST_name}.writethrough_cache_enable=1</screen>
1114         <para>To check if writethrough cache is</para>
1115         <screen>root@oss1# lctl set_param obdfilter.*.writethrough_cache_enable=1</screen>
1116         <itemizedlist>
1117           <listitem>
1118             <para><literal>readcache_max_filesize</literal>  controls the maximum size of a file that both the read cache and writethrough cache will try to keep in memory. Files larger than <literal>readcache_max_filesize</literal> will not be kept in cache for either reads or writes.</para>
1119           </listitem>
1120         </itemizedlist>
1121         <para>This can be very useful for workloads where relatively small files are repeatedly accessed by many clients, such as job startup files, executables, log files, etc., but large files are read or written only once. By not putting the larger files into the cache, it is much more likely that more of the smaller files will remain in cache for a longer time.</para>
1122         <para>When setting <literal>readcache_max_filesize</literal>, the input value can be specified in bytes, or can have a suffix to indicate other binary units such as <emphasis role="bold">K</emphasis>ilobytes, <emphasis role="bold">M</emphasis>egabytes, <emphasis role="bold">G</emphasis>igabytes, <emphasis role="bold">T</emphasis>erabytes, or <emphasis role="bold">P</emphasis>etabytes.</para>
1123         <para>To limit the maximum cached file size to 32MB on all OSTs of an OSS, run:</para>
1124         <screen>root@oss1# lctl set_param obdfilter.*.readcache_max_filesize=32M</screen>
1125         <para>To disable the maximum cached file size on an OST, run:</para>
1126         <screen>root@oss1# lctl set_param \
1127 obdfilter.{OST_name}.readcache_max_filesize=-1</screen>
1128         <para>To check the current maximum cached file size on all OSTs of an OSS, run:</para>
1129         <screen>root@oss1# lctl get_param obdfilter.*.readcache_max_filesize</screen>
1130       </section>
1131     </section>
1132     <section remap="h3">
1133       <title><indexterm><primary>proc</primary><secondary>OSS journal</secondary></indexterm>OSS Asynchronous Journal Commit</title>
1134       <para>The OSS asynchronous journal commit feature synchronously writes data to disk without forcing a journal flush. This reduces the number of seeks and significantly improves performance on some hardware.</para>
1135       <note>
1136         <para>Asynchronous journal commit cannot work with O_DIRECT writes, a journal flush is still forced.</para>
1137       </note>
1138       <para>When asynchronous journal commit is enabled, client nodes keep data in the page cache (a page reference). Lustre clients monitor the last committed transaction number (transno) in messages sent from the OSS to the clients. When a client sees that the last committed transno reported by the OSS is at least the bulk write transno, it releases the reference on the corresponding pages. To avoid page references being held for too long on clients after a bulk write, a 7 second ping request is scheduled (jbd commit time is 5 seconds) after the bulk write reply is received, so the OSS has an opportunity to report the last committed transno.</para>
1139       <para>If the OSS crashes before the journal commit occurs, then the intermediate data is lost. However, new OSS recovery functionality (introduced in the asynchronous journal commit feature), causes clients to replay their write requests and compensate for the missing disk updates by restoring the state of the file system.</para>
1140       <para>To enable asynchronous journal commit, set the <literal>sync_journal parameter</literal> to zero (<literal>sync_journal=0</literal>):</para>
1141       <screen>$ lctl set_param obdfilter.*.sync_journal=0 
1142 obdfilter.lol-OST0001.sync_journal=0</screen>
1143       <para>By default, <literal>sync_journal</literal> is disabled (<literal>sync_journal=1</literal>), which forces a journal flush after every bulk write.</para>
1144       <para>When asynchronous journal commit is used, clients keep a page reference until the journal transaction commits. This can cause problems when a client receives a blocking callback, because pages need to be removed from the page cache, but they cannot be removed because of the extra page reference.</para>
1145       <para>This problem is solved by forcing a journal flush on lock cancellation. When this happens, the client is granted the metadata blocks that have hit the disk, and it can safely release the page reference before processing the blocking callback. The parameter which controls this action is <literal>sync_on_lock_cancel</literal>, which can be set to the following values:</para>
1146       <itemizedlist>
1147         <listitem>
1148           <para><literal>always</literal>: Always force a journal flush on lock cancellation</para>
1149         </listitem>
1150         <listitem>
1151           <para><literal>blocking</literal>: Force a journal flush only when the local cancellation is due to a blocking callback</para>
1152         </listitem>
1153         <listitem>
1154           <para><literal>never</literal>: Do not force any journal flush</para>
1155         </listitem>
1156       </itemizedlist>
1157       <para>Here is an example of <literal>sync_on_lock_cancel</literal> being set not to force a journal flush:</para>
1158       <screen>$ lctl get_param obdfilter.*.sync_on_lock_cancel
1159 obdfilter.lol-OST0001.sync_on_lock_cancel=never</screen>
1160       <para>By default, <literal>sync_on_lock_cancel</literal> is set to never, because asynchronous journal commit is disabled by default.</para>
1161       <para>When asynchronous journal commit is enabled (<literal>sync_journal=0</literal>), <literal>sync_on_lock_cancel</literal> is automatically set to always, if it was previously set to never.</para>
1162       <para>Similarly, when asynchronous journal commit is disabled, (<literal>sync_journal=1</literal>), <literal>sync_on_lock_cancel</literal> is enforced to never.</para>
1163     </section>
1164     <section remap="h3">
1165       <title><indexterm><primary>proc</primary><secondary>mballoc history</secondary></indexterm><literal>mballoc</literal> History</title>
1166       <para><literal> /proc/fs/ldiskfs/sda/mb_history </literal></para>
1167       <para>Multi-Block-Allocate (<literal>mballoc</literal>), enables Lustre to ask <literal>ldiskfs</literal> to allocate multiple blocks with a single request to the block allocator. Typically, an <literal>ldiskfs</literal> file system allocates only one block per time. Each <literal>mballoc</literal>-enabled partition has this file. This is sample output:</para>
1168       <screen>pid  inode   goal            result          found   grps    cr      \   merge   tail    broken
1169 2838       139267  17/12288/1      17/12288/1      1       0       0       \   M       1       8192
1170 2838       139267  17/12289/1      17/12289/1      1       0       0       \   M       0       0
1171 2838       139267  17/12290/1      17/12290/1      1       0       0       \   M       1       2
1172 2838       24577   3/12288/1       3/12288/1       1       0       0       \   M       1       8192
1173 2838       24578   3/12288/1       3/771/1         1       1       1       \           0       0
1174 2838       32769   4/12288/1       4/12288/1       1       0       0       \   M       1       8192
1175 2838       32770   4/12288/1       4/12289/1       13      1       1       \           0       0
1176 2838       32771   4/12288/1       5/771/1         26      2       1       \           0       0
1177 2838       32772   4/12288/1       5/896/1         31      2       1       \           1       128
1178 2838       32773   4/12288/1       5/897/1         31      2       1       \           0       0
1179 2828       32774   4/12288/1       5/898/1         31      2       1       \           1       2
1180 2838       32775   4/12288/1       5/899/1         31      2       1       \           0       0
1181 2838       32776   4/12288/1       5/900/1         31      2       1       \           1       4
1182 2838       32777   4/12288/1       5/901/1         31      2       1       \           0       0
1183 2838       32778   4/12288/1       5/902/1         31      2       1       \           1       2</screen>
1184       <para>The parameters are described below:</para>
1185       <informaltable frame="all">
1186         <tgroup cols="2">
1187           <colspec colname="c1" colwidth="50*"/>
1188           <colspec colname="c2" colwidth="50*"/>
1189           <thead>
1190             <row>
1191               <entry>
1192                 <para><emphasis role="bold">Parameter</emphasis></para>
1193               </entry>
1194               <entry>
1195                 <para><emphasis role="bold">Description</emphasis></para>
1196               </entry>
1197             </row>
1198           </thead>
1199           <tbody>
1200             <row>
1201               <entry>
1202                 <para> <emphasis role="bold">
1203                     <literal>pid</literal>
1204                   </emphasis></para>
1205               </entry>
1206               <entry>
1207                 <para>Process that made the allocation.</para>
1208               </entry>
1209             </row>
1210             <row>
1211               <entry>
1212                 <para> <emphasis role="bold">
1213                     <literal>inode</literal>
1214                   </emphasis></para>
1215               </entry>
1216               <entry>
1217                 <para>inode number allocated blocks</para>
1218               </entry>
1219             </row>
1220             <row>
1221               <entry>
1222                 <para> <emphasis role="bold">
1223                     <literal>goal</literal>
1224                   </emphasis></para>
1225               </entry>
1226               <entry>
1227                 <para>Initial request that came to <literal>mballoc</literal> (group/block-in-group/number-of-blocks)</para>
1228               </entry>
1229             </row>
1230             <row>
1231               <entry>
1232                 <para> <emphasis role="bold">
1233                     <literal>result</literal>
1234                   </emphasis></para>
1235               </entry>
1236               <entry>
1237                 <para>What <literal>mballoc</literal> actually found for this request.</para>
1238               </entry>
1239             </row>
1240             <row>
1241               <entry>
1242                 <para> <emphasis role="bold">
1243                     <literal>found</literal>
1244                   </emphasis></para>
1245               </entry>
1246               <entry>
1247                 <para>Number of free chunks <literal>mballoc</literal> found and measured before the final decision.</para>
1248               </entry>
1249             </row>
1250             <row>
1251               <entry>
1252                 <para> <emphasis role="bold">
1253                     <literal>grps</literal>
1254                   </emphasis></para>
1255               </entry>
1256               <entry>
1257                 <para>Number of groups <literal>mballoc</literal> scanned to satisfy the request.</para>
1258               </entry>
1259             </row>
1260             <row>
1261               <entry>
1262                 <para> <emphasis role="bold">
1263                     <literal>cr</literal>
1264                   </emphasis></para>
1265               </entry>
1266               <entry>
1267                 <para>Stage at which <literal>mballoc</literal> found the result:</para>
1268                 <para><emphasis role="bold">0</emphasis> - best in terms of resource allocation. The request was 1MB or larger and was satisfied directly via the kernel buddy allocator.</para>
1269                 <para><emphasis role="bold">1</emphasis> - regular stage (good at resource consumption)</para>
1270                 <para><emphasis role="bold">2</emphasis> - fs is quite fragmented (not that bad at resource consumption)</para>
1271                 <para><emphasis role="bold">3</emphasis> - fs is very fragmented (worst at resource consumption)</para>
1272               </entry>
1273             </row>
1274             <row>
1275               <entry>
1276                 <para> <emphasis role="bold">
1277                     <literal>queue</literal>
1278                   </emphasis></para>
1279               </entry>
1280               <entry>
1281                 <para>Total bytes in active/queued sends.</para>
1282               </entry>
1283             </row>
1284             <row>
1285               <entry>
1286                 <para> <emphasis role="bold">
1287                     <literal>merge</literal>
1288                   </emphasis></para>
1289               </entry>
1290               <entry>
1291                 <para>Whether the request hit the goal. This is good as extents code can now merge new blocks to existing extent, eliminating the need for extents tree growth.</para>
1292               </entry>
1293             </row>
1294             <row>
1295               <entry>
1296                 <para> <emphasis role="bold">
1297                     <literal>tail</literal>
1298                   </emphasis></para>
1299               </entry>
1300               <entry>
1301                 <para>Number of blocks left free after the allocation breaks large free chunks.</para>
1302               </entry>
1303             </row>
1304             <row>
1305               <entry>
1306                 <para> <emphasis role="bold">
1307                     <literal>broken</literal>
1308                   </emphasis></para>
1309               </entry>
1310               <entry>
1311                 <para>How large the broken chunk was.</para>
1312               </entry>
1313             </row>
1314           </tbody>
1315         </tgroup>
1316       </informaltable>
1317       <para>Most users are probably interested in found/cr. If cr is 0 1 and found is less than 100, then <literal>mballoc</literal> is doing quite well.</para>
1318       <para>Also, number-of-blocks-in-request (third number in the goal triple) can tell the number of blocks requested by the <literal>obdfilter</literal>. If the <literal>obdfilter</literal> is doing a lot of small requests (just few blocks), then either the client is processing input/output to a lot of small files, or something may be wrong with the client (because it is better if client sends large input/output requests). This can be investigated with the OSC <literal>rpc_stats</literal> or OST <literal>brw_stats</literal> mentioned above.</para>
1319       <para>Number of groups scanned (<literal>grps</literal> column) should be small. If it reaches a few dozen often, then either your disk file system is pretty fragmented or <literal>mballoc</literal> is doing something wrong in the group selection part.</para>
1320     </section>
1321     <section remap="h3">
1322       <title><indexterm><primary>proc</primary><secondary>mballoc tunables</secondary></indexterm><literal>mballoc</literal> Tunables</title>
1323       <para>Lustre ldiskfs includes a multi-block allocation for ldiskfs to improve the efficiency of space allocation in the OST storage.  Multi-block allocation adds the following features:</para>
1324       <itemizedlist>
1325         <listitem>
1326           <para> Pre-allocation for single files (helps to resist fragmentation)</para>
1327         </listitem>
1328         <listitem>
1329           <para> Pre-allocation for a group of files (helps to pack small files into large, contiguous chunks)</para>
1330         </listitem>
1331         <listitem>
1332           <para> Stream allocation (helps to decrease the seek rate)</para>
1333         </listitem>
1334       </itemizedlist>
1335       <para>The following <literal>mballoc</literal> tunables are available:</para>
1336       <informaltable frame="all">
1337         <tgroup cols="2">
1338           <colspec colname="c1" colwidth="50*"/>
1339           <colspec colname="c2" colwidth="50*"/>
1340           <thead>
1341             <row>
1342               <entry>
1343                 <para><emphasis role="bold">Field</emphasis></para>
1344               </entry>
1345               <entry>
1346                 <para><emphasis role="bold">Description</emphasis></para>
1347               </entry>
1348             </row>
1349           </thead>
1350           <tbody>
1351             <row>
1352               <entry>
1353                 <para> <literal>mb_max_to_scan</literal></para>
1354               </entry>
1355               <entry>
1356                 <para>Maximum number of free chunks that <literal>mballoc</literal> finds before a final decision to avoid livelock.</para>
1357               </entry>
1358             </row>
1359             <row>
1360               <entry>
1361                 <para> <literal>mb_min_to_scan</literal></para>
1362               </entry>
1363               <entry>
1364                 <para>Minimum number of free chunks that <literal>mballoc</literal> searches before picking the best chunk for allocation. This is useful for a very small request, to resist fragmentation of big free chunks.</para>
1365               </entry>
1366             </row>
1367             <row>
1368               <entry>
1369                 <para> <literal>mb_order2_req</literal></para>
1370               </entry>
1371               <entry>
1372                 <para>For requests equal to 2^N (where N &gt;= <literal>order2_req</literal>), a very fast search via buddy structures is used.</para>
1373               </entry>
1374             </row>
1375             <row>
1376               <entry>
1377                 <para> <literal>mb_small_req</literal></para>
1378               </entry>
1379               <entry morerows="1">
1380                 <para>All requests are divided into 3 categories:</para>
1381                 <para>&lt; small_req (packed together to form large, aggregated requests)</para>
1382                 <para>&lt; large_req (allocated mostly in linearly)</para>
1383                 <para>&gt; large_req (very large requests so the arm seek does not matter)</para>
1384                 <para>The idea is that we try to pack small requests to form large requests, and then place all large requests (including compound from the small ones) close to one another, causing as few arm seeks as possible.</para>
1385               </entry>
1386             </row>
1387             <row>
1388               <entry>
1389                 <para> <literal>mb_large_req</literal></para>
1390               </entry>
1391             </row>
1392             <row>
1393               <entry>
1394                 <para> <literal>mb_prealloc_table</literal></para>
1395               </entry>
1396               <entry>
1397                 <para>The amount of space to preallocate depends on the current file size. The idea is that for small files we do not need 1 MB preallocations and for large files, 1 MB preallocations are not large enough; it is better to preallocate 4 MB.</para>
1398               </entry>
1399             </row>
1400             <row>
1401               <entry>
1402                 <para> <literal>mb_group_prealloc</literal></para>
1403               </entry>
1404               <entry>
1405                 <para>The amount of space (in kilobytes) preallocated for groups of small requests.</para>
1406               </entry>
1407             </row>
1408           </tbody>
1409         </tgroup>
1410       </informaltable>
1411     </section>
1412     <section remap="h3">
1413       <title><indexterm><primary>proc</primary><secondary>locking</secondary></indexterm>Locking</title>
1414       <para><literal> ldlm.namespaces.<replaceable>osc_name|mdc_name</replaceable>.lru_size </literal></para>
1415       <para>The <literal>lru_size</literal> parameter is used to control the number of client-side locks in an LRU queue. LRU size is dynamic, based on load. This optimizes the number of locks available to nodes that have different workloads (e.g., login/build nodes vs. compute nodes vs. backup nodes).</para>
1416       <para>The total number of locks available is a function of the server&apos;s RAM. The default limit is 50 locks/1 MB of RAM. If there is too much memory pressure, then the LRU size is shrunk. The number of locks on the server is limited to <replaceable>targets_on_server</replaceable> * <replaceable>client_count</replaceable> * <replaceable>client_lru_size</replaceable>.</para>
1417       <itemizedlist>
1418         <listitem>
1419           <para>To enable automatic LRU sizing, set the <literal>lru_size</literal> parameter to 0. In this case, the <literal>lru_size</literal> parameter shows the current number of locks being used on the export.  LRU sizing is enabled by default starting with Lustre 1.6.5.1.</para>
1420         </listitem>
1421         <listitem>
1422           <para>To specify a maximum number of locks, set the lru_size parameter to a value other than 0 (former numbers are okay, 100 * <replaceable>core_count</replaceable>). We recommend that you only increase the LRU size on a few login nodes where users access the file system interactively.</para>
1423         </listitem>
1424       </itemizedlist>
1425       <para>To clear the LRU on a single client, and as a result flush client cache, without changing the <literal>lru_size</literal> value:</para>
1426       <screen>$ lctl set_param ldlm.namespaces.<replaceable>osc_name|mdc_name</replaceable>.lru_size=clear</screen>
1427       <para>If you shrink the LRU size below the number of existing unused locks, then the unused locks are canceled immediately. Use echo clear to cancel all locks without changing the value.</para>
1428       <note>
1429         <para>Currently, the lru_size parameter can only be set temporarily with <literal>lctl set_param</literal>; it cannot be set permanently.</para>
1430       </note>
1431       <para>To disable LRU sizing, run this command on the Lustre clients:</para>
1432       <screen>$ lctl set_param ldlm.namespaces.*osc*.lru_size=$((NR_CPU*100))</screen>
1433       <para>Replace <literal>NR_CPU</literal> value with the number of CPUs on the node.</para>
1434       <para>To determine the number of locks being granted:</para>
1435       <screen>$ lctl get_param ldlm.namespaces.*.pool.limit</screen>
1436     </section>
1437     <section xml:id="dbdoclet.50438271_87260">
1438       <title><indexterm><primary>proc</primary><secondary>thread counts</secondary></indexterm>Setting MDS and OSS Thread Counts</title>
1439       <para>MDS and OSS thread counts (minimum and maximum) can be set via the <literal>{min,max}_thread_count tunable</literal>. For each service, a new <literal>/proc/fs/lustre/{service}/*/thread_{min,max,started}</literal> entry is created. The tunable, <literal>{service}.thread_{min,max,started}</literal>, can be used to set the minimum and maximum thread counts or get the current number of running threads for the following services.</para>
1440       <informaltable frame="all">
1441         <tgroup cols="2">
1442           <colspec colname="c1" colwidth="50*"/>
1443           <colspec colname="c2" colwidth="50*"/>
1444           <tbody>
1445             <row>
1446               <entry>
1447                 <para> <emphasis role="bold">Service</emphasis></para>
1448               </entry>
1449               <entry>
1450                 <para> <emphasis role="bold">Description</emphasis></para>
1451               </entry>
1452             </row>
1453             <row>
1454               <entry>
1455                 <literal> mdt.MDS.mds </literal>
1456               </entry>
1457               <entry>
1458                 <para>normal metadata ops</para>
1459               </entry>
1460             </row>
1461             <row>
1462               <entry>
1463                 <literal> mdt.MDS.mds_readpage </literal>
1464               </entry>
1465               <entry>
1466                 <para>metadata readdir</para>
1467               </entry>
1468             </row>
1469             <row>
1470               <entry>
1471                 <literal> mdt.MDS.mds_setattr </literal>
1472               </entry>
1473               <entry>
1474                 <para>metadata setattr</para>
1475               </entry>
1476             </row>
1477             <row>
1478               <entry>
1479                 <literal> ost.OSS.ost </literal>
1480               </entry>
1481               <entry>
1482                 <para>normal data</para>
1483               </entry>
1484             </row>
1485             <row>
1486               <entry>
1487                 <literal> ost.OSS.ost_io </literal>
1488               </entry>
1489               <entry>
1490                 <para>bulk data IO</para>
1491               </entry>
1492             </row>
1493             <row>
1494               <entry>
1495                 <literal> ost.OSS.ost_create </literal>
1496               </entry>
1497               <entry>
1498                 <para>OST object pre-creation service</para>
1499               </entry>
1500             </row>
1501             <row>
1502               <entry>
1503                 <literal> ldlm.services.ldlm_canceld </literal>
1504               </entry>
1505               <entry>
1506                 <para>DLM lock cancel</para>
1507               </entry>
1508             </row>
1509             <row>
1510               <entry>
1511                 <literal> ldlm.services.ldlm_cbd </literal>
1512               </entry>
1513               <entry>
1514                 <para>DLM lock grant</para>
1515               </entry>
1516             </row>
1517           </tbody>
1518         </tgroup>
1519       </informaltable>
1520       <itemizedlist>
1521         <listitem>
1522           <para>To temporarily set this tunable, run:</para>
1523           <screen># lctl {get,set}_param {service}.thread_{min,max,started} </screen>
1524         </listitem>
1525       </itemizedlist>
1526       <itemizedlist>
1527         <listitem>
1528           <para>To permanently set this tunable, run:</para>
1529           <screen># lctl conf_param {service}.thread_{min,max,started} </screen>
1530           <para>The following examples show how to set thread counts and get the number of running threads for the ost_io service.</para>
1531         </listitem>
1532       </itemizedlist>
1533       <itemizedlist>
1534         <listitem>
1535           <para>To get the number of running threads, run:</para>
1536           <screen># lctl get_param ost.OSS.ost_io.threads_started</screen>
1537           <para>The command output will be similar to this:</para>
1538           <screen>ost.OSS.ost_io.threads_started=128</screen>
1539         </listitem>
1540       </itemizedlist>
1541       <itemizedlist>
1542         <listitem>
1543           <para>To set the maximum number of threads (512), run:</para>
1544           <screen># lctl get_param ost.OSS.ost_io.threads_max</screen>
1545           <para>The command output will be:</para>
1546           <screen>ost.OSS.ost_io.threads_max=512</screen>
1547         </listitem>
1548       </itemizedlist>
1549       <itemizedlist>
1550         <listitem>
1551           <para> To set the maximum thread count to 256 instead of 512 (to avoid overloading the storage or for an array with requests), run:</para>
1552           <screen># lctl set_param ost.OSS.ost_io.threads_max=256</screen>
1553           <para>The command output will be:</para>
1554           <screen>ost.OSS.ost_io.threads_max=256</screen>
1555         </listitem>
1556       </itemizedlist>
1557       <itemizedlist>
1558         <listitem>
1559           <para> To check if the new <literal>threads_max</literal> setting is active, run:</para>
1560           <screen># lctl get_param ost.OSS.ost_io.threads_max</screen>
1561           <para>The command output will be similar to this:</para>
1562           <screen>ost.OSS.ost_io.threads_max=256</screen>
1563         </listitem>
1564       </itemizedlist>
1565       <note>
1566         <para>Currently, the maximum thread count setting is advisory because Lustre does not reduce the number of service threads in use, even if that number exceeds the <literal>threads_max</literal> value. Lustre does not stop service threads once they are started.</para>
1567       </note>
1568     </section>
1569   </section>
1570   <section xml:id="dbdoclet.50438271_83523">
1571     <title><indexterm><primary>proc</primary><secondary>debug</secondary></indexterm>Debug</title>
1572     <para><literal> /proc/sys/lnet/debug </literal></para>
1573     <para>By default, Lustre generates a detailed log of all operations to aid in debugging. The level of debugging can affect the performance or speed you achieve with Lustre. Therefore, it is useful to reduce this overhead by turning down the debug level<footnote>
1574         <para>This controls the level of Lustre debugging kept in the internal log buffer. It does not alter the level of debugging that goes to syslog.</para>
1575       </footnote> to improve performance. Raise the debug level when you need to collect the logs for debugging problems. The debugging mask can be set with &quot;symbolic names&quot; instead of the numerical values that were used in prior releases. The new symbolic format is shown in the examples below.</para>
1576     <note>
1577       <para>All of the commands below must be run as root; note the <literal>#</literal> nomenclature.</para>
1578     </note>
1579     <para>To verify the debug level used by examining the <literal>sysctl</literal> that controls debugging, run:</para>
1580     <screen># sysctl lnet.debug 
1581 lnet.debug = ioctl neterror warning error emerg ha config console</screen>
1582     <para>To turn off debugging (except for network error debugging), run this command on all concerned nodes:</para>
1583     <screen># sysctl -w lnet.debug=&quot;neterror&quot; 
1584 lnet.debug = neterror</screen>
1585     <para>To turn off debugging completely, run this command on all concerned nodes:</para>
1586     <screen># sysctl -w lnet.debug=0 
1587 lnet.debug = 0</screen>
1588     <para>To set an appropriate debug level for a production environment, run:</para>
1589     <screen># sysctl -w lnet.debug=&quot;warning dlmtrace error emerg ha rpctrace vfstrace&quot; 
1590 lnet.debug = warning dlmtrace error emerg ha rpctrace vfstrace</screen>
1591     <para>The flags above collect enough high-level information to aid debugging, but they do not cause any serious performance impact.</para>
1592     <para>To clear all flags and set new ones, run:</para>
1593     <screen># sysctl -w lnet.debug=&quot;warning&quot; 
1594 lnet.debug = warning</screen>
1595     <para>To add new flags to existing ones, prefix them with a &quot;<literal>+</literal>&quot;:</para>
1596     <screen># sysctl -w lnet.debug=&quot;+neterror +ha&quot; 
1597 lnet.debug = +neterror +ha
1598 # sysctl lnet.debug 
1599 lnet.debug = neterror warning ha</screen>
1600     <para>To remove flags, prefix them with a &quot;<literal>-</literal>&quot;:</para>
1601     <screen># sysctl -w lnet.debug=&quot;-ha&quot; 
1602 lnet.debug = -ha
1603 # sysctl lnet.debug 
1604 lnet.debug = neterror warning</screen>
1605     <para>You can verify and change the debug level using the <literal>/proc</literal> interface in Lustre. To use the flags with <literal>/proc</literal>, run:</para>
1606     <screen># lctl get_param debug
1607 debug=
1608 neterror warning
1609 # lctl set_param debug=+ha
1610 # lctl get_param debug
1611 debug=
1612 neterror warning ha
1613 # lctl set_param debug=-warning
1614 # lctl get_param debug
1615 debug=
1616 neterror ha</screen>
1617     <para><literal> /proc/sys/lnet/subsystem_debug </literal></para>
1618     <para>This controls the debug logs for subsystems (see <literal>S_*</literal> definitions).</para>
1619     <para><literal> /proc/sys/lnet/debug_path </literal></para>
1620     <para>This indicates the location where debugging symbols should be stored for <literal>gdb</literal>. The default is set to <literal>/r/tmp/lustre-log-localhost.localdomain</literal>.</para>
1621     <para>These values can also be set via <literal>sysctl -w lnet.debug={value}</literal></para>
1622     <note>
1623       <para>The above entries only exist when Lustre has already been loaded.</para>
1624     </note>
1625     <para><literal> /proc/sys/lnet/panic_on_lbug </literal></para>
1626     <para>This causes Lustre to call &apos;&apos;panic&apos;&apos; when it detects an internal problem (an <literal>LBUG</literal>); panic crashes the node. This is particularly useful when a kernel crash dump utility is configured. The crash dump is triggered when the internal inconsistency is detected by Lustre.</para>
1627     <para><literal> /proc/sys/lnet/upcall </literal></para>
1628     <para>This allows you to specify the path to the binary which will be invoked when an <literal>LBUG</literal> is encountered. This binary is called with four parameters. The first one is the string &apos;&apos;<literal>LBUG</literal>&apos;&apos;. The second one is the file where the <literal>LBUG</literal> occurred. The third one is the function name. The fourth one is the line number in the file.</para>
1629     <section remap="h3">
1630       <title>RPC Information for Other OBD Devices</title>
1631       <para>Some OBD devices maintain a count of the number of RPC events that they process. Sometimes these events are more specific to operations of the device, like llite, than actual raw RPC counts.</para>
1632       <screen>$ find /proc/fs/lustre/ -name stats
1633 /proc/fs/lustre/osc/lustre-OST0001-osc-ce63ca00/stats
1634 /proc/fs/lustre/osc/lustre-OST0000-osc-ce63ca00/stats
1635 /proc/fs/lustre/osc/lustre-OST0001-osc/stats
1636 /proc/fs/lustre/osc/lustre-OST0000-osc/stats
1637 /proc/fs/lustre/mdt/MDS/mds_readpage/stats
1638 /proc/fs/lustre/mdt/MDS/mds_setattr/stats
1639 /proc/fs/lustre/mdt/MDS/mds/stats
1640 /proc/fs/lustre/mds/lustre-MDT0000/exports/ab206805-0630-6647-8543-d24265c91a3d/stats
1641 /proc/fs/lustre/mds/lustre-MDT0000/exports/08ac6584-6c4a-3536-2c6d-b36cf9cbdaa0/stats
1642 /proc/fs/lustre/mds/lustre-MDT0000/stats
1643 /proc/fs/lustre/ldlm/services/ldlm_canceld/stats
1644 /proc/fs/lustre/ldlm/services/ldlm_cbd/stats
1645 /proc/fs/lustre/llite/lustre-ce63ca00/stats
1646 </screen>
1647       <section remap="h4">
1648         <title><indexterm><primary>proc</primary><secondary>statistics</secondary></indexterm>Interpreting OST Statistics</title>
1649         <note>
1650           <para>See also <xref linkend="dbdoclet.50438219_84890"/> (llobdstat) and <xref linkend="dbdoclet.50438273_80593"/> (CollectL).</para>
1651         </note>
1652         <para>The OST .../stats files can be used to track client statistics (client activity) for each OST. It is possible to get a periodic dump of values from these file (for example, every 10 seconds), that show the RPC rates (similar to iostat) by using the <literal>llstat.pl</literal> tool:</para>
1653         <screen># llstat /proc/fs/lustre/osc/lustre-OST0000-osc/stats 
1654 /usr/bin/llstat: STATS on 09/14/07 /proc/fs/lustre/osc/lustre-OST0000-osc/stats on 192.168.10.34@tcp
1655 snapshot_time                      1189732762.835363
1656 ost_create                 1
1657 ost_get_info                       1
1658 ost_connect                        1
1659 ost_set_info                       1
1660 obd_ping                   212</screen>
1661         <para>To clear the statistics, give the <literal>-c</literal> option to <literal>llstat.pl</literal>. To specify how frequently the statistics should be cleared (in seconds), use an integer for the <literal>-i</literal> option. This is sample output with <literal>-c</literal> and <literal>-i10</literal> options used, providing statistics every 10s):</para>
1662         <screen>$ llstat -c -i10 /proc/fs/lustre/ost/OSS/ost_io/stats
1663  
1664 /usr/bin/llstat: STATS on 06/06/07 /proc/fs/lustre/ost/OSS/ost_io/ stats on 192.168.16.35@tcp
1665 snapshot_time                              1181074093.276072
1666  
1667 /proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074103.284895
1668 Name               Cur.Count       Cur.Rate        #Events Unit            \last               min             avg             max             stddev
1669 req_waittime       8               0               8       [usec]          2078\               34              259.75          868             317.49
1670 req_qdepth 8               0               8       [reqs]          1\          0               0.12            1               0.35
1671 req_active 8               0               8       [reqs]          11\                 1               1.38            2               0.52
1672 reqbuf_avail       8               0               8       [bufs]          511\                63              63.88           64              0.35
1673 ost_write  8               0               8       [bytes]         1697677\    72914           212209.62       387579          91874.29
1674  
1675 /proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074113.290180
1676 Name               Cur.Count       Cur.Rate        #Events Unit            \last               min             avg             max             stddev
1677 req_waittime       31              3               39      [usec]          30011\              34              822.79          12245           2047.71
1678 req_qdepth 31              3               39      [reqs]          0\          0               0.03            1               0.16
1679 req_active 31              3               39      [reqs]          58\         1               1.77            3               0.74
1680 reqbuf_avail       31              3               39      [bufs]          1977\               63              63.79           64              0.41
1681 ost_write  30              3               38      [bytes]         10284679\   15019           315325.16       910694          197776.51
1682  
1683 /proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074123.325560
1684 Name               Cur.Count       Cur.Rate        #Events Unit            \last               min             avg             max             stddev
1685 req_waittime       21              2               60      [usec]          14970\              34              784.32          12245           1878.66
1686 req_qdepth 21              2               60      [reqs]          0\          0               0.02            1               0.13
1687 req_active 21              2               60      [reqs]          33\                 1               1.70            3               0.70
1688 reqbuf_avail       21              2               60      [bufs]          1341\               63              63.82           64              0.39
1689 ost_write  21              2               59      [bytes]         7648424\    15019           332725.08       910694          180397.87
1690 </screen>
1691         <para>Where:</para>
1692         <informaltable frame="all">
1693           <tgroup cols="2">
1694             <colspec colname="c1" colwidth="50*"/>
1695             <colspec colname="c2" colwidth="50*"/>
1696             <thead>
1697               <row>
1698                 <entry>
1699                   <para><emphasis role="bold">Parameter</emphasis></para>
1700                 </entry>
1701                 <entry>
1702                   <para><emphasis role="bold">Description</emphasis></para>
1703                 </entry>
1704               </row>
1705             </thead>
1706             <tbody>
1707               <row>
1708                 <entry>
1709                   <para> <literal> Cur. Count </literal></para>
1710                 </entry>
1711                 <entry>
1712                   <para>Number of events of each type sent in the last interval (in this example, 10s)</para>
1713                 </entry>
1714               </row>
1715               <row>
1716                 <entry>
1717                   <para> <literal> Cur. Rate </literal></para>
1718                 </entry>
1719                 <entry>
1720                   <para>Number of events per second in the last interval</para>
1721                 </entry>
1722               </row>
1723               <row>
1724                 <entry>
1725                   <para> <literal> #Events </literal></para>
1726                 </entry>
1727                 <entry>
1728                   <para>Total number of such events since the system started</para>
1729                 </entry>
1730               </row>
1731               <row>
1732                 <entry>
1733                   <para> <literal> Unit </literal></para>
1734                 </entry>
1735                 <entry>
1736                   <para>Unit of measurement for that statistic (microseconds, requests, buffers)</para>
1737                 </entry>
1738               </row>
1739               <row>
1740                 <entry>
1741                   <para> <literal> last </literal></para>
1742                 </entry>
1743                 <entry>
1744                   <para>Average rate of these events (in units/event) for the last interval during which they arrived. For instance, in the above mentioned case of <literal>ost_destroy</literal> it took an average of 736 microseconds per destroy for the 400 object destroys in the previous 10 seconds.</para>
1745                 </entry>
1746               </row>
1747               <row>
1748                 <entry>
1749                   <para> <literal> min </literal></para>
1750                 </entry>
1751                 <entry>
1752                   <para>Minimum rate (in units/events) since the service started</para>
1753                 </entry>
1754               </row>
1755               <row>
1756                 <entry>
1757                   <para> <literal> avg </literal></para>
1758                 </entry>
1759                 <entry>
1760                   <para>Average rate</para>
1761                 </entry>
1762               </row>
1763               <row>
1764                 <entry>
1765                   <para> <literal> max </literal></para>
1766                 </entry>
1767                 <entry>
1768                   <para>Maximum rate</para>
1769                 </entry>
1770               </row>
1771               <row>
1772                 <entry>
1773                   <para> <literal> stddev </literal></para>
1774                 </entry>
1775                 <entry>
1776                   <para>Standard deviation (not measured in all cases)</para>
1777                 </entry>
1778               </row>
1779             </tbody>
1780           </tgroup>
1781         </informaltable>
1782         <para>The events common to all services are:</para>
1783         <informaltable frame="all">
1784           <tgroup cols="2">
1785             <colspec colname="c1" colwidth="50*"/>
1786             <colspec colname="c2" colwidth="50*"/>
1787             <thead>
1788               <row>
1789                 <entry>
1790                   <para><emphasis role="bold">Parameter</emphasis></para>
1791                 </entry>
1792                 <entry>
1793                   <para><emphasis role="bold">Description</emphasis></para>
1794                 </entry>
1795               </row>
1796             </thead>
1797             <tbody>
1798               <row>
1799                 <entry>
1800                   <para> <literal> req_waittime </literal></para>
1801                 </entry>
1802                 <entry>
1803                   <para>Amount of time a request waited in the queue before being handled by an available server thread.</para>
1804                 </entry>
1805               </row>
1806               <row>
1807                 <entry>
1808                   <para> <literal> req_qdepth </literal></para>
1809                 </entry>
1810                 <entry>
1811                   <para>Number of requests waiting to be handled in the queue for this service.</para>
1812                 </entry>
1813               </row>
1814               <row>
1815                 <entry>
1816                   <para> <literal> req_active </literal></para>
1817                 </entry>
1818                 <entry>
1819                   <para>Number of requests currently being handled.</para>
1820                 </entry>
1821               </row>
1822               <row>
1823                 <entry>
1824                   <para> <literal> reqbuf_avail </literal></para>
1825                 </entry>
1826                 <entry>
1827                   <para>Number of unsolicited lnet request buffers for this service.</para>
1828                 </entry>
1829               </row>
1830             </tbody>
1831           </tgroup>
1832         </informaltable>
1833         <para>Some service-specific events of interest are:</para>
1834         <informaltable frame="all">
1835           <tgroup cols="2">
1836             <colspec colname="c1" colwidth="50*"/>
1837             <colspec colname="c2" colwidth="50*"/>
1838             <thead>
1839               <row>
1840                 <entry>
1841                   <para><emphasis role="bold">Parameter</emphasis></para>
1842                 </entry>
1843                 <entry>
1844                   <para><emphasis role="bold">Description</emphasis></para>
1845                 </entry>
1846               </row>
1847             </thead>
1848             <tbody>
1849               <row>
1850                 <entry>
1851                   <para> <literal> ldlm_enqueue </literal></para>
1852                 </entry>
1853                 <entry>
1854                   <para>Time it takes to enqueue a lock (this includes file open on the MDS)</para>
1855                 </entry>
1856               </row>
1857               <row>
1858                 <entry>
1859                   <para> <literal> mds_reint </literal></para>
1860                 </entry>
1861                 <entry>
1862                   <para>Time it takes to process an MDS modification record (includes create, <literal>mkdir</literal>, <literal>unlink</literal>, <literal>rename</literal> and <literal>setattr</literal>)</para>
1863                 </entry>
1864               </row>
1865             </tbody>
1866           </tgroup>
1867         </informaltable>
1868       </section>
1869       <section remap="h4">
1870         <title><indexterm><primary>proc</primary><secondary>statistics</secondary></indexterm>Interpreting MDT Statistics</title>
1871         <note>
1872           <para>See also <xref linkend="dbdoclet.50438219_84890"/> (llobdstat) and <xref linkend="dbdoclet.50438273_80593"/> (CollectL).</para>
1873         </note>
1874         <para>The MDT .../stats files can be used to track MDT statistics for the MDS. Here is sample output for an MDT stats file:</para>
1875         <screen># cat /proc/fs/lustre/mds/*-MDT0000/stats 
1876 snapshot_time                              1244832003.676892 secs.usecs 
1877 open                                       2 samples [reqs] 
1878 close                                      1 samples [reqs] 
1879 getxattr                           3 samples [reqs] 
1880 process_config                             1 samples [reqs] 
1881 connect                                    2 samples [reqs] 
1882 disconnect                         2 samples [reqs] 
1883 statfs                                     3 samples [reqs] 
1884 setattr                                    1 samples [reqs] 
1885 getattr                                    3 samples [reqs] 
1886 llog_init                          6 samples [reqs] 
1887 notify                                     16 samples [reqs]</screen>
1888       </section>
1889     </section>
1890   </section>
1891 </chapter>