X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=LustreProc.xml;h=1d33d99d00a7c5bbc0d9ff6ae7399fcae507892f;hb=00db25acca24e72a63a6516aa09b04f796e1b3e9;hp=91862ac1c7a82da29d311fe542462564e8457936;hpb=a78713b1b7b1584abdfb262557d4ab2ed6feaa02;p=doc%2Fmanual.git diff --git a/LustreProc.xml b/LustreProc.xml index 91862ac..1d33d99 100644 --- a/LustreProc.xml +++ b/LustreProc.xml @@ -1,1704 +1,2778 @@ - -
- - LustreProc - - - - - - - - - - Lustre 2.0 Operations Manual - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - C H A P T E R  31 - - - - - - - - - - - LustreProc - - - - - The /proc file system acts as an interface to internal data structures in the kernel. The /proc variables can be used to control aspects of Lustre performance and provide information. - This chapter describes Lustre /proc entries and includes the following sections: - - Proc Entries for Lustre + + + Lustre Parameters + The /proc and /sys file systems + acts as an interface to internal data structures in the kernel. This chapter + describes parameters and tunables that are useful for optimizing and + monitoring aspects of a Lustre file system. It includes these sections: + + + + . - - - - - Lustre I/O Tunables - - - - - - Debug - - - - - -
- <anchor xml:id="dbdoclet.50438271_pgfId-1290359" xreflabel=""/> -
- 31.1 <anchor xml:id="dbdoclet.50438271_90999" xreflabel=""/>Proc Entries for Lustre - This section describes /proc entries for Lustre. -
- <anchor xml:id="dbdoclet.50438271_pgfId-1290361" xreflabel=""/>31.1.1 Locating Lustre <anchor xml:id="dbdoclet.50438271_marker-1296151" xreflabel=""/>File Systems and Servers - Use the proc files on the MGS to locate the following: - - All known file systems - - - - - - # cat /proc/fs/lustre/mgs/MGS/filesystems -spfs -lustre - - - The server names participating in a file system (for each file system that has at least one server running) - - - - - - # cat /proc/fs/lustre/mgs/MGS/live/spfs -fsname: spfs -flags: 0x0 gen: 7 -spfs-MDT0000 -spfs-OST0000 - - All servers are named according to this convention: <fsname>-<MDT|OST><XXXX> This can be shown for live servers under /proc/fs/lustre/devices: - # cat /proc/fs/lustre/devices -0 UP mgs MGS MGS 11 -1 UP mgc MGC192.168.10.34@tcp 1f45bb57-d9be-2ddb-c0b0-5431a49226705 -2 UP mdt MDS MDS_uuid 3 -3 UP lov lustre-mdtlov lustre-mdtlov_UUID 4 -4 UP mds lustre-MDT0000 lustre-MDT0000_UUID 7 -5 UP osc lustre-OST0000-osc lustre-mdtlov_UUID 5 -6 UP osc lustre-OST0001-osc lustre-mdtlov_UUID 5 -7 UP lov lustre-clilov-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa04 -8 UP mdc lustre-MDT0000-mdc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 -9 UP osc lustre-OST0000-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 -10 UP osc lustre-OST0001-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 - - Or from the device label at any time: - # e2label /dev/sda -lustre-MDT0000 - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290389" xreflabel=""/>31.1.2 Lustre <anchor xml:id="dbdoclet.50438271_marker-1296153" xreflabel=""/>Timeouts - Lustre uses two types of timeouts. - - LND timeouts that ensure point-to-point communications complete in finite time in the presence of failures. These timeouts are logged with the S_LND flag set. They may not be printed as console messages, so you should check the Lustre log for D_NETERROR messages, or enable printing of D_NETERROR messages to the console (echo + neterror > /proc/sys/lnet/printk). - - - - - - 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. - - Lustre timeouts that ensure Lustre RPCs complete in finite time in the presence of failures. These timeouts should always 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. - - - - - - Specific Lustre timeouts are described below. - /proc/sys/lustre/timeout - 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 "stale." - - - - - - Note -Lustre sends periodic ‘PING’ 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. - - - - - /proc/sys/lustre/ldlm_timeout - 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. - /proc/sys/lustre/fail_loc - This is the internal debugging failure hook. - See lustre/include/linux/obd_support.h for the definitions of individual failure locations. The default value is 0 (zero). - sysctl -w lustre.fail_loc=0x80000122 # drop a single reply - - /proc/sys/lustre/dump_on_timeout - This triggers dumps of the Lustre debug log when timeouts occur. The default value is 0 (zero). - /proc/sys/lustre/dump_on_eviction - 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. -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1292935" xreflabel=""/>31.1.3 Adaptive <anchor xml:id="dbdoclet.50438271_marker-1293380" xreflabel=""/>Timeouts - 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. - 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's failover partner. - In previous Lustre versions, the static obd_timeout (/proc/sys/lustre/timeout) 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'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. -
- <anchor xml:id="dbdoclet.50438271_pgfId-1292947" xreflabel=""/>31.1.3.1 Configuring <anchor xml:id="dbdoclet.50438271_marker-1293381" xreflabel=""/>Adaptive Timeouts - One of the goals of adaptive timeouts is to relieve users from having to tune the obd_timeout value. In general, obd_timeout 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. - The following parameters can be set persistently system-wide using lctl conf_param on the MGS. For example, lctl conf_param work1.sys.at_max=1500 sets the at_max value for all servers and clients using the work1 file system. - - - - - - Note -Nodes using multiple Lustre file systems must use the same at_* values for all file systems.) - - - - - - - - - - - Parameter - Description - - - - - at_min - 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. - - - at_max - Sets the maximum adaptive timeout (in seconds). The at_max parameter is an upper-limit on the service time estimate, and is used as a 'failsafe' 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 'broken' and should time out.Setting at_max to 0 causes adaptive timeouts to be disabled and the old fixed-timeout method (obd_timeout) to be used. This is the default value in Lustre 1.6.5. NOTE: 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. - - - at_history - Sets a time period (in seconds) within which adaptive timeouts remember the slowest event that occurred. Default value is 600. - - - at_early_margin - Sets how far before the deadline Lustre sends an early reply. Default value is 5This default was chosen as a reasonable time in which to send a reply from the point at which it was sent.. - - - - at_extra - 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 30This default was chosen as a balance between sending too many early replies for the same RPC and overestimating the actual completion time. 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.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. - - - ldlm_enqueue_min - Sets the minimum lock enqueue time. Default value is 100. The ldlm_enqueue time is the maximum of the measured enqueue estimate (influenced by at_min and at_max parameters), multiplied by a weighting factor, and the ldlm_enqueue_min setting. LDLM lock enqueues were based on the obd_timeout value; now they have a dedicated minimum value. Lock enqueues increase as the measured enqueue times increase (similar to adaptive timeouts). - - - - - Adaptive timeouts are enabled, by default. To disable adaptive timeouts, at run time, set at_max to 0. On the MGS, run: - $ lctl conf_param <fsname>.sys.at_max=0 - - - - - - - Note -Changing adaptive timeouts status at runtime may cause transient timeout, reconnect, recovery, etc. - - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1292959" xreflabel=""/>31.1.3.2 Interpreting <anchor xml:id="dbdoclet.50438271_marker-1293383" xreflabel=""/>Adaptive Timeouts Information - Adaptive timeouts information can be read from /proc/fs/lustre/*/timeouts files (for each service and client) or with the lctl command. - This is an example from the /proc/fs/lustre/*/timeouts files: - cfs21:~# cat /proc/fs/lustre/ost/OSS/ost_io/timeouts - - This is an example using the lctl command: - $ lctl get_param -n ost.*.ost_io.timeouts - - This is the sample output: - service : cur 33 worst 34 (at 1193427052, 0d0h26m40s ago) 1 1 33 2 - - The ost_io 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. - The output also provides a history of service times. In the example, there are 4 "bins" of adaptive_timeout_history, 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). - Service times (as reported by the servers) are also tracked in the client OBDs: - cfs21:# lctl get_param osc.*.timeouts -last reply : 1193428639, 0d0h00m00s ago -network : cur 1 worst 2 (at 1193427053, 0d0h26m26s ago) 1 1 1\ - 1 -portal 6 : cur 33 worst 34 (at 1193427052, 0d0h26m27s ago) 33 33 33\ - 2 -portal 28 : cur 1 worst 1 (at 1193426141, 0d0h41m38s ago) 1 1 1\ - 1 -portal 7 : cur 1 worst 1 (at 1193426141, 0d0h41m38s ago) 1 0 1\ - 1 -portal 17 : cur 1 worst 1 (at 1193426177, 0d0h41m02s ago) 1 0 0\ - 1 - - In this case, RPCs to portal 6, the OST_IO_PORTAL (see lustre/include/lustre/lustre_idl.h), shows the history of what the ost_io portal has reported as the service estimate. - Server statistic files also show the range of estimates in the normal min/max/sum/sumsq manner. - cfs21:~# lctl get_param mdt.*.mdt.stats -... -req_timeout 6 samples [sec] 1 10 15 105 -... + +
+ Introduction to Lustre Parameters + Lustre parameters and statistics files provide an interface to + internal data structures in the kernel that enables monitoring and + tuning of many aspects of Lustre file system and application performance. + These data structures include settings and metrics for components such + as memory, networking, file systems, and kernel housekeeping routines, + which are available throughout the hierarchical file layout. + + Typically, metrics are accessed via lctl get_param + files and settings are changed by via lctl set_param. + Some data is server-only, some data is client-only, and some data is + exported from the client to the server and is thus duplicated in both + locations. + + In the examples in this chapter, # indicates + a command is entered as root. Lustre servers are named according to the + convention fsname-MDT|OSTnumber. + The standard UNIX wildcard designation (*) is used. + + Some examples are shown below: + + + To obtain data from a Lustre client: + # lctl list_param osc.* +osc.testfs-OST0000-osc-ffff881071d5cc00 +osc.testfs-OST0001-osc-ffff881071d5cc00 +osc.testfs-OST0002-osc-ffff881071d5cc00 +osc.testfs-OST0003-osc-ffff881071d5cc00 +osc.testfs-OST0004-osc-ffff881071d5cc00 +osc.testfs-OST0005-osc-ffff881071d5cc00 +osc.testfs-OST0006-osc-ffff881071d5cc00 +osc.testfs-OST0007-osc-ffff881071d5cc00 +osc.testfs-OST0008-osc-ffff881071d5cc00 + In this example, information about OST connections available + on a client is displayed (indicated by "osc"). + + + + + To see multiple levels of parameters, use multiple + wildcards:# lctl list_param osc.*.* +osc.testfs-OST0000-osc-ffff881071d5cc00.active +osc.testfs-OST0000-osc-ffff881071d5cc00.blocksize +osc.testfs-OST0000-osc-ffff881071d5cc00.checksum_type +osc.testfs-OST0000-osc-ffff881071d5cc00.checksums +osc.testfs-OST0000-osc-ffff881071d5cc00.connect_flags +osc.testfs-OST0000-osc-ffff881071d5cc00.contention_seconds +osc.testfs-OST0000-osc-ffff881071d5cc00.cur_dirty_bytes +... +osc.testfs-OST0000-osc-ffff881071d5cc00.rpc_stats + + + + + To view a specific file, use lctl get_param: + # lctl get_param osc.lustre-OST0000*.rpc_stats + + + For more information about using lctl, see . + Data can also be viewed using the cat command + with the full path to the file. The form of the cat + command is similar to that of the lctl get_param + command with some differences. Unfortunately, as the Linux kernel has + changed over the years, the location of statistics and parameter files + has also changed, which means that the Lustre parameter files may be + located in either the /proc directory, in the + /sys directory, and/or in the + /sys/kernel/debug directory, depending on the kernel + version and the Lustre version being used. The lctl + command insulates scripts from these changes and is preferred over direct + file access, unless as part of a high-performance monitoring system. + In the cat command: + + + Replace the dots in the path with slashes. + + + Prepend the path with the following as appropriate: + /{proc,sys}/{fs,sys}/{lustre,lnet} + + + For example, an lctl get_param command may look like + this:# lctl get_param osc.*.uuid +osc.testfs-OST0000-osc-ffff881071d5cc00.uuid=594db456-0685-bd16-f59b-e72ee90e9819 +osc.testfs-OST0001-osc-ffff881071d5cc00.uuid=594db456-0685-bd16-f59b-e72ee90e9819 +... + The equivalent cat command may look like this: + # cat /proc/fs/lustre/osc/*/uuid +594db456-0685-bd16-f59b-e72ee90e9819 +594db456-0685-bd16-f59b-e72ee90e9819 +... + or like this: + # cat /sys/fs/lustre/osc/*/uuid +594db456-0685-bd16-f59b-e72ee90e9819 +594db456-0685-bd16-f59b-e72ee90e9819 +... + The llstat utility can be used to monitor some + Lustre file system I/O activity over a specified time period. For more + details, see + + Some data is imported from attached clients and is available in a + directory called exports located in the corresponding + per-service directory on a Lustre server. For example: + oss:/root# lctl list_param obdfilter.testfs-OST0000.exports.* +# hash ldlm_stats stats uuid +
+ Identifying Lustre File Systems and Servers + Several /proc files on the MGS list existing + Lustre file systems and file system servers. The examples below are for + a Lustre file system called + testfs with one MDT and three OSTs. + + + To view all known Lustre file systems, enter: + mgs# lctl get_param mgs.*.filesystems +testfs + + + To view the names of the servers in a file system in which least one server is + running, + enter:lctl get_param mgs.*.live.<filesystem name> + For example: + mgs# lctl get_param mgs.*.live.testfs +fsname: testfs +flags: 0x20 gen: 45 +testfs-MDT0000 +testfs-OST0000 +testfs-OST0001 +testfs-OST0002 + +Secure RPC Config Rules: + +imperative_recovery_state: + state: startup + nonir_clients: 0 + nidtbl_version: 6 + notify_duration_total: 0.001000 + notify_duation_max: 0.001000 + notify_count: 4 + + + To view the names of all live servers in the file system as listed in + /proc/fs/lustre/devices, enter: + # lctl device_list +0 UP mgs MGS MGS 11 +1 UP mgc MGC192.168.10.34@tcp 1f45bb57-d9be-2ddb-c0b0-5431a49226705 +2 UP mdt MDS MDS_uuid 3 +3 UP lov testfs-mdtlov testfs-mdtlov_UUID 4 +4 UP mds testfs-MDT0000 testfs-MDT0000_UUID 7 +5 UP osc testfs-OST0000-osc testfs-mdtlov_UUID 5 +6 UP osc testfs-OST0001-osc testfs-mdtlov_UUID 5 +7 UP lov testfs-clilov-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa04 +8 UP mdc testfs-MDT0000-mdc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 +9 UP osc testfs-OST0000-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 +10 UP osc testfs-OST0001-osc-ce63ca00 08ac6584-6c4a-3536-2c6d-b36cf9cbdaa05 + The information provided on each line includes: + - Device number + - Device status (UP, INactive, or STopping) + - Device name + - Device UUID + - Reference count (how many users this device has) + + + To display the name of any server, view the device + label:mds# e2label /dev/sda +testfs-MDT0000 + + +
+
+
+ Tuning Multi-Block Allocation (mballoc) + Capabilities supported by mballoc include: + + + Pre-allocation for single files to help to reduce fragmentation. + + + Pre-allocation for a group of files to enable packing of small files into large, + contiguous chunks. + + + Stream allocation to help decrease the seek rate. + + + The following mballoc tunables are available: + + + + + + + + Field + + + Description + + + + + + + + mb_max_to_scan + + + Maximum number of free chunks that mballoc finds before a + final decision to avoid a livelock situation. + + + + + + mb_min_to_scan + + + Minimum number of free chunks that mballoc searches before + picking the best chunk for allocation. This is useful for small requests to reduce + fragmentation of big free chunks. + + + + + + mb_order2_req + + + For requests equal to 2^N, where N >= mb_order2_req, a + fast search is done using a base 2 buddy allocation service. + + + + + + mb_small_req + + + mb_small_req - Defines (in MB) the upper bound of "small + requests". + mb_large_req - Defines (in MB) the lower bound of "large + requests". + Requests are handled differently based on size: + + < mb_small_req - Requests are packed together to + form large, aggregated requests. + + + > mb_small_req and < mb_large_req + - Requests are primarily allocated linearly. + + + > mb_large_req - Requests are allocated since hard disk + seek time is less of a concern in this case. + + + In general, small requests are combined to create larger requests, which are + then placed close to one another to minimize the number of seeks required to access + the data. + + + + + + mb_large_req + + + + + + mb_prealloc_table + + + A table of values used to preallocate space when a new request is received. By + default, the table looks like + this:prealloc_table +4 8 16 32 64 128 256 512 1024 2048 + When a new request is received, space is preallocated at the next higher + increment specified in the table. For example, for requests of less than 4 file + system blocks, 4 blocks of space are preallocated; for requests between 4 and 8, 8 + blocks are preallocated; and so forth + Although customized values can be entered in the table, the performance of + general usage file systems will not typically be improved by modifying the table (in + fact, in ext4 systems, the table values are fixed). However, for some specialized + workloads, tuning the prealloc_table values may result in smarter + preallocation decisions. + + + + + + mb_group_prealloc + + + The amount of space (in kilobytes) preallocated for groups of small + requests. + + + + + + Buddy group cache information found in + /proc/fs/ldiskfs/disk_device/mb_groups may + be useful for assessing on-disk fragmentation. For + example:cat /proc/fs/ldiskfs/loop0/mb_groups +#group: free free frags first pa [ 2^0 2^1 2^2 2^3 2^4 2^5 2^6 2^7 2^8 2^9 + 2^10 2^11 2^12 2^13] +#0 : 2936 2936 1 42 0 [ 0 0 0 1 1 1 1 2 0 1 + 2 0 0 0 ] + In this example, the columns show: + + #group number + + + Available blocks in the group + + + Blocks free on a disk + + + Number of free fragments + + + First free block in the group + + + Number of preallocated chunks (not blocks) + + + A series of available chunks of different sizes + + +
+
+ Monitoring Lustre File System I/O + A number of system utilities are provided to enable collection of data related to I/O + activity in a Lustre file system. In general, the data collected describes: + + + Data transfer rates and throughput of inputs and outputs external to the Lustre file + system, such as network requests or disk I/O operations performed + + + Data about the throughput or transfer rates of internal Lustre file system data, such + as locks or allocations. + + + + It is highly recommended that you complete baseline testing for your Lustre file system + to determine normal I/O activity for your hardware, network, and system workloads. Baseline + data will allow you to easily determine when performance becomes degraded in your system. + Two particularly useful baseline statistics are: + + + brw_stats – Histogram data characterizing I/O requests to the + OSTs. For more details, see . + + + rpc_stats – Histogram data showing information about RPCs made by + clients. For more details, see . + + + +
+ <indexterm> + <primary>proc</primary> + <secondary>watching RPC</secondary> + </indexterm>Monitoring the Client RPC Stream + The rpc_stats file contains histogram data showing information about + remote procedure calls (RPCs) that have been made since this file was last cleared. The + histogram data can be cleared by writing any value into the rpc_stats + file. + Example: + # lctl get_param osc.testfs-OST0000-osc-ffff810058d2f800.rpc_stats +snapshot_time: 1372786692.389858 (secs.usecs) +read RPCs in flight: 0 +write RPCs in flight: 1 +dio read RPCs in flight: 0 +dio write RPCs in flight: 0 +pending write pages: 256 +pending read pages: 0 + + read write +pages per rpc rpcs % cum % | rpcs % cum % +1: 0 0 0 | 0 0 0 +2: 0 0 0 | 1 0 0 +4: 0 0 0 | 0 0 0 +8: 0 0 0 | 0 0 0 +16: 0 0 0 | 0 0 0 +32: 0 0 0 | 2 0 0 +64: 0 0 0 | 2 0 0 +128: 0 0 0 | 5 0 0 +256: 850 100 100 | 18346 99 100 + + read write +rpcs in flight rpcs % cum % | rpcs % cum % +0: 691 81 81 | 1740 9 9 +1: 48 5 86 | 938 5 14 +2: 29 3 90 | 1059 5 20 +3: 17 2 92 | 1052 5 26 +4: 13 1 93 | 920 5 31 +5: 12 1 95 | 425 2 33 +6: 10 1 96 | 389 2 35 +7: 30 3 100 | 11373 61 97 +8: 0 0 100 | 460 2 100 + + read write +offset rpcs % cum % | rpcs % cum % +0: 850 100 100 | 18347 99 99 +1: 0 0 100 | 0 0 99 +2: 0 0 100 | 0 0 99 +4: 0 0 100 | 0 0 99 +8: 0 0 100 | 0 0 99 +16: 0 0 100 | 1 0 99 +32: 0 0 100 | 1 0 99 +64: 0 0 100 | 3 0 99 +128: 0 0 100 | 4 0 100 + -
-
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290400" xreflabel=""/>31.1.4 LNET <anchor xml:id="dbdoclet.50438271_marker-1296164" xreflabel=""/>Information - This section describes /proc entries for LNET information. - /proc/sys/lnet/peers - Shows all NIDs known to this node and also gives information on the queue state. - # cat /proc/sys/lnet/peers -nid refs state max \ -rtr min tx min queue -0@lo 1 ~rtr 0 \ -0 0 0 0 0 -192.168.10.35@tcp 1 ~rtr 8 8 \ - 8 8 6 0 -192.168.10.36@tcp 1 ~rtr 8 8 \ - 8 8 6 0 -192.168.10.37@tcp 1 ~rtr 8 8 \ - 8 8 6 0 + The header information includes: + + + snapshot_time - UNIX epoch instant the file was read. + + + read RPCs in flight - Number of read 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. + + + write RPCs in flight - Number of 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. + + + dio read RPCs in flight - Direct I/O (as opposed to block I/O) + read RPCs issued but not completed at the time of the snapshot. + + + dio write RPCs in flight - Direct I/O (as opposed to block I/O) + write RPCs issued but not completed at the time of the snapshot. + + + pending write pages - Number of pending write pages that have + been queued for I/O in the OSC. + + + pending read pages - Number of pending read pages that have been + queued for I/O in the OSC. + + + The tabular data is described in the table below. Each row in the table shows the number + of reads or writes (ios) occurring for the statistic, the relative + percentage (%) of total reads or writes, and the cumulative percentage + (cum %) to that point in the table for the statistic. + + + + + + + + Field + + + Description + + + + + + + pages per RPC + + + Shows cumulative RPC reads and writes organized according to the number of + pages in the RPC. A single page RPC increments the 0: + row. + + + + + RPCs in flight + + + Shows the number of RPCs that are pending when an RPC is sent. When the first + RPC is sent, the 0: row is incremented. If the first RPC is + sent while another RPC is pending, the 1: row is incremented + and so on. + + + + + offset + + + The page index of the first page read from or written to the object by the + RPC. + + + + + + Analysis: + This table provides a 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. + For information about optimizing the client I/O RPC stream, see . +
+
+ <indexterm> + <primary>proc</primary> + <secondary>client stats</secondary> + </indexterm>Monitoring Client Activity + The stats file maintains statistics accumulate during typical + operation of a client across the VFS interface of the Lustre file system. Only non-zero + parameters are displayed in the file. + Client statistics are enabled by default. + + Statistics for all mounted file systems can be discovered by + entering:lctl get_param llite.*.stats + + Example: + client# lctl get_param llite.*.stats +snapshot_time 1308343279.169704 secs.usecs +dirty_pages_hits 14819716 samples [regs] +dirty_pages_misses 81473472 samples [regs] +read_bytes 36502963 samples [bytes] 1 26843582 55488794 +write_bytes 22985001 samples [bytes] 0 125912 3379002 +brw_read 2279 samples [pages] 1 1 2270 +ioctl 186749 samples [regs] +open 3304805 samples [regs] +close 3331323 samples [regs] +seek 48222475 samples [regs] +fsync 963 samples [regs] +truncate 9073 samples [regs] +setxattr 19059 samples [regs] +getxattr 61169 samples [regs] - The fields are explained below: - - - - - - - Field - Description - - - - - refs - A reference count (principally used for debugging) - - - state - Only valid to refer to routers. Possible values: - ~ rtr (indicates this node is not a router) + The statistics can be cleared by echoing an empty string into the + stats file or by using the command: + lctl set_param llite.*.stats=0 + The statistics displayed are described in the table below. + + + + + + + + Entry + + + Description + + + + + + + + snapshot_time + + + UNIX epoch instant the stats file was read. + + + + + + dirty_page_hits + + + The number of write operations that have been satisfied by the dirty page + cache. See for more information about dirty cache + behavior in a Lustre file system. + + + + + + dirty_page_misses + + + The number of write operations that were not satisfied by the dirty page + cache. + + + + + + read_bytes + + + The number of read operations that have occurred. Three additional parameters + are displayed: + + + min + + The minimum number of bytes read in a single request since the counter + was reset. - - up/down (indicates this node is a router) + + + max + + The maximum number of bytes read in a single request since the counter + was reset. - - auto_fail must be enabled + + + sum + + The accumulated sum of bytes of all read requests since the counter was + reset. - - - - max - Maximum number of concurrent sends from this peer - - - rtr - Routing buffer credits. - - - min - Minimum routing buffer credits seen. - - - tx - Send credits. - - - min - Minimum send credits seen. - - - queue - Total bytes in active/queued sends. - - - - - 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. - If rtr/tx is less than max, there are operations in progress. The number of operations is equal to rtr or tx subtracted from max. - If rtr/tx is greater that max, there are operations blocking. - LNET also limits concurrent sends and router buffers allocated to a single peer so that no peer can occupy all these resources. - /proc/sys/lnet/nis - # cat /proc/sys/lnet/nis -nid refs peer max \ - tx min -0@lo 3 0 0 \ - 0 0 -192.168.10.34@tcp 4 8 256 \ -256 252 - - Shows the current queue health on this node. The fields are explained below: - - - - - - - Field - Description - - - - - nid - Network interface - - - refs - Internal reference counter - - - peer - Number of peer-to-peer send credits on this NID. Credits are used to size buffer pools - - - max - Total number of send credits on this NID. - - - tx - Current number of send credits available on this NID. - - - min - Lowest number of send credits available on this NID. - - - queue - Total bytes in active/queued sends. - - - - - Subtracting max - tx yields the number of sends currently active. A large or increasing number of active sends may indicate a problem. - # cat /proc/sys/lnet/nis -nid refs peer max \ - tx min -0@lo 2 0 0 \ - 0 0 -10.67.73.173@tcp 4 8 256 \ -256 253 - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290499" xreflabel=""/>31.1.5 Free Space <anchor xml:id="dbdoclet.50438271_marker-1296165" xreflabel=""/>Distribution - Free-space stripe weighting, as set, gives a priority of "0" to free space (versus trying to place the stripes "widely" -- nicely distributed across OSSs and OSTs to maximize network balancing). To adjust this priority (as a percentage), use the qos_prio_free proc tunable: - $ cat /proc/fs/lustre/lov/<fsname>-mdtlov/qos_prio_free - - Currently, the default is 90%. You can permanently set this value by running this command on the MGS: - $ lctl conf_param <fsname>-MDT0000.lov.qos_prio_free=90 - - 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. - 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.) -
- <anchor xml:id="dbdoclet.50438271_pgfId-1296529" xreflabel=""/>31.1.5.1 Managing Stripe Allocation - The MDS uses two methods to manage stripe allocation and determine which OSTs to use for file object storage: - - QOS - - - - - - Quality of Service (QOS) considers an OST’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. - - RR - - - - - - 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. - Whether QOS or RR is used depends on the setting of the qos_threshold_rr proc tunable. The qos_threshold_rr variable specifies a percentage threshold where the use of QOS or RR becomes more/less likely. The qos_threshold_rr tunable can be set as an integer, from 0 to 100, and results in this stripe allocation behavior: - - If qos_threshold_rr is set to 0, then QOS is always used - - - - - - If qos_threshold_rr is set to 100, then RR is always used - - - - - - The larger the qos_threshold_rr setting, the greater the possibility that RR is used instead of QOS - - - - - -
-
-
-
- 31.2 <anchor xml:id="dbdoclet.50438271_78950" xreflabel=""/>Lustre I/O <anchor xml:id="dbdoclet.50438271_marker-1290508" xreflabel=""/>Tunables - The section describes I/O tunables. - /proc/fs/lustre/llite/<fsname>-<uid>/max_cache_mb - # cat /proc/fs/lustre/llite/lustre-ce63ca00/max_cached_mb 128 - - This tunable is the maximum amount of inactive data cached by the client (default is 3/4 of RAM). -
- <anchor xml:id="dbdoclet.50438271_pgfId-1290515" xreflabel=""/>31.2.1 Client I/O RPC<anchor xml:id="dbdoclet.50438271_marker-1290514" xreflabel=""/> Stream Tunables - 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: - $ ls -d /proc/fs/lustre/osc/OSC_client_ost1_MNT_client_2 /localhost -/proc/fs/lustre/osc/OSC_uml0_ost1_MNT_localhost -/proc/fs/lustre/osc/OSC_uml0_ost2_MNT_localhost -/proc/fs/lustre/osc/OSC_uml0_ost3_MNT_localhost -$ ls /proc/fs/lustre/osc/OSC_uml0_ost1_MNT_localhost -blocksizefilesfree max_dirty_mb ost_server_uuid stats - - ... and so on. - RPC stream tunables are described below. - /proc/fs/lustre/osc/<object name>/max_dirty_mb - 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). - /proc/fs/lustre/osc/<object name>/cur_dirty_bytes - This tunable is a read-only value that returns the current amount of bytes written and cached on this OSC. - /proc/fs/lustre/osc/<object name>/max_pages_per_rpc - 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 PAGE_SIZE), though generally amounts to a total of 1 MB in the RPC. - /proc/fs/lustre/osc/<object name>/max_rpcs_in_flight - 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 32. If you are looking to improve small file I/O performance, increase the max_rpcs_in_flight value. - To maximize performance, the value for max_dirty_mb is recommended to be 4 * max_pages_per_rpc * max_rpcs_in_flight. - - - - - - Note -The <object name> varies depending on the specific Lustre configuration. For <object name> examples, refer to the sample command output. - - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290536" xreflabel=""/>31.2.2 Watching the <anchor xml:id="dbdoclet.50438271_marker-1290535" xreflabel=""/>Client RPC Stream - The same directory contains a rpc_stats file with a histogram showing the composition of previous RPCs. The histogram can be cleared by writing any value into the rpc_stats file. - # cat /proc/fs/lustre/osc/spfs-OST0000-osc-c45f9c00/rpc_stats -snapshot_time: 1174867307.156604 (secs.\ -usecs) -read RPCs in flight: 0 -write RPCs in flight: 0 -pending write pages: 0 -pending read pages: 0 - read write -pages per rpc rpcs % cum % | rpcs \ -% cum % -1: 0 0 0 | 0 \ -0 0 - - read write -rpcs in flight rpcs % cum % | rpcs \ -% cum % -0: 0 0 0 | 0 \ -0 0 - - read write -offset rpcs % cum % | rpcs \ -% cum % -0: 0 0 0 | 0 \ -0 0 - - Where: - - - - - - - Field - Description - - - - - {read,write} RPCs in flight - 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. - - - pending {read,write} pages - Number of pending read/write pages that have been queued for I/O in the OSC. - - - pages per RPC - When an RPC is sent, the number of pages it consists of is recorded (in order). A single page RPC increments the 0: row. - - - RPCs in flight - 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.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. - - - offset -   - - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290565" xreflabel=""/>31.2.3 Client Read-Write <anchor xml:id="dbdoclet.50438271_marker-1290564" xreflabel=""/>Offset Survey - 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. - Read/write offset statistics are off, by default. The statistics can be activated by writing anything into the offset_stats file. - Example: - # cat /proc/fs/lustre/llite/lustre-f57dee00/rw_offset_stats -snapshot_time: 1155748884.591028 (secs.usecs) -R/W PID RANGE START RANGE END \ - SMALLEST EXTENT LARGEST EXTENT OFF\ -SET -R 8385 0 128 \ -128 128 0 -R 8385 0 224 \ -224 224 -128 -W 8385 0 250 \ -50 100 0 -W 8385 100 1110 \ -10 500 -150 -W 8384 0 5233 \ -5233 5233 0 -R 8385 500 600 \ -100 100 -610 - - Where: - - - - - - - Field - Description - - - - - R/W - Whether the non-sequential call was a read or write - - - PID - Process ID which made the read/write call. - - - Range Start/Range End - Range in which the read/write calls were sequential.  - - - Smallest Extent - Smallest extent (single read/write) in the corresponding range. - - - Largest Extent - Largest extent (single read/write) in the corresponding range. - - - Offset - Difference from the previous range end to the current range start.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’s range-end and this entry’s range-start for the same file.The rw_offset_stats file can be cleared by writing to it: -echo > /proc/fs/lustre/llite/lustre-f57dee00/rw_offset_stats - - - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290613" xreflabel=""/>31.2.4 Client Read-Write <anchor xml:id="dbdoclet.50438271_marker-1290612" xreflabel=""/>Extents Survey - Client-Based I/O Extent Size Survey - The rw_extent_stats histogram in the llite directory shows you the statistics for the sizes of the read-write I/O extents. This file does not maintain the per-process statistics. - Example: - $ cat /proc/fs/lustre/llite/lustre-ee5af200/extents_stats -snapshot_time: 1213828728.348516 (secs.usecs) - read | write -extents calls % cum% | calls % \ -cum% - -0K - 4K : 0 0 0 | 2 2 2 -4K - 8K : 0 0 0 | 0 0 2 -8K - 16K : 0 0 0 | 0 0 2 -16K - 32K : 0 0 0 | 20 23 \ -26 -32K - 64K : 0 0 0 | 0 0 \ -26 -64K - 128K : 0 0 0 | 51 60 \ -86 -128K - 256K : 0 0 0 | 0 0 \ -86 -256K - 512K : 0 0 0 | 0 0 \ -86 -512K - 1024K : 0 0 0 | 0 0 \ -86 -1M - 2M : 0 0 0 | 11 13 100 - - - The file can be cleared by issuing the following command: - $ echo > cat /proc/fs/lustre/llite/lustre-ee5af200/extents_stats - - Per-Process Client I/O Statistics - The extents_stats_per_process file maintains the I/O extent size statistics on a per-process basis. So you can track the per-process statistics for the last MAX_PER_PROCESS_HIST processes. - Example: - $ cat /proc/fs/lustre/llite/lustre-ee5af200/extents_stats_per_process -snapshot_time: 1213828762.204440 (secs.usecs) - read | write -extents calls % cum% | calls % \ -cum% - -PID: 11488 - 0K - 4K : 0 0 0 | 0 0 0 - 4K - 8K : 0 0 0 | 0 0 0 - 8K - 16K : 0 0 0 | 0 0 0 - 16K - 32K : 0 0 0 | 0 0 0 - 32K - 64K : 0 0 0 | 0 0 0 - 64K - 128K : 0 0 0 | 0 0 0 - 128K - 256K : 0 0 0 | 0 0 0 - 256K - 512K : 0 0 0 | 0 0 0 - 512K - 1024K : 0 0 0 | 0 0 0 - 1M - 2M : 0 0 0 | 10 100 100 - -PID: 11491 - 0K - 4K : 0 0 0 | 0 0 0 - 4K - 8K : 0 0 0 | 0 0 0 - 8K - 16K : 0 0 0 | 0 0 0 - 16K - 32K : 0 0 0 | 20 100 100 - -PID: 11424 - 0K - 4K : 0 0 0 | 0 0 0 - 4K - 8K : 0 0 0 | 0 0 0 - 8K - 16K : 0 0 0 | 0 0 0 - 16K - 32K : 0 0 0 | 0 0 0 - 32K - 64K : 0 0 0 | 0 0 0 - 64K - 128K : 0 0 0 | 16 100 100 - -PID: 11426 - 0K - 4K : 0 0 0 | 1 100 100 - -PID: 11429 - 0K - 4K : 0 0 0 | 1 100 100 - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290632" xreflabel=""/>31.2.5 <anchor xml:id="dbdoclet.50438271_55057" xreflabel=""/> Watching the <anchor xml:id="dbdoclet.50438271_marker-1290631" xreflabel=""/>OST Block I/O Stream - Similarly, there is a brw_stats 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. - cat /proc/fs/lustre/obdfilter/lustre-OST0000/brw_stats -snapshot_time: 1174875636.764630 (secs:usecs) - read write -pages per brw brws % cum % | rpcs % \ -cum % -1: 0 0 0 | 0 0 0 - read write -discont pages rpcs % cum % | rpcs % \ -cum % -1: 0 0 0 | 0 0 0 - read write -discont blocks rpcs % cum % | rpcs % \ -cum % -1: 0 0 0 | 0 0 0 - read write -dio frags rpcs % cum % | rpcs % cum % -1: 0 0 0 | 0 0 0 - read write -disk ios in flight rpcs % cum % | rpcs % cum % -1: 0 0 0 | 0 0 0 - read write -io time (1/1000s) rpcs % cum % | rpcs % cum % -1: 0 0 0 | 0 0 0 - read write -disk io size rpcs % cum % | rpcs % \ -cum % -1: 0 0 0 | 0 0 0 - read write - - The fields are explained below: - - - - - - - Field - Description - - - - - pages per brw - Number of pages per RPC request, which should match aggregate client rpc_stats. - - - discont pages - Number of discontinuities in the logical file offset of each page in a single RPC. - - - discont blocks - Number of discontinuities in the physical block allocation in the file system for a single RPC. - - - - - For each Lustre service, the following information is provided: - - Number of requests - - - - - - Request wait time (avg, min, max and std dev) - - - - - - Service idle time (% of elapsed time) - - - - - - Additionally, data on each Lustre service is provided by service type: - - Number of requests of this type - - - - - - Request service time (avg, min, max and std dev) - - - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1294293" xreflabel=""/>31.2.6 Using File <anchor xml:id="dbdoclet.50438271_marker-1294292" xreflabel=""/>Readahead and Directory Statahead - 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. -
- <anchor xml:id="dbdoclet.50438271_pgfId-1295107" xreflabel=""/>31.2.6.1 Tuning <anchor xml:id="dbdoclet.50438271_marker-1295183" xreflabel=""/>File Readahead - 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. - /proc/fs/lustre/llite/<fsname>-<uid>/max_read_ahead_mb - 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. - /proc/fs/lustre/llite/<fsname>-<uid>/max_read_ahead_whole_mb - This tunable controls the maximum size of a file that is read in its entirety, regardless of the size of the read(). -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1295046" xreflabel=""/>31.2.6.2 Tuning Directory <anchor xml:id="dbdoclet.50438271_marker-1295184" xreflabel=""/>Statahead - When the ls -l process opens a directory, its process ID is recorded. When the first directory entry is ''stated'' with this recorded process ID, a statahead thread is triggered which stats ahead all of the directory entries, in order. The ls -l process can use the stated directory entries directly, improving performance. - /proc/fs/lustre/llite/*/statahead_max - This tunable controls whether directory statahead is enabled and the maximum statahead count. By default, statahead is active. - To disable statahead, set this tunable to: - echo 0 > /proc/fs/lustre/llite/*/statahead_max - To set the maximum statahead count (n), set this tunable to: - echo n > /proc/fs/lustre/llite/*/statahead_max - - The maximum value of n is 8192. - /proc/fs/lustre/llite/*/statahead_status - This is a read-only interface that indicates the current statahead status. -
-
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290686" xreflabel=""/>31.2.7 OSS <anchor xml:id="dbdoclet.50438271_marker-1296183" xreflabel=""/>Read Cache - 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 filesytem in Linux, OSS read cache uses as much physical memory as is allocated. - OSS read cache improves Lustre performance in these situations: - - Many clients are accessing the same data set (as in HPC applications and when diskless clients boot from Lustre) - - - - - - One client is storing data while another client is reading it (essentially exchanging data via the OST) - - - - - - A client has very limited caching of its own - - - - - - OSS read cache offers these benefits: - - Allows OSTs to cache read data more frequently - - - - - - Improves repeated reads to match network speeds instead of disk speeds - - - - - - Provides the building blocks for OST write cache (small-write aggregation) - - - - - -
- <anchor xml:id="dbdoclet.50438271_pgfId-1295497" xreflabel=""/>31.2.7.1 Using OSS Read Cache - 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. - OSS read cache is enabled, by default, and managed by the following tunables: - - read_cache_enable 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 (read_cache_enable = 1). - - - - - - 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’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. - If read cache is disabled (read_cache_enable = 0), then the OSS will discard the data after the client’s read requests are serviced and, for subsequent read requests, the OSS must read the data from disk. - To disable read cache on all OSTs of an OSS, run: - root@oss1# lctl set_param obdfilter.*.read_cache_enable=0 - - To re-enable read cache on one OST, run: - root@oss1# lctl set_param obdfilter.{OST_name}.read_cache_enable=1 - - To check if read cache is enabled on all OSTs on an OSS, run: - root@oss1# lctl get_param obdfilter.*.read_cache_enable - - - writethrough_cache_enable 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 (writethrough_cache_enable = 1). - - - - - - 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. - If writethrough cache is disabled (writethrough_cache_enabled = 0), then the OSS discards the data after the client’s write request is completed, and for subsequent read request, or partial-page write request, the OSS must re-read the data from disk. - 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. - To disable writethrough cache on all OSTs of an OSS, run: - root@oss1# lctl set_param obdfilter.*.writethrough_cache_enable=0 - - To re-enable writethrough cache on one OST, run: - root@oss1# lctl set_param \obdfilter.{OST_name}.writethrough_cache_enable=1 - - To check if writethrough cache is - root@oss1# lctl set_param obdfilter.*.writethrough_cache_enable=1 - - - readcache_max_filesize controls the maximum size of a file that both the read cache and writethrough cache will try to keep in memory. Files larger than readcache_max_filesize will not be kept in cache for either reads or writes. - - - - - - 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. - When setting readcache_max_filesize, the input value can be specified in bytes, or can have a suffix to indicate other binary units such as Kilobytes, Megabytes, Gigabytes, Terabytes, or Petabytes. - To limit the maximum cached file size to 32MB on all OSTs of an OSS, run: - root@oss1# lctl set_param obdfilter.*.readcache_max_filesize=32M - - To disable the maximum cached file size on an OST, run: - root@oss1# lctl set_param \obdfilter.{OST_name}.readcache_max_filesize=-1 - - To check the current maximum cached file size on all OSTs of an OSS, run: - root@oss1# lctl get_param obdfilter.*.readcache_max_filesize - -
-
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1300258" xreflabel=""/>31.2.8 OSS Asynchronous Journal Commit - 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. - - - - - - Note -Asynchronous journal commit cannot work with O_DIRECT writes, a journal flush is still forced. - - - - - 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 >=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. - 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. - To enable asynchronous journal commit, set the sync_journal parameter to zero (sync_journal=0): - $ lctl set_param obdfilter.*.sync_journal=0 -obdfilter.lol-OST0001.sync_journal=0 - - By default, sync_journal is disabled (sync_journal=1), which forces a journal flush after every bulk write. - 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. - 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 sync_on_lock_cancel, which can be set to the following values: - always: Always force a journal flush on lock cancellation - blocking: Force a journal flush only when the local cancellation is due to a blocking callback - never: Do not force any journal flush - Here is an example of sync_on_lock_cancel being set not to force a journal flush: - $ lctl get_param obdfilter.*.sync_on_lock_cancel -obdfilter.lol-OST0001.sync_on_lock_cancel=never - - By default, sync_on_lock_cancel is set to never, because asynchronous journal commit is disabled by default. - When asynchronous journal commit is enabled (sync_journal=0), sync_on_lock_cancel is automatically set to always, if it was previously set to never. - Similarly, when asynchronous journal commit is disabled, (sync_journal=1), sync_on_lock_cancel is enforced to never. -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1297046" xreflabel=""/>31.2.9 mballoc <anchor xml:id="dbdoclet.50438271_marker-1297045" xreflabel=""/>History - /proc/fs/ldiskfs/sda/mb_history - Multi-Block-Allocate (mballoc), enables Lustre to ask ldiskfs to allocate multiple blocks with a single request to the block allocator. Typically, an ldiskfs file system allocates only one block per time. Each mballoc-enabled partition has this file. This is sample output: - pid inode goal result found grps cr \ me\ -rge tail broken -2838 139267 17/12288/1 17/12288/1 1 0 0 \ -\ M 1 8192 -2838 139267 17/12289/1 17/12289/1 1 0 0 \ -\ M 0 0 -2838 139267 17/12290/1 17/12290/1 1 0 0 \ -\ M 1 2 -2838 24577 3/12288/1 3/12288/1 1 0 0 \ -\ M 1 8192 -2838 24578 3/12288/1 3/771/1 1 1 1 \ -\ 0 0 -2838 32769 4/12288/1 4/12288/1 1 0 0 \ -\ M 1 8192 -2838 32770 4/12288/1 4/12289/1 13 1 1 \ -\ 0 0 -2838 32771 4/12288/1 5/771/1 26 2 1 \ -\ 0 0 -2838 32772 4/12288/1 5/896/1 31 2 1 \ -\ 1 128 -2838 32773 4/12288/1 5/897/1 31 2 1 \ -\ 0 0 -2828 32774 4/12288/1 5/898/1 31 2 1 \ -\ 1 2 -2838 32775 4/12288/1 5/899/1 31 2 1 \ -\ 0 0 -2838 32776 4/12288/1 5/900/1 31 2 1 \ -\ 1 4 -2838 32777 4/12288/1 5/901/1 31 2 1 \ -\ 0 0 -2838 32778 4/12288/1 5/902/1 31 2 1 \ -\ 1 2 - - The parameters are described below: - - - - - - - Parameter - Description - - - - - pid - Process that made the allocation. - - - inode - inode number allocated blocks - - - goal - Initial request that came to mballoc (group/block-in-group/number-of-blocks) - - - result - What mballoc actually found for this request. - - - found - Number of free chunks mballoc found and measured before the final decision. - - - grps - Number of groups mballoc scanned to satisfy the request. - - - cr - Stage at which mballoc found the result:0 - best in terms of resource allocation. The request was 1MB or larger and was satisfied directly via the kernel buddy allocator.1 - regular stage (good at resource consumption)2 - fs is quite fragmented (not that bad at resource consumption)3 - fs is very fragmented (worst at resource consumption) - - - queue - Total bytes in active/queued sends. - - - merge - 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. - - - tail - Number of blocks left free after the allocation breaks large free chunks. - - - broken - How large the broken chunk was. - - - - - Most customers are probably interested in found/cr. If cr is 0 1 and found is less than 100, then mballoc is doing quite well. - Also, number-of-blocks-in-request (third number in the goal triple) can tell the number of blocks requested by the obdfilter. If the obdfilter 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 rpc_stats or OST brw_stats mentioned above. - Number of groups scanned (grps column) should be small. If it reaches a few dozen often, then either your disk file system is pretty fragmented or mballoc is doing something wrong in the group selection part. -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1290796" xreflabel=""/>31.2.10 mballoc3<anchor xml:id="dbdoclet.50438271_marker-1290795" xreflabel=""/> Tunables - Lustre version 1.6.1 and later includes mballoc3, which was built on top of mballoc2. By default, mballoc3 is enabled, and adds these features: - - Pre-allocation for single files (helps to resist fragmentation) - - - - - - Pre-allocation for a group of files (helps to pack small files into large, contiguous chunks) - - - - - - Stream allocation (helps to decrease the seek rate) - - - - - - The following mballoc3 tunables are available: - - - - - - - Field - Description - - - - - stats - Enables/disables the collection of statistics. Collected statistics can be foundin /proc/fs/ldiskfs2/<dev>/mb_history. - - - max_to_scan - Maximum number of free chunks that mballoc finds before a final decision to avoid livelock. - - - min_to_scan - Minimum number of free chunks that mballoc finds before a final decision. This is useful for a very small request, to resist fragmentation of big free chunks. - - - order2_req - For requests equal to 2^N (where N >= order2_req), a very fast search via buddy structures is used. - - - stream_req - Requests smaller or equal to this value are packed together to form large write I/Os. - - - - - The following tunables, providing more control over allocation policy, will be available in the next version: - - - - - - - Field - Description - - - - - stats - Enables/disables the collection of statistics. Collected statistics can be found in /proc/fs/ldiskfs2/<dev>/mb_history. - - - max_to_scan - Maximum number of free chunks that mballoc finds before a final decision to avoid livelock. - - - min_to_scan - Minimum number of free chunks that mballoc finds before a final decision. This is useful for a very small request, to resist fragmentation of big free chunks. - - - order2_req - For requests equal to 2^N (where N >= order2_req), a very fast search via buddy structures is used. - - - small_req - All requests are divided into 3 categories:< small_req (packed together to form large, aggregated requests)< large_req (allocated mostly in linearly)> large_req (very large requests so the arm seek does not matter)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. - - - large_req - - - prealloc_table - 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. - - - group_prealloc - The amount of space preallocated for small requests to be grouped. - - - - -
+ + + + + + + + write_bytes + + + The number of write operations that have occurred. Three additional parameters + are displayed: + + + min + + The minimum number of bytes written in a single request since the + counter was reset. + + + + max + + The maximum number of bytes written in a single request since the + counter was reset. + + + + sum + + The accumulated sum of bytes of all write requests since the counter was + reset. + + + + + + + + + brw_read + + + The number of pages that have been read. Three additional parameters are + displayed: + + + min + + The minimum number of bytes read in a single block read/write + (brw) read request since the counter was reset. + + + + max + + The maximum number of bytes read in a single brw read + requests since the counter was reset. + + + + sum + + The accumulated sum of bytes of all brw read requests + since the counter was reset. + + + + + + + + + ioctl + + + The number of combined file and directory ioctl + operations. + + + + + + open + + + The number of open operations that have succeeded. + + + + + + close + + + The number of close operations that have succeeded. + + + + + + seek + + + The number of times seek has been called. + + + + + + fsync + + + The number of times fsync has been called. + + + + + + truncate + + + The total number of calls to both locked and lockless + truncate. + + + + + + setxattr + + + The number of times extended attributes have been set. + + + + + + getxattr + + + The number of times value(s) of extended attributes have been fetched. + + + + + + Analysis: + Information is provided about the amount and type of I/O activity is taking place on the + client. +
+
+ <indexterm> + <primary>proc</primary> + <secondary>read/write survey</secondary> + </indexterm>Monitoring Client Read-Write Offset Statistics + When the offset_stats parameter is set, statistics are maintained for + occurrences of a series of read or write calls from a process that did not access the next + sequential location. The OFFSET field is reset to 0 (zero) whenever a + different file is read or written. + + By default, statistics are not collected in the offset_stats, + extents_stats, and extents_stats_per_process files + to reduce monitoring overhead when this information is not needed. The collection of + statistics in all three of these files is activated by writing + anything, except for 0 (zero) and "disable", into any one of the + files. + + Example: + # lctl get_param llite.testfs-f57dee0.offset_stats +snapshot_time: 1155748884.591028 (secs.usecs) + RANGE RANGE SMALLEST LARGEST +R/W PID START END EXTENT EXTENT OFFSET +R 8385 0 128 128 128 0 +R 8385 0 224 224 224 -128 +W 8385 0 250 50 100 0 +W 8385 100 1110 10 500 -150 +W 8384 0 5233 5233 5233 0 +R 8385 500 600 100 100 -610 + In this example, snapshot_time is the UNIX epoch instant the file was + read. The tabular data is described in the table below. + The offset_stats file can be cleared by + entering:lctl set_param llite.*.offset_stats=0 + + + + + + + + Field + + + Description + + + + + + + R/W + + + Indicates if the non-sequential call was a read or write + + + + + PID + + + Process ID of the process that made the read/write call. + + + + + RANGE START/RANGE END + + + Range in which the read/write calls were sequential. + + + + + SMALLEST EXTENT + + + Smallest single read/write in the corresponding range (in bytes). + + + + + LARGEST EXTENT + + + Largest single read/write in the corresponding range (in bytes). + + + + + OFFSET + + + Difference between the previous range end and the current range start. + + + + + + Analysis: + This data provides an indication of how contiguous or fragmented the data is. For + example, the fourth entry in the example above shows the writes for this RPC were sequential + in the range 100 to 1110 with the minimum write 10 bytes and the maximum write 500 bytes. + The range started with an offset of -150 from the RANGE END of the + previous entry in the example. +
+
+ <indexterm> + <primary>proc</primary> + <secondary>read/write survey</secondary> + </indexterm>Monitoring Client Read-Write Extent Statistics + For in-depth troubleshooting, client read-write extent statistics can be accessed to + obtain more detail about read/write I/O extents for the file system or for a particular + process. + + By default, statistics are not collected in the offset_stats, + extents_stats, and extents_stats_per_process files + to reduce monitoring overhead when this information is not needed. The collection of + statistics in all three of these files is activated by writing + anything, except for 0 (zero) and "disable", into any one of the + files. +
- <anchor xml:id="dbdoclet.50438271_pgfId-1290875" xreflabel=""/>31.2.11 <anchor xml:id="dbdoclet.50438271_13474" xreflabel=""/>Lo<anchor xml:id="dbdoclet.50438271_marker-1290874" xreflabel=""/>cking - /proc/fs/lustre/ldlm/ldlm/namespaces/<OSC name|MDC name>/lru_size - The lru_size 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). - The total number of locks available is a function of the server’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 {number of OST/MDT on node} * {number of clients} * {client lru_size}. - - To enable automatic LRU sizing, set the lru_size parameter to 0. In this case, the lru_size parameter shows the current number of locks being used on the export. (In Lustre 1.6.5.1 and later, LRU sizing is enabled, by default.) - - - + Client-Based I/O Extent Size Survey + The extents_stats histogram in the + llite directory shows the statistics for the sizes + of the read/write I/O extents. This file does not maintain the per + process statistics. + Example: + # lctl get_param llite.testfs-*.extents_stats +snapshot_time: 1213828728.348516 (secs.usecs) + read | write +extents calls % cum% | calls % cum% + +0K - 4K : 0 0 0 | 2 2 2 +4K - 8K : 0 0 0 | 0 0 2 +8K - 16K : 0 0 0 | 0 0 2 +16K - 32K : 0 0 0 | 20 23 26 +32K - 64K : 0 0 0 | 0 0 26 +64K - 128K : 0 0 0 | 51 60 86 +128K - 256K : 0 0 0 | 0 0 86 +256K - 512K : 0 0 0 | 0 0 86 +512K - 1024K : 0 0 0 | 0 0 86 +1M - 2M : 0 0 0 | 11 13 100 + In this example, snapshot_time is the UNIX epoch instant the file + was read. The table shows cumulative extents organized according to size with statistics + provided separately for reads and writes. Each row in the table shows the number of RPCs + for reads and writes respectively (calls), the relative percentage of + total calls (%), and the cumulative percentage to + that point in the table of calls (cum %). + The file can be cleared by issuing the following command: + # lctl set_param llite.testfs-*.extents_stats=1 +
+
+ Per-Process Client I/O Statistics + The extents_stats_per_process file maintains the I/O extent size + statistics on a per-process basis. + Example: + # lctl get_param llite.testfs-*.extents_stats_per_process +snapshot_time: 1213828762.204440 (secs.usecs) + read | write +extents calls % cum% | calls % cum% + +PID: 11488 + 0K - 4K : 0 0 0 | 0 0 0 + 4K - 8K : 0 0 0 | 0 0 0 + 8K - 16K : 0 0 0 | 0 0 0 + 16K - 32K : 0 0 0 | 0 0 0 + 32K - 64K : 0 0 0 | 0 0 0 + 64K - 128K : 0 0 0 | 0 0 0 + 128K - 256K : 0 0 0 | 0 0 0 + 256K - 512K : 0 0 0 | 0 0 0 + 512K - 1024K : 0 0 0 | 0 0 0 + 1M - 2M : 0 0 0 | 10 100 100 + +PID: 11491 + 0K - 4K : 0 0 0 | 0 0 0 + 4K - 8K : 0 0 0 | 0 0 0 + 8K - 16K : 0 0 0 | 0 0 0 + 16K - 32K : 0 0 0 | 20 100 100 + +PID: 11424 + 0K - 4K : 0 0 0 | 0 0 0 + 4K - 8K : 0 0 0 | 0 0 0 + 8K - 16K : 0 0 0 | 0 0 0 + 16K - 32K : 0 0 0 | 0 0 0 + 32K - 64K : 0 0 0 | 0 0 0 + 64K - 128K : 0 0 0 | 16 100 100 + +PID: 11426 + 0K - 4K : 0 0 0 | 1 100 100 + +PID: 11429 + 0K - 4K : 0 0 0 | 1 100 100 + + + This table shows cumulative extents organized according to size for each process ID + (PID) with statistics provided separately for reads and writes. Each row in the table + shows the number of RPCs for reads and writes respectively (calls), the + relative percentage of total calls (%), and the cumulative percentage + to that point in the table of calls (cum %). +
+
+
+ <indexterm> + <primary>proc</primary> + <secondary>block I/O</secondary> + </indexterm>Monitoring the OST Block I/O Stream + The brw_stats file in the obdfilter directory + contains histogram data showing statistics for number of I/O requests sent to the disk, + their size, and whether they are contiguous on the disk or not. + Example: + Enter on the OSS: + # lctl get_param obdfilter.testfs-OST0000.brw_stats +snapshot_time: 1372775039.769045 (secs.usecs) + read | write +pages per bulk r/w rpcs % cum % | rpcs % cum % +1: 108 100 100 | 39 0 0 +2: 0 0 100 | 6 0 0 +4: 0 0 100 | 1 0 0 +8: 0 0 100 | 0 0 0 +16: 0 0 100 | 4 0 0 +32: 0 0 100 | 17 0 0 +64: 0 0 100 | 12 0 0 +128: 0 0 100 | 24 0 0 +256: 0 0 100 | 23142 99 100 + + read | write +discontiguous pages rpcs % cum % | rpcs % cum % +0: 108 100 100 | 23245 100 100 + + read | write +discontiguous blocks rpcs % cum % | rpcs % cum % +0: 108 100 100 | 23243 99 99 +1: 0 0 100 | 2 0 100 + + read | write +disk fragmented I/Os ios % cum % | ios % cum % +0: 94 87 87 | 0 0 0 +1: 14 12 100 | 23243 99 99 +2: 0 0 100 | 2 0 100 + + read | write +disk I/Os in flight ios % cum % | ios % cum % +1: 14 100 100 | 20896 89 89 +2: 0 0 100 | 1071 4 94 +3: 0 0 100 | 573 2 96 +4: 0 0 100 | 300 1 98 +5: 0 0 100 | 166 0 98 +6: 0 0 100 | 108 0 99 +7: 0 0 100 | 81 0 99 +8: 0 0 100 | 47 0 99 +9: 0 0 100 | 5 0 100 + + read | write +I/O time (1/1000s) ios % cum % | ios % cum % +1: 94 87 87 | 0 0 0 +2: 0 0 87 | 7 0 0 +4: 14 12 100 | 27 0 0 +8: 0 0 100 | 14 0 0 +16: 0 0 100 | 31 0 0 +32: 0 0 100 | 38 0 0 +64: 0 0 100 | 18979 81 82 +128: 0 0 100 | 943 4 86 +256: 0 0 100 | 1233 5 91 +512: 0 0 100 | 1825 7 99 +1K: 0 0 100 | 99 0 99 +2K: 0 0 100 | 0 0 99 +4K: 0 0 100 | 0 0 99 +8K: 0 0 100 | 49 0 100 + + read | write +disk I/O size ios % cum % | ios % cum % +4K: 14 100 100 | 41 0 0 +8K: 0 0 100 | 6 0 0 +16K: 0 0 100 | 1 0 0 +32K: 0 0 100 | 0 0 0 +64K: 0 0 100 | 4 0 0 +128K: 0 0 100 | 17 0 0 +256K: 0 0 100 | 12 0 0 +512K: 0 0 100 | 24 0 0 +1M: 0 0 100 | 23142 99 100 + + The tabular data is described in the table below. Each row in the table shows the number + of reads and writes occurring for the statistic (ios), the relative + percentage of total reads or writes (%), and the cumulative percentage to + that point in the table for the statistic (cum %). + + + + + + + + Field + + + Description + + + + + + + + pages per bulk r/w + + + Number of pages per RPC request, which should match aggregate client + rpc_stats (see ). + + + + + + discontiguous pages + + + Number of discontinuities in the logical file offset of each page in a single + RPC. + + + + + + discontiguous blocks + + + Number of discontinuities in the physical block allocation in the file system + for a single RPC. + + + + + disk fragmented I/Os + + + Number of I/Os that were not written entirely sequentially. + + + + + disk I/Os in flight + + + Number of disk I/Os currently pending. + + + + + I/O time (1/1000s) + + + Amount of time for each I/O operation to complete. + + + + + disk I/O size + + + Size of each I/O operation. + + + + + + Analysis: + This data provides an indication of extent size and distribution in the file + system. +
+
+
+ Tuning Lustre File System I/O + Each OSC has its own tree of tunables. For example: + $ ls -d /proc/fs/testfs/osc/OSC_client_ost1_MNT_client_2 /localhost +/proc/fs/testfs/osc/OSC_uml0_ost1_MNT_localhost +/proc/fs/testfs/osc/OSC_uml0_ost2_MNT_localhost +/proc/fs/testfs/osc/OSC_uml0_ost3_MNT_localhost + +$ ls /proc/fs/testfs/osc/OSC_uml0_ost1_MNT_localhost +blocksizefilesfree max_dirty_mb ost_server_uuid stats + +... + The following sections describe some of the parameters that can be tuned in a Lustre file + system. +
+ <indexterm> + <primary>proc</primary> + <secondary>RPC tunables</secondary> + </indexterm>Tuning the Client I/O RPC Stream + Ideally, an optimal amount of data is packed into each I/O RPC and a consistent number + of issued RPCs are in progress at any time. To help optimize the client I/O RPC stream, + several tuning variables are provided to adjust behavior according to network conditions and + cluster size. For information about monitoring the client I/O RPC stream, see . + RPC stream tunables include: + + + + osc.osc_instance.max_dirty_mb - + 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 2048 or 1/4 of RAM are allowable. If 0 is specified, no writes are cached. + Performance suffers noticeably unless you use large writes (1 MB or more). + To maximize performance, the value for max_dirty_mb is + recommended to be 4 * max_pages_per_rpc * + max_rpcs_in_flight. - - To specify a maximum number of locks, set the lru_size parameter to a value > 0 (former numbers are okay, 100 * CPU_NR). We recommend that you only increase the LRU size on a few login nodes where users access the file system interactively. + + osc.osc_instance.cur_dirty_bytes - A + read-only value that returns the current number of bytes written and cached on this + OSC. - - + + osc.osc_instance.max_pages_per_rpc - + The maximum number of pages that will undergo I/O in a single RPC to the OST. The + minimum setting is a single page and the maximum setting is 1024 (for systems with a + PAGE_SIZE of 4 KB), with the default maximum of 1 MB in the RPC. + It is also possible to specify a units suffix (e.g. 4M), so that + the RPC size can be specified independently of the client + PAGE_SIZE. - - To clear the LRU on a single client, and as a result flush client cache, without changing the lru_size value: - $ lctl set_param ldlm.namespaces.<osc_name|mdc_name>.lru_size=clear - - 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. - - - - - - Note -Currently, the lru_size parameter can only be set temporarily with lctl set_param; it cannot be set permanently. - - - - - To disable LRU sizing, run this command on the Lustre clients: - $ lctl set_param ldlm.namespaces.*osc*.lru_size=$((NR_CPU*100)) - - Replace NR_CPU value with the number of CPUs on the node. - To determine the number of locks being granted: - $ lctl get_param ldlm.namespaces.*.pool.limit - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1296246" xreflabel=""/>31.2.12 <anchor xml:id="dbdoclet.50438271_87260" xreflabel=""/>Setting MDS and OSS Thread Counts - MDS and OSS thread counts (minimum and maximum) can be set via the {min,max}_thread_count tunable. For each service, a new /proc/fs/lustre/{service}/*/thread_{min,max,started} entry is created. The tunable, {service}.thread_{min,max,started}, can be used to set the minimum and maximum thread counts or get the current number of running threads for the following services. - - - - - - - Service - Description - - - mdt.MDS.mds - normal metadata ops - - - mdt.MDS.mds_readpage - metadata readdir - - - mdt.MDS.mds_setattr - metadata setattr - - - ost.OSS.ost - normal data - - - ost.OSS.ost_io - bulk data IO - - - ost.OSS.ost_create - OST object pre-creation service - - - ldlm.services.ldlm_canceld - DLM lock cancel - - - ldlm.services.ldlm_cbd - DLM lock grant - - - - - - To temporarily set this tunable, run: + + osc.osc_instance.max_rpcs_in_flight + - 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. + To improve small file I/O performance, increase the + max_rpcs_in_flight value. - - + + llite.fsname-instance/max_cache_mb - + Maximum amount of inactive data cached by the client (default is 3/4 of RAM). For + example: + # lctl get_param llite.testfs-ce63ca00.max_cached_mb +128 - - # lctl {get,set}_param {service}.thread_{min,max,started} - - - To permanently set this tunable, run: + + + + The value for osc_instance is typically + fsname-OSTost_index-osc-mountpoint_instance, + where the value for mountpoint_instance is + unique to each mount point to allow associating osc, mdc, lov, lmv, and llite parameters + with the same mount point. For + example:lctl get_param osc.testfs-OST0000-osc-ffff88107412f400.rpc_stats +osc.testfs-OST0000-osc-ffff88107412f400.rpc_stats= +snapshot_time: 1375743284.337839 (secs.usecs) +read RPCs in flight: 0 +write RPCs in flight: 0 + + +
+
+ <indexterm> + <primary>proc</primary> + <secondary>readahead</secondary> + </indexterm>Tuning File Readahead and Directory Statahead + File readahead and directory statahead enable reading of data + into memory before a process requests the data. File readahead prefetches + file content data into memory for read() related + calls, while directory statahead fetches file metadata into memory for + readdir() and stat() related + calls. When readahead and statahead work well, a process that accesses + data finds that the information it needs is available immediately in + memory on the client when requested without the delay of network I/O. + +
+ Tuning File Readahead + File readahead is triggered when two or more sequential reads + by an application fail to be satisfied by data in 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. + Readahead tunables include: + + + llite.fsname-instance.max_read_ahead_mb - + Controls the maximum amount of data readahead on a file. + Files are read ahead in RPC-sized chunks (1 MB or the size of + the 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 sequential reads take place again. + + To disable readahead, set + max_read_ahead_mb=0. The default value is 40 MB. + - - + + llite.fsname-instance.max_read_ahead_whole_mb - + Controls the maximum size of a file that is read in its entirety, + regardless of the size of the read(). This + avoids multiple small read RPCs on relatively small files, when + it is not possible to efficiently detect a sequential read + pattern before the whole file has been read. + - - # lctl conf_param {service}.thread_{min,max,started} - The following examples show how to set thread counts and get the number of running threads for the ost_io service. - - To get the number of running threads, run: + +
+
+ Tuning Directory Statahead and AGL + Many system commands, such as ls –l, + du, and find, traverse a + directory sequentially. To make these commands run efficiently, the + directory statahead can be enabled to improve the performance of + directory traversal. + The statahead tunables are: + + + statahead_max - + Controls the maximum number of file attributes that will be + prefetched by the statahead thread. By default, statahead is + enabled and statahead_max is 32 files. + To disable statahead, set statahead_max + to zero via the following command on the client: + lctl set_param llite.*.statahead_max=0 + To change the maximum statahead window size on a client: + lctl set_param llite.*.statahead_max=n + The maximum statahead_max is 8192 files. + + The directory statahead thread will also prefetch the file + size/block attributes from the OSTs, so that all file attributes + are available on the client when requested by an application. + This is controlled by the asynchronous glimpse lock (AGL) setting. + The AGL behaviour can be disabled by setting: + lctl set_param llite.*.statahead_agl=0 - - + + statahead_stats - + A read-only interface that provides current statahead and AGL + statistics, such as how many times statahead/AGL has been triggered + since the last mount, how many statahead/AGL failures have occurred + due to an incorrect prediction or other causes. + + AGL behaviour is affected by statahead since the inodes + processed by AGL are built by the statahead thread. If + statahead is disabled, then AGL is also disabled. + - - # lctl get_param ost.OSS.ost_io.threads_started - The command output will be similar to this: - ost.OSS.ost_io.threads_started=128 - - - To set the maximum number of threads (512), run: + +
+
+
+ <indexterm> + <primary>proc</primary> + <secondary>read cache</secondary> + </indexterm>Tuning OSS Read Cache + The OSS read cache feature provides read-only caching of data on an OSS. This + functionality uses the Linux page cache to store the data and uses as much physical memory + as is allocated. + OSS read cache improves Lustre file system performance in these situations: + + + Many clients are accessing the same data set (as in HPC applications or when + diskless clients boot from the Lustre file system). + + + One client is storing data while another client is reading it (i.e., clients are + exchanging data via the OST). + + + A client has very limited caching of its own. + + + OSS read cache offers these benefits: + + + Allows OSTs to cache read data more frequently. + + + Improves repeated reads to match network speeds instead of disk speeds. + + + Provides the building blocks for OST write cache (small-write aggregation). + + +
+ Using OSS Read Cache + 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, + the appropriate amount of memory for the cache should be determined based on I/O patterns; + if the data is mostly reads, then more cache is required than would be needed for mostly + writes. + OSS read cache is managed using the following tunables: + + + read_cache_enable - 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 + (read_cache_enable=1). + 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 request. If read cache is enabled, + this data stays in memory after the request from the client has been fulfilled. When + subsequent read requests for the same data are received, the OSS skips reading data + from disk and the request is fulfilled from the cached data. The read cache is managed + by the Linux kernel globally across all OSTs on that OSS so that the least recently + used cache pages are dropped from memory when the amount of free memory is running + low. + If read cache is disabled (read_cache_enable=0), the OSS + discards the data after a read request from the client is serviced and, for subsequent + read requests, the OSS again reads the data from disk. + To disable read cache on all the OSTs of an OSS, run: + root@oss1# lctl set_param obdfilter.*.read_cache_enable=0 + To re-enable read cache on one OST, run: + root@oss1# lctl set_param obdfilter.{OST_name}.read_cache_enable=1 + To check if read cache is enabled on all OSTs on an OSS, run: + root@oss1# lctl get_param obdfilter.*.read_cache_enable - - + + writethrough_cache_enable - 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, the writethrough + cache is enabled (writethrough_cache_enable=1). + 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 the 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. + If the writethrough cache is disabled + (writethrough_cache_enabled=0), the OSS discards the data after + the write request from the client is completed. For subsequent read requests, or + partial-page write requests, the OSS must re-read the data from disk. + 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 enabling writethrough + cache 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 the writethrough cache is advisable when 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. + To disable the writethrough cache on all OSTs of an OSS, run: + root@oss1# lctl set_param obdfilter.*.writethrough_cache_enable=0 + To re-enable the writethrough cache on one OST, run: + root@oss1# lctl set_param obdfilter.{OST_name}.writethrough_cache_enable=1 + To check if the writethrough cache is enabled, run: + root@oss1# lctl get_param obdfilter.*.writethrough_cache_enable - - # lctl get_param ost.OSS.ost_io.threads_max - - The command output will be: - ost.OSS.ost_io.threads_max=512 - - - To set the maximum thread count to 256 instead of 512 (to avoid overloading the storage or for an array with requests), run: + + readcache_max_filesize - Controls the maximum size of a file + that both the read cache and writethrough cache will try to keep in memory. Files + larger than readcache_max_filesize will not be kept in cache for + either reads or writes. + Setting this tunable can be 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. + When setting readcache_max_filesize, the input value can be + specified in bytes, or can have a suffix to indicate other binary units such as + K (kilobytes), M (megabytes), + G (gigabytes), T (terabytes), or + P (petabytes). + To limit the maximum cached file size to 32 MB on all OSTs of an OSS, run: + root@oss1# lctl set_param obdfilter.*.readcache_max_filesize=32M + To disable the maximum cached file size on an OST, run: + root@oss1# lctl set_param obdfilter.{OST_name}.readcache_max_filesize=-1 + To check the current maximum cached file size on all OSTs of an OSS, run: + root@oss1# lctl get_param obdfilter.*.readcache_max_filesize - - + +
+
+
+ <indexterm> + <primary>proc</primary> + <secondary>OSS journal</secondary> + </indexterm>Enabling OSS Asynchronous Journal Commit + The OSS asynchronous journal commit feature asynchronously writes data to disk without + forcing a journal flush. This reduces the number of seeks and significantly improves + performance on some hardware. + + Asynchronous journal commit cannot work with direct I/O-originated writes + (O_DIRECT flag set). In this case, a journal flush is forced. + + When the asynchronous journal commit feature 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 + equal to 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 (the default OSS file system commit time + interval is 5 seconds) after the bulk write reply is received, so the OSS has an opportunity + to report the last committed transno. + If the OSS crashes before the journal commit occurs, then intermediate data is lost. + However, OSS recovery functionality incorporated into 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. + By default, sync_journal is enabled + (sync_journal=1), so that journal entries are committed synchronously. + To enable asynchronous journal commit, set the sync_journal parameter to + 0 by entering: + $ lctl set_param obdfilter.*.sync_journal=0 +obdfilter.lol-OST0001.sync_journal=0 + An associated sync-on-lock-cancel feature (enabled by default) + addresses a data consistency issue that can result if an OSS crashes after multiple clients + have written data into intersecting regions of an object, and then one of the clients also + crashes. A condition is created in which the POSIX requirement for continuous writes is + violated along with a potential for corrupted data. With + sync-on-lock-cancel enabled, if a cancelled lock has any volatile + writes attached to it, the OSS synchronously writes the journal to disk on lock + cancellation. Disabling the sync-on-lock-cancel feature may enhance + performance for concurrent write workloads, but it is recommended that you not disable this + feature. + The sync_on_lock_cancel parameter can be set to the following + values: + + + always - Always force a journal flush on lock cancellation + (default when async_journal is enabled). + + + blocking - Force a journal flush only when the local cancellation + is due to a blocking callback. + + + never - Do not force any journal flush (default when + async_journal is disabled). + + + For example, to set sync_on_lock_cancel to not to force a journal + flush, use a command similar to: + $ lctl get_param obdfilter.*.sync_on_lock_cancel +obdfilter.lol-OST0001.sync_on_lock_cancel=never +
+
+ + <indexterm> + <primary>proc</primary> + <secondary>client metadata performance</secondary> + </indexterm> + Tuning the Client Metadata RPC Stream + + The client metadata RPC stream represents the metadata RPCs issued + in parallel by a client to a MDT target. The metadata RPCs can be split + in two categories: the requests that do not modify the file system + (like getattr operation), and the requests that do modify the file system + (like create, unlink, setattr operations). To help optimize the client + metadata RPC stream, several tuning variables are provided to adjust + behavior according to network conditions and cluster size. + Note that increasing the number of metadata RPCs issued in parallel + might improve the performance metadata intensive parallel applications, + but as a consequence it will consume more memory on the client and on + the MDS. +
+ Configuring the Client Metadata RPC Stream + The MDC max_rpcs_in_flight parameter defines + the maximum number of metadata RPCs, both modifying and + non-modifying RPCs, that can be sent in parallel by a client to a MDT + target. This includes every file system metadata operations, such as + file or directory stat, creation, unlink. The default setting is 8, + minimum setting is 1 and maximum setting is 256. + To set the max_rpcs_in_flight parameter, run + the following command on the Lustre client: + client$ lctl set_param mdc.*.max_rpcs_in_flight=16 + The MDC max_mod_rpcs_in_flight parameter + defines the maximum number of file system modifying RPCs that can be + sent in parallel by a client to a MDT target. For example, the Lustre + client sends modify RPCs when it performs file or directory creation, + unlink, access permission modification or ownership modification. The + default setting is 7, minimum setting is 1 and maximum setting is + 256. + To set the max_mod_rpcs_in_flight parameter, + run the following command on the Lustre client: + client$ lctl set_param mdc.*.max_mod_rpcs_in_flight=12 + The max_mod_rpcs_in_flight value must be + strictly less than the max_rpcs_in_flight value. + It must also be less or equal to the MDT + max_mod_rpcs_per_client value. If one of theses + conditions is not enforced, the setting fails and an explicit message + is written in the Lustre log. + The MDT max_mod_rpcs_per_client parameter is a + tunable of the kernel module mdt that defines the + maximum number of file system modifying RPCs in flight allowed per + client. The parameter can be updated at runtime, but the change is + effective to new client connections only. The default setting is 8. + + To set the max_mod_rpcs_per_client parameter, + run the following command on the MDS: + mds$ echo 12 > /sys/module/mdt/parameters/max_mod_rpcs_per_client +
+
+ Monitoring the Client Metadata RPC Stream + The rpc_stats file contains histogram data + showing information about modify metadata RPCs. It can be helpful to + identify the level of parallelism achieved by an application doing + modify metadata operations. + Example: + client$ lctl get_param mdc.*.rpc_stats +snapshot_time: 1441876896.567070 (secs.usecs) +modify_RPCs_in_flight: 0 + + modify +rpcs in flight rpcs % cum % +0: 0 0 0 +1: 56 0 0 +2: 40 0 0 +3: 70 0 0 +4 41 0 0 +5: 51 0 1 +6: 88 0 1 +7: 366 1 2 +8: 1321 5 8 +9: 3624 15 23 +10: 6482 27 50 +11: 7321 30 81 +12: 4540 18 100 + The file information includes: + + + snapshot_time - UNIX epoch instant the + file was read. - - # lctl set_param ost.OSS.ost_io.threads_max=256 - - The command output will be: - ost.OSS.ost_io.threads_max=256 - - - To check if the new threads_max setting is active, run: + + modify_RPCs_in_flight - Number of modify + RPCs issued by the MDC, but not completed at the time of the + snapshot. This value should always be less than or equal to + max_mod_rpcs_in_flight. - - + + rpcs in flight - Number of modify RPCs + that are pending when a RPC is sent, the relative percentage + (%) of total modify RPCs, and the cumulative + percentage (cum %) to that point. - - # lctl get_param ost.OSS.ost_io.threads_max - - The command output will be similar to this: - ost.OSS.ost_io.threads_max=256 - - - - - - - Note -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 threads_max value. Lustre does not stop service threads once they are started. - - - - + + If a large proportion of modify metadata RPCs are issued with a + number of pending metadata RPCs close to the + max_mod_rpcs_in_flight value, it means the + max_mod_rpcs_in_flight value could be increased to + improve the modify metadata performance.
-
- 31.3 <anchor xml:id="dbdoclet.50438271_83523" xreflabel=""/>Debug - /proc/sys/lnet/debug - 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 levelThis controls the level of Lustre debugging kept in the internal log buffer. It does not alter the level of debugging that goes to syslog. to improve performance. Raise the debug level when you need to collect the logs for debugging problems. The debugging mask can be set with "symbolic names" instead of the numerical values that were used in prior releases. The new symbolic format is shown in the examples below. - - - - +
+
+ Configuring Timeouts in a Lustre File System + In a Lustre file system, RPC timeouts are set using an adaptive timeouts mechanism, which + is enabled by default. Servers track RPC completion times and then report back to clients + estimates for completion times for future RPCs. Clients use these estimates to set RPC + timeout values. If the processing of server requests slows down for any reason, the server + estimates for RPC completion increase, and clients then revise RPC timeout values to allow + more time for RPC completion. + If the RPCs queued on the server approach the RPC timeout specified by the client, to + avoid RPC timeouts and disconnect/reconnect cycles, the server sends an "early reply" to the + client, telling the client to allow more time. Conversely, as server processing speeds up, RPC + timeout values decrease, resulting in faster detection if the server becomes non-responsive + and quicker connection to the failover partner of the server. +
+ <indexterm> + <primary>proc</primary> + <secondary>configuring adaptive timeouts</secondary> + </indexterm><indexterm> + <primary>configuring</primary> + <secondary>adaptive timeouts</secondary> + </indexterm><indexterm> + <primary>proc</primary> + <secondary>adaptive timeouts</secondary> + </indexterm>Configuring Adaptive Timeouts + The adaptive timeout parameters in the table below can be set persistently system-wide + using lctl conf_param on the MGS. For example, the following command sets + the at_max value for all servers and clients associated with the file + system + testfs:lctl conf_param testfs.sys.at_max=1500 + + Clients that access multiple Lustre file systems must use the same parameter values + for all file systems. + + + + + + - Note -All of the commands below must be run as root; note the # nomenclature. + + Parameter + + + Description + - - - - To verify the debug level used by examining the sysctl that controls debugging, run: - # sysctl lnet.debug -lnet.debug = ioctl neterror warning error emerg ha config console - - To turn off debugging (except for network error debugging), run this command on all concerned nodes: - # sysctl -w lnet.debug="neterror" -lnet.debug = neterror - - To turn off debugging completely, run this command on all concerned nodes: - # sysctl -w lnet.debug=0 -lnet.debug = 0 - - To set an appropriate debug level for a production environment, run: - # sysctl -w lnet.debug="warning dlmtrace error emerg ha rpctrace vfstrace" -lnet.debug = warning dlmtrace error emerg ha rpctrace vfstrace - - The flags above collect enough high-level information to aid debugging, but they do not cause any serious performance impact. - To clear all flags and set new ones, run: - # sysctl -w lnet.debug="warning" -lnet.debug = warning - - To add new flags to existing ones, prefix them with a "+": - # sysctl -w lnet.debug="+neterror +ha" -lnet.debug = +neterror +ha -# sysctl lnet.debug -lnet.debug = neterror warning ha - - To remove flags, prefix them with a "-": - # sysctl -w lnet.debug="-ha" -lnet.debug = -ha -# sysctl lnet.debug -lnet.debug = neterror warning - - You can verify and change the debug level using the /proc interface in Lustre. To use the flags with /proc, run: - # cat /proc/sys/lnet/debug -neterror warning -# echo "+ha" > /proc/sys/lnet/debug -# cat /proc/sys/lnet/debug -neterror warning ha -# echo "-warning" > /proc/sys/lnet/debug -# cat /proc/sys/lnet/debug -neterror ha - - /proc/sys/lnet/subsystem_debug - This controls the debug logs3 for subsystems (see S_* definitions). - /proc/sys/lnet/debug_path - This indicates the location where debugging symbols should be stored for gdb. The default is set to /r/tmp/lustre-log-localhost.localdomain. - These values can also be set via sysctl -w lnet.debug={value} - - - + - Note -The above entries only exist when Lustre has already been loaded. + + + at_min + + + Minimum adaptive timeout (in seconds). The default value is 0. The + at_min parameter is the minimum processing time that a server + will report. Ideally, at_min should be set to its default + value. Clients base their timeouts on this value, but they do not use this value + directly. + If, for unknown reasons (usually due to temporary network outages), the + adaptive timeout value is too short and clients time out their RPCs, you can + increase the at_min value to compensate for this. + + + + + + at_max + + + Maximum adaptive timeout (in seconds). The at_max parameter + is an upper-limit on the service time estimate. If at_max is + reached, an RPC request times out. + Setting at_max to 0 causes adaptive timeouts to be disabled + and a fixed timeout method to be used instead (see + + If slow hardware causes the service estimate to increase beyond the default + value of at_max, increase at_max to the + maximum time you are willing to wait for an RPC completion. + + + + + + + at_history + + + Time period (in seconds) within which adaptive timeouts remember the slowest + event that occurred. The default is 600. + + + + + + at_early_margin + + + Amount of time before the Lustre server sends an early reply (in seconds). + Default is 5. + + + + + + at_extra + + + Incremental amount of time that a server requests with each early reply (in + seconds). The server does not know how much time the RPC will take, so it asks for + a fixed value. The default is 30, which provides a balance between sending too + many early replies for the same RPC and overestimating the actual completion + time. + 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 server drops the request, and the client enters recovery + status and reconnects to restore the connection to normal status. + If you see multiple early replies for the same RPC asking for 30-second + increases, change the at_extra value to a larger number to cut + down on early replies sent and, therefore, network load. + + + + + + ldlm_enqueue_min + + + Minimum lock enqueue time (in seconds). The default is 100. The time it takes + to enqueue a lock, ldlm_enqueue, is the maximum of the measured + enqueue estimate (influenced by at_min and + at_max parameters), multiplied by a weighting factor and the + value of ldlm_enqueue_min. + Lustre Distributed Lock Manager (LDLM) lock enqueues have a dedicated minimum + value for ldlm_enqueue_min. Lock enqueue timeouts increase as + the measured enqueue times increase (similar to adaptive timeouts). + - /proc/sys/lnet/panic_on_lbug - This causes Lustre to call ''panic'' when it detects an internal problem (an LBUG); 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. - /proc/sys/lnet/upcall - This allows you to specify the path to the binary which will be invoked when an LBUG is encountered. This binary is called with four parameters. The first one is the string ''LBUG''. The second one is the file where the LBUG occurred. The third one is the function name. The fourth one is the line number in the file. -
- <anchor xml:id="dbdoclet.50438271_pgfId-1290905" xreflabel=""/>31.3.1 RPC Information for Other OBD Devices - 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. - $ find /proc/fs/lustre/ -name stats -/proc/fs/lustre/osc/lustre-OST0001-osc-ce63ca00/stats -/proc/fs/lustre/osc/lustre-OST0000-osc-ce63ca00/stats -/proc/fs/lustre/osc/lustre-OST0001-osc/stats -/proc/fs/lustre/osc/lustre-OST0000-osc/stats -/proc/fs/lustre/mdt/MDS/mds_readpage/stats -/proc/fs/lustre/mdt/MDS/mds_setattr/stats -/proc/fs/lustre/mdt/MDS/mds/stats -/proc/fs/lustre/mds/lustre-MDT0000/exports/ab206805-0630-6647-8543-d24265c9\ -1a3d/stats -/proc/fs/lustre/mds/lustre-MDT0000/exports/08ac6584-6c4a-3536-2c6d-b36cf9cb\ -daa0/stats -/proc/fs/lustre/mds/lustre-MDT0000/stats -/proc/fs/lustre/ldlm/services/ldlm_canceld/stats -/proc/fs/lustre/ldlm/services/ldlm_cbd/stats -/proc/fs/lustre/llite/lustre-ce63ca00/stats +
+ Interpreting Adaptive Timeout Information + Adaptive timeout information can be obtained from the timeouts + files in /proc/fs/lustre/*/ on each server and client using the + lctl command. To read information from a timeouts + file, enter a command similar to: + # lctl get_param -n ost.*.ost_io.timeouts +service : cur 33 worst 34 (at 1193427052, 0d0h26m40s ago) 1 1 33 2 + In this example, the ost_io service on this node is currently + reporting an estimated RPC service time of 33 seconds. The worst RPC service time was 34 + seconds, which occurred 26 minutes ago. + The output also provides a history of service times. Four "bins" of adaptive + timeout history are shown, with the maximum RPC time in each bin reported. In both the + 0-150s bin and the 150-300s bin, the maximum RPC time was 1. The 300-450s bin shows the + worst (maximum) RPC time at 33 seconds, and the 450-600s bin shows a maximum of RPC time + of 2 seconds. The estimated service time is the maximum value across the four bins (33 + seconds in this example). + Service times (as reported by the servers) are also tracked in the client OBDs, as + shown in this example: + # lctl get_param osc.*.timeouts +last reply : 1193428639, 0d0h00m00s ago +network : cur 1 worst 2 (at 1193427053, 0d0h26m26s ago) 1 1 1 1 +portal 6 : cur 33 worst 34 (at 1193427052, 0d0h26m27s ago) 33 33 33 2 +portal 28 : cur 1 worst 1 (at 1193426141, 0d0h41m38s ago) 1 1 1 1 +portal 7 : cur 1 worst 1 (at 1193426141, 0d0h41m38s ago) 1 0 1 1 +portal 17 : cur 1 worst 1 (at 1193426177, 0d0h41m02s ago) 1 0 0 1 -
- <anchor xml:id="dbdoclet.50438271_pgfId-1290921" xreflabel=""/>31.3.1.1 Interpreting OST Statistics - - - - - - Note -See also llobdstat and CollectL. - - - - - 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 llstat.pl tool: - # llstat /proc/fs/lustre/osc/lustre-OST0000-osc/stats -/usr/bin/llstat: STATS on 09/14/07 /proc/fs/lustre/osc/lustre-OST0000-osc/s\ -tats on 192.168.10.34@tcp -snapshot_time 1189732762.835363 -ost_create 1 -ost_get_info 1 -ost_connect 1 -ost_set_info 1 -obd_ping 212 + In this example, portal 6, the ost_io service portal, shows the + history of service estimates reported by the portal. + Server statistic files also show the range of estimates including min, max, sum, and + sumsq. For example: + # lctl get_param mdt.*.mdt.stats +... +req_timeout 6 samples [sec] 1 10 15 105 +... - To clear the statistics, give the -c option to llstat.pl. To specify how frequently the statistics should be cleared (in seconds), use an integer for the -i option. This is sample output with -c and -i10 options used, providing statistics every 10s): - $ llstat -c -i10 /proc/fs/lustre/ost/OSS/ost_io/stats - -/usr/bin/llstat: STATS on 06/06/07 /proc/fs/lustre/ost/OSS/ost_io/ stats on\ - 192.168.16.35@tcp -snapshot_time 1181074093.276072 - -/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074103.284895 -Name Cur.Count Cur.Rate #Events Unit \ -\last min avg max stddev -req_waittime 8 0 8 [usec] \ -2078\ 34 259.75 868 317.49 -req_qdepth 8 0 8 [reqs] 1\ \ - 0 0.12 1 0.35 -req_active 8 0 8 [reqs] 11\ \ - 1 1.38 2 0.52 -reqbuf_avail 8 0 8 [bufs] \ -511\ 63 63.88 64 0.35 -ost_write 8 0 8 [bytes] 1697677\\ - 72914 212209.62 387579 91874.29 - -/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074113.290180 -Name Cur.Count Cur.Rate #Events Unit \ -\last min avg max stddev -req_waittime 31 3 39 [usec] \ -30011\ 34 822.79 12245 2047.71 -req_qdepth 31 3 39 [reqs] 0\ \ - 0 0.03 1 0.16 -req_active 31 3 39 [reqs] 58\ \ - 1 1.77 3 0.74 -reqbuf_avail 31 3 39 [bufs] \ -1977\ 63 63.79 64 0.41 -ost_write 30 3 38 [bytes] 10284679\ -\ 15019 315325.16 910694 197776.51 - -/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074123.325560 -Name Cur.Count Cur.Rate #Events Unit \ -\last min avg max stddev -req_waittime 21 2 60 [usec] \ -14970\ 34 784.32 12245 1878.66 -req_qdepth 21 2 60 [reqs] 0\ \ - 0 0.02 1 0.13 -req_active 21 2 60 [reqs] 33\ \ - 1 1.70 3 0.70 -reqbuf_avail 21 2 60 [bufs] \ -1341\ 63 63.82 64 0.39 -ost_write 21 2 59 [bytes] 7648424\\ - 15019 332725.08 910694 180397.87 - - Where: +
+
+
+ Setting Static Timeouts<indexterm> + <primary>proc</primary> + <secondary>static timeouts</secondary> + </indexterm> + The Lustre software provides two sets of static (fixed) timeouts, LND timeouts and + Lustre timeouts, which are used when adaptive timeouts are not enabled. + + + + LND timeouts - + LND timeouts ensure that point-to-point communications across a network complete in a + finite time in the presence of failures, such as packages lost or broken connections. + LND timeout parameters are set for each individual LND. + LND timeouts are logged with the S_LND flag set. They are not + printed as console messages, so check the Lustre log for D_NETERROR + messages or enable printing of D_NETERROR messages to the console + using:lctl set_param printk=+neterror + Congested routers can be a source of spurious LND timeouts. To avoid this + situation, increase the number of LNet router buffers to reduce back-pressure and/or + increase LND timeouts on all nodes on all connected networks. Also consider increasing + the total number of LNet router nodes in the system so that the aggregate router + bandwidth matches the aggregate server bandwidth. + + + Lustre timeouts + - Lustre timeouts ensure that Lustre RPCs complete in a finite + time in the presence of failures when adaptive timeouts are not enabled. Adaptive + timeouts are enabled by default. To disable adaptive timeouts at run time, set + at_max to 0 by running on the + MGS:# lctl conf_param fsname.sys.at_max=0 + + Changing the status of adaptive timeouts at runtime may cause a transient client + timeout, recovery, and reconnection. + + Lustre timeouts are always printed as console messages. + If Lustre timeouts are not accompanied by LND timeouts, increase the Lustre + timeout on both servers and clients. Lustre timeouts are set using a command such as + the following:# lctl set_param timeout=30 + Lustre timeout parameters are described in the table below. + + + + + + + + + Parameter + Description + + + + + timeout + + The time that a client waits for a server to complete an RPC (default 100s). + Servers wait half 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 4 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 "stale." + Lustre client sends periodic 'ping' messages to servers with which + it has had no communication for the specified period of time. Any network + activity between a client and a server in the file system also serves as a + ping. + + + + ldlm_timeout + + The time that a server waits for a client to reply to an initial AST (lock + cancellation request). The 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 the + client timeout) to flush any dirty data and release the lock. + + + + fail_loc + + An internal debugging failure hook. The default value of + 0 means that no failure will be triggered or + injected. + + + + dump_on_timeout + + Triggers a dump of the Lustre debug log when a timeout occurs. The default + value of 0 (zero) means a dump of the Lustre debug log will + not be triggered. + + + + dump_on_eviction + + Triggers a dump of the Lustre debug log when an eviction occurs. The default + value of 0 (zero) means a dump of the Lustre debug log will + not be triggered. + + + + + + +
+
+
+ <indexterm> + <primary>proc</primary> + <secondary>LNet</secondary> + </indexterm><indexterm> + <primary>LNet</primary> + <secondary>proc</secondary> + </indexterm>Monitoring LNet + LNet information is located in /proc/sys/lnet in these files: + + peers - Shows all NIDs known to this node and provides + information on the queue state. + Example: + # lctl get_param peers +nid refs state max rtr min tx min queue +0@lo 1 ~rtr 0 0 0 0 0 0 +192.168.10.35@tcp 1 ~rtr 8 8 8 8 6 0 +192.168.10.36@tcp 1 ~rtr 8 8 8 8 6 0 +192.168.10.37@tcp 1 ~rtr 8 8 8 8 6 0 + The fields are explained in the table below: - - + + - Parameter - Description + + Field + + + Description + - Cur. Count - Number of events of each type sent in the last interval (in this example, 10s) - - - Cur. Rate - Number of events per second in the last interval + + + refs + + + + A reference count. + - #Events - Total number of such events since the system started + + + state + + + + If the node is a router, indicates the state of the router. Possible + values are: + + + NA - Indicates the node is not a router. + + + up/down- Indicates if the node (router) is up or + down. + + + - Unit - Unit of measurement for that statistic (microseconds, requests, buffers) + + + max + + + Maximum number of concurrent sends from this peer. + - last - Average rate of these events (in units/event) for the last interval during which they arrived. For instance, in the above mentioned case of ost_destroy it took an average of 736 microseconds per destroy for the 400 object destroys in the previous 10 seconds. + + + rtr + + + Number of routing buffer credits. + - min - Minimum rate (in units/events) since the service started + + + min + + + Minimum number of routing buffer credits seen. + - avg - Average rate + + + tx + + + Number of send credits. + - max - Maximum rate + + + min + + + Minimum number of send credits seen. + - stddev - Standard deviation (not measured in all cases) + + + queue + + + Total bytes in active/queued sends. + - The events common to all services are: + Credits are initialized to allow a certain number of operations (in the example + above the table, eight as shown in the max column. LNet keeps track + of the minimum number of credits ever seen over time showing the peak congestion that + has occurred during the time monitored. Fewer available credits indicates a more + congested resource. + The number of credits currently in flight (number of transmit credits) is shown in + the tx column. The maximum number of send credits available is shown + in the max column and never changes. The number of router buffers + available for consumption by a peer is shown in the rtr + column. + Therefore, rtr – tx is the number of transmits + in flight. Typically, rtr == max, although a configuration can be set + such that max >= rtr. The ratio of routing buffer credits to send + credits (rtr/tx) that is less than max indicates + operations are in progress. If the ratio rtr/tx is greater than + max, operations are blocking. + LNet also limits concurrent sends and number of router buffers allocated to a single + peer so that no peer can occupy all these resources. + + + nis - Shows the current queue health on this node. + Example: + # lctl get_param nis +nid refs peer max tx min +0@lo 3 0 0 0 0 +192.168.10.34@tcp 4 8 256 256 252 + + The fields are explained in the table below. - - + + - Parameter - Description + + Field + + + Description + - req_waittime - Amount of time a request waited in the queue before being handled by an available server thread. + + + nid + + + Network interface. + - req_qdepth - Number of requests waiting to be handled in the queue for this service. + + + refs + + + Internal reference counter. + - req_active - Number of requests currently being handled. + + + peer + + + Number of peer-to-peer send credits on this NID. Credits are used to size + buffer pools. + - reqbuf_avail - Number of unsolicited lnet request buffers for this service. - - - - - Some service-specific events of interest are: - - - - - - - Parameter - Description + + + max + + + Total number of send credits on this NID. + - - - ldlm_enqueue - Time it takes to enqueue a lock (this includes file open on the MDS) + + + tx + + + Current number of send credits available on this NID. + - mds_reint - Time it takes to process an MDS modification record (includes create, mkdir, unlink, rename and setattr) + + + min + + + Lowest number of send credits available on this NID. + - - - -
-
- <anchor xml:id="dbdoclet.50438271_pgfId-1291461" xreflabel=""/>31.3.1.2 Interpreting MDT Statistics - - - - - Note -See also llobdstat and CollectL. + + + queue + + + Total bytes in active/queued sends. + - The MDT .../stats files can be used to track MDT statistics for the MDS. Here is sample output for an MDT stats file: - # cat /proc/fs/lustre/mds/*-MDT0000/stats -snapshot_time 1244832003.676892 secs.usecs -open 2 samples [reqs] -close 1 samples [reqs] -getxattr 3 samples [reqs] -process_config 1 samples [reqs] -connect 2 samples [reqs] -disconnect 2 samples [reqs] -statfs 3 samples [reqs] -setattr 1 samples [reqs] -getattr 3 samples [reqs] -llog_init 6 samples [reqs] -notify 16 samples [reqs] + Analysis: + Subtracting max from tx + (max - tx) yields the number of sends currently + active. A large or increasing number of active sends may indicate a problem. + + +
+
+ <indexterm> + <primary>proc</primary> + <secondary>free space</secondary> + </indexterm>Allocating Free Space on OSTs + Free space is allocated using either a round-robin or a weighted algorithm. The allocation + method is determined by the maximum amount of free-space imbalance between the OSTs. When free + space is relatively balanced across OSTs, the faster round-robin allocator is used, which + maximizes network balancing. The weighted allocator is used when any two OSTs are out of + balance by more than a specified threshold. + Free space distribution can be tuned using these two /proc + tunables: + + + qos_threshold_rr - The threshold at which the allocation method + switches from round-robin to weighted is set in this file. The default is to switch to the + weighted algorithm when any two OSTs are out of balance by more than 17 percent. + + + qos_prio_free - The weighting priority used by the weighted + allocator can be adjusted in this file. Increasing the value of + qos_prio_free puts more weighting on the amount of free space + available on each OST and less on how stripes are distributed across OSTs. The default + value is 91 percent. When the free space priority is set to 100, weighting is based + entirely on free space and location is no longer used by the striping algorithm. + + + reserved_mb_low - The low watermark used to stop + object allocation if available space is less than it. The default is 0.1 percent of total + OST size. + + + reserved_mb_high - The high watermark used to start + object allocation if available space is more than it. The default is 0.2 percent of total + OST size. + + + For more information about monitoring and managing free space, see . +
+
+ <indexterm> + <primary>proc</primary> + <secondary>locking</secondary> + </indexterm>Configuring Locking + The lru_size parameter is used to control the number of client-side + locks in an LRU cached locks queue. LRU size is dynamic, based on load to optimize the number + of locks available to nodes that have different workloads (e.g., login/build nodes vs. compute + nodes vs. backup nodes). + The total number of locks available is a function of the server RAM. The default limit is + 50 locks/1 MB of RAM. If memory pressure is too high, the LRU size is shrunk. The number of + locks on the server is limited to the number of OSTs per + server * the number of clients * the value of the + lru_size + setting on the client as follows: + + + To enable automatic LRU sizing, set the lru_size parameter to 0. In + this case, the lru_size parameter shows the current number of locks + being used on the export. LRU sizing is enabled by default. + + + To specify a maximum number of locks, set the lru_size parameter to + a value other than zero but, normally, less than 100 * number of + CPUs in client. It is recommended that you only increase the LRU size on a + few login nodes where users access the file system interactively. + + + To clear the LRU on a single client, and, as a result, flush client cache without changing + the lru_size value, run: + $ lctl set_param ldlm.namespaces.osc_name|mdc_name.lru_size=clear + If the LRU size is set to be less than the number of existing unused locks, the unused + locks are canceled immediately. Use echo clear to cancel all locks without + changing the value. + + The lru_size parameter can only be set temporarily using + lctl set_param; it cannot be set permanently. + + To disable LRU sizing, on the Lustre clients, run: + $ lctl set_param ldlm.namespaces.*osc*.lru_size=$((NR_CPU*100)) + Replace NR_CPU with the number of CPUs on + the node. + To determine the number of locks being granted, run: + $ lctl get_param ldlm.namespaces.*.pool.limit +
+
+ <indexterm> + <primary>proc</primary> + <secondary>thread counts</secondary> + </indexterm>Setting MDS and OSS Thread Counts + MDS and OSS thread counts tunable can be used to set the minimum and maximum thread counts + or get the current number of running threads for the services listed in the table + below. + + + + + + + + + Service + + + + Description + + + + + mds.MDS.mdt + + + Main metadata operations service + + + + + mds.MDS.mdt_readpage + + + Metadata readdir service + + + + + mds.MDS.mdt_setattr + + + Metadata setattr/close operations service + + + + + ost.OSS.ost + + + Main data operations service + + + + + ost.OSS.ost_io + + + Bulk data I/O services + + + + + ost.OSS.ost_create + + + OST object pre-creation service + + + + + ldlm.services.ldlm_canceld + + + DLM lock cancel service + + + + + ldlm.services.ldlm_cbd + + + DLM lock grant service + + + + + + For each service, an entry as shown below is + created:/proc/fs/lustre/service/*/threads_min|max|started + + + To temporarily set this tunable, run: + # lctl get|set_param service.threads_min|max|started + + + To permanently set this tunable, run: + # lctl conf_param obdname|fsname.obdtype.threads_min|max|started + For version 2.5 or later, run: + # lctl set_param -P service.threads_min|max|started + + + The following examples show how to set thread counts and get the number of running threads + for the service ost_io using the tunable + service.threads_min|max|started. + + + To get the number of running threads, run: + # lctl get_param ost.OSS.ost_io.threads_started +ost.OSS.ost_io.threads_started=128 + + + To set the number of threads to the maximum value (512), run: + # lctl get_param ost.OSS.ost_io.threads_max +ost.OSS.ost_io.threads_max=512 + + + To set the maximum thread count to 256 instead of 512 (to avoid overloading the + storage or for an array with requests), run: + # lctl set_param ost.OSS.ost_io.threads_max=256 +ost.OSS.ost_io.threads_max=256 + + + To set the maximum thread count to 256 instead of 512 permanently, run: + # lctl conf_param testfs.ost.ost_io.threads_max=256 + For version 2.5 or later, run: + # lctl set_param -P ost.OSS.ost_io.threads_max=256 +ost.OSS.ost_io.threads_max=256 + + + To check if the threads_max setting is active, run: + # lctl get_param ost.OSS.ost_io.threads_max +ost.OSS.ost_io.threads_max=256 + + + + If the number of service threads is changed while the file system is running, the change + may not take effect until the file system is stopped and rest. If the number of service + threads in use exceeds the new threads_max value setting, service threads + that are already running will not be stopped. + + See also +
+
+ <indexterm> + <primary>proc</primary> + <secondary>debug</secondary> + </indexterm>Enabling and Interpreting Debugging Logs + By default, a detailed log of all operations is generated to aid in debugging. Flags that + control debugging are found in /proc/sys/lnet/debug. + The overhead of debugging can affect the performance of Lustre file system. Therefore, to + minimize the impact on performance, the debug level can be lowered, which affects the amount + of debugging information kept in the internal log buffer but does not alter the amount of + information to goes into syslog. You can raise the debug level when you need to collect logs + to debug problems. + The debugging mask can be set using "symbolic names". The symbolic format is + shown in the examples below. + + To verify the debug level used, examine the sysctl that controls + debugging by running: + # sysctl lnet.debug +lnet.debug = ioctl neterror warning error emerg ha config console + + + To turn off debugging (except for network error debugging), run the following + command on all nodes concerned: + # sysctl -w lnet.debug="neterror" +lnet.debug = neterror + + + + To turn off debugging completely, run the following command on all nodes + concerned: + # sysctl -w lnet.debug=0 +lnet.debug = 0 + + + To set an appropriate debug level for a production environment, run: + # sysctl -w lnet.debug="warning dlmtrace error emerg ha rpctrace vfstrace" +lnet.debug = warning dlmtrace error emerg ha rpctrace vfstrace + The flags shown in this example collect enough high-level information to aid + debugging, but they do not cause any serious performance impact. + + + + To clear all flags and set new flags, run: + # sysctl -w lnet.debug="warning" +lnet.debug = warning + + + + To add new flags to flags that have already been set, precede each one with a + "+": + # sysctl -w lnet.debug="+neterror +ha" +lnet.debug = +neterror +ha +# sysctl lnet.debug +lnet.debug = neterror warning ha + + + To remove individual flags, precede them with a + "-": + # sysctl -w lnet.debug="-ha" +lnet.debug = -ha +# sysctl lnet.debug +lnet.debug = neterror warning + + + To verify or change the debug level, run commands such as the following: : + # lctl get_param debug +debug= +neterror warning +# lctl set_param debug=+ha +# lctl get_param debug +debug= +neterror warning ha +# lctl set_param debug=-warning +# lctl get_param debug +debug= +neterror ha + + + Debugging parameters include: + + + subsystem_debug - Controls the debug logs for subsystems. + + + debug_path - Indicates the location where the debug log is dumped + when triggered automatically or manually. The default path is + /tmp/lustre-log. + + + These parameters are also set using:sysctl -w lnet.debug={value} + Additional useful parameters: + + panic_on_lbug - Causes ''panic'' to be called + when the Lustre software detects an internal problem (an LBUG log + entry); 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 the Lustre software. + + + upcall - Allows you to specify the path to the binary which will + be invoked when an LBUG log entry is encountered. This binary is + called with four parameters: + - The string ''LBUG''. + - The file where the LBUG occurred. + - The function name. + - The line number in the file + + +
+ Interpreting OST Statistics + + See also (llobdstat) and + (collectl). + + OST stats files can be used to provide statistics showing activity + for each OST. For example: + # lctl get_param osc.testfs-OST0000-osc.stats +snapshot_time 1189732762.835363 +ost_create 1 +ost_get_info 1 +ost_connect 1 +ost_set_info 1 +obd_ping 212 + Use the llstat utility to monitor statistics over time. + To clear the statistics, use the -c option to + llstat. To specify how frequently the statistics should be reported (in + seconds), use the -i option. In the example below, the + -c option clears the statistics and -i10 option + reports statistics every 10 seconds: + $ llstat -c -i10 /proc/fs/lustre/ost/OSS/ost_io/stats + +/usr/bin/llstat: STATS on 06/06/07 + /proc/fs/lustre/ost/OSS/ost_io/ stats on 192.168.16.35@tcp +snapshot_time 1181074093.276072 + +/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074103.284895 +Name Cur. Cur. # + Count Rate Events Unit last min avg max stddev +req_waittime 8 0 8 [usec] 2078 34 259.75 868 317.49 +req_qdepth 8 0 8 [reqs] 1 0 0.12 1 0.35 +req_active 8 0 8 [reqs] 11 1 1.38 2 0.52 +reqbuf_avail 8 0 8 [bufs] 511 63 63.88 64 0.35 +ost_write 8 0 8 [bytes] 169767 72914 212209.62 387579 91874.29 + +/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074113.290180 +Name Cur. Cur. # + Count Rate Events Unit last min avg max stddev +req_waittime 31 3 39 [usec] 30011 34 822.79 12245 2047.71 +req_qdepth 31 3 39 [reqs] 0 0 0.03 1 0.16 +req_active 31 3 39 [reqs] 58 1 1.77 3 0.74 +reqbuf_avail 31 3 39 [bufs] 1977 63 63.79 64 0.41 +ost_write 30 3 38 [bytes] 1028467 15019 315325.16 910694 197776.51 + +/proc/fs/lustre/ost/OSS/ost_io/stats @ 1181074123.325560 +Name Cur. Cur. # + Count Rate Events Unit last min avg max stddev +req_waittime 21 2 60 [usec] 14970 34 784.32 12245 1878.66 +req_qdepth 21 2 60 [reqs] 0 0 0.02 1 0.13 +req_active 21 2 60 [reqs] 33 1 1.70 3 0.70 +reqbuf_avail 21 2 60 [bufs] 1341 63 63.82 64 0.39 +ost_write 21 2 59 [bytes] 7648424 15019 332725.08 910694 180397.87 - - - - - - - - - - - - - Lustre 2.0 Operations Manual - 821-2076-10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Copyright © 2011, Oracle and/or its affiliates. All rights reserved. -
-
+ The columns in this example are described in the table below. + + + + + + + + Parameter + + + Description + + + + + + Name + Name of the service event. See the tables below for descriptions of service + events that are tracked. + + + + + Cur. Count + + + Number of events of each type sent in the last interval. + + + + + + Cur. Rate + + + Number of events per second in the last interval. + + + + + + # Events + + + Total number of such events since the events have been cleared. + + + + + + Unit + + + Unit of measurement for that statistic (microseconds, requests, + buffers). + + + + + + last + + + Average rate of these events (in units/event) for the last interval during + which they arrived. For instance, in the above mentioned case of + ost_destroy it took an average of 736 microseconds per + destroy for the 400 object destroys in the previous 10 seconds. + + + + + + min + + + Minimum rate (in units/events) since the service started. + + + + + + avg + + + Average rate. + + + + + + max + + + Maximum rate. + + + + + + stddev + + + Standard deviation (not measured in some cases) + + + + + + Events common to all services are shown in the table below. + + + + + + + + Parameter + + + Description + + + + + + + + req_waittime + + + Amount of time a request waited in the queue before being handled by an + available server thread. + + + + + + req_qdepth + + + Number of requests waiting to be handled in the queue for this service. + + + + + + req_active + + + Number of requests currently being handled. + + + + + + reqbuf_avail + + + Number of unsolicited lnet request buffers for this service. + + + + + + Some service-specific events of interest are described in the table below. + + + + + + + + Parameter + + + Description + + + + + + + + ldlm_enqueue + + + Time it takes to enqueue a lock (this includes file open on the MDS) + + + + + + mds_reint + + + Time it takes to process an MDS modification record (includes + create, mkdir, unlink, + rename and setattr) + + + + + +
+
+ Interpreting MDT Statistics + + See also (llobdstat) and + (collectl). + + MDT stats files can be used to track MDT + statistics for the MDS. The example below shows sample output from an + MDT stats file. + # lctl get_param mds.*-MDT0000.stats +snapshot_time 1244832003.676892 secs.usecs +open 2 samples [reqs] +close 1 samples [reqs] +getxattr 3 samples [reqs] +process_config 1 samples [reqs] +connect 2 samples [reqs] +disconnect 2 samples [reqs] +statfs 3 samples [reqs] +setattr 1 samples [reqs] +getattr 3 samples [reqs] +llog_init 6 samples [reqs] +notify 16 samples [reqs]
-
+