From: Andreas Dilger Date: Fri, 19 Oct 2018 22:45:34 +0000 (-0600) Subject: LU-8541 ldlm: describe lru_max_age better X-Git-Tag: 2.12.0~10 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=58e196f6c0e20bd70231e18171902dc42a4a1850;p=doc%2Fmanual.git LU-8541 ldlm: describe lru_max_age better Add a descripton of the LDLM lru_max_age parameter, including the (new in 2.11) ability to specify a suffix of "s" to indicate the units are in seconds. Improve the description and formatting of lru_size as well. Signed-off-by: Andreas Dilger Change-Id: I70d1193cb5096dd1139ba85d45ab26566209c2ff Reviewed-on: https://review.whamcloud.com/33406 Reviewed-by: James Simmons Reviewed-by: Joseph Gmitter Tested-by: Jenkins --- diff --git a/LustreProc.xml b/LustreProc.xml index 0148d04..95cb9a3 100644 --- a/LustreProc.xml +++ b/LustreProc.xml @@ -2287,46 +2287,71 @@ nid refs peer max tx min proc locking 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: + The lru_size parameter is used to control the + number of client-side locks in the LRU cached locks queue. LRU size is + normally dynamic, based on load to optimize the number of locks cached + on 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 + num_osts_per_oss * num_clients * lru_size + 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 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 client. Dynamic LRU resizing 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 specify a maximum number of locks, set the + lru_size parameter to a value other than zero. + A good default value for compute nodes is around + 100 * num_cpus. + It is recommended that you only set lru_size + to be signifivantly larger on a few login nodes where multiple + 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. + 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 lower than the number of existing locks, + unused locks are canceled immediately. Use + 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. + 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: + To disable dynamic LRU resizing on the clients, run for example: + + # lctl set_param ldlm.namespaces.*osc*.lru_size=5000 + To determine the number of locks being granted with dynamic LRU + resizing, run: $ lctl get_param ldlm.namespaces.*.pool.limit + The lru_max_age parameter is used to control the + age of client-side locks in the LRU cached locks queue. This limits how + long unused locks are cached on the client, and avoids idle clients from + holding locks for an excessive time, which reduces memory usage on both + the client and server, as well as reducing work during server recovery. + + The lru_max_age is set and printed in milliseconds, + and by default is 3900000 ms (65 minutes). + Since Lustre 2.11, in addition to setting the + maximum lock age in milliseconds, it can also be set using a suffix of + s or ms to indicate seconds or + milliseconds, respectively. For example to set the client's maximum + lock age to 15 minutes (900s) run: + + +# lctl set_param ldlm.namespaces.*MDT*.lru_max_age=900s +# lctl get_param ldlm.namespaces.*MDT*.lru_max_age +ldlm.namespaces.myth-MDT0000-mdc-ffff8804296c2800.lru_max_age=900000 +
<indexterm>