[LU-11672] improving lru_max_age policy when lru resize is disabled Created: 15/Nov/18 Updated: 09/Jun/20 Resolved: 21/Jul/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.13.0, Lustre 2.12.3 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Shuichi Ihara | Assignee: | Gu Zheng (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
2.11.56 |
||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
currently lru_max_age only works when lru is enabled. applied https://review.whamcloud.com/33371 otherwise we can't contorl number of locks correclty # lctl set_param ldlm.namespaces.*.lru_max_age=60000 # lctl get_param ldlm.namespaces.*.lock_count ldlm.namespaces.MGC10.0.11.78@o2ib10.lock_count=4 ldlm.namespaces.fls-MDT0000-mdc-ffff8cd7f7b25800.lock_count=1 ldlm.namespaces.fls-OST0000-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0001-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0002-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0003-osc-ffff8cd7f7b25800.lock_count=0 # ls -lR /fls/ost0/ # lctl get_param ldlm.namespaces.*.lock_count ldlm.namespaces.MGC10.0.11.78@o2ib10.lock_count=4 ldlm.namespaces.fls-MDT0000-mdc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0000-osc-ffff8cd7f7b25800.lock_count=3199 ldlm.namespaces.fls-OST0001-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0002-osc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0003-osc-ffff8cd7f7b25800.lock_count=0 wait 120 sec # lctl get_param ldlm.namespaces.*.lock_count ldlm.namespaces.MGC10.0.11.78@o2ib10.lock_count=4 ldlm.namespaces.fls-MDT0000-mdc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0000-osc-ffff8cd7f7b25800.lock_count=3199 ldlm.namespaces.fls-OST0001-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0002-osc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0003-osc-ffff8cd7f7b25800.lock_count=0 no cancel locks even time exceeds more than lru_max_age, but cancel when client access an file. # ls -l /fls/ost0/o0/d110838 -rw-r--r-- 1 root root 67108864 Oct 22 13:51 /fls/ost0/o0/d110838 # lctl get_param ldlm.namespaces.*.lock_count ldlm.namespaces.MGC10.0.11.78@o2ib10.lock_count=4 ldlm.namespaces.fls-MDT0000-mdc-ffff8cd7f7b25800.lock_count=2072 ldlm.namespaces.fls-OST0000-osc-ffff8cd7f7b25800.lock_count=2792 ldlm.namespaces.fls-OST0001-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0002-osc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0003-osc-ffff8cd7f7b25800.lock_count=0 # ls -l /fls/ost0/o0/d111531 -rw-r--r-- 1 root root 67108864 Oct 22 13:53 /fls/ost0/o0/d111531 # lctl get_param ldlm.namespaces.*.lock_count ldlm.namespaces.MGC10.0.11.78@o2ib10.lock_count=4 ldlm.namespaces.fls-MDT0000-mdc-ffff8cd7f7b25800.lock_count=1696 ldlm.namespaces.fls-OST0000-osc-ffff8cd7f7b25800.lock_count=2385 ldlm.namespaces.fls-OST0001-osc-ffff8cd7f7b25800.lock_count=0 ldlm.namespaces.fls-OST0002-osc-ffff8cd7f7b25800.lock_count=3200 ldlm.namespaces.fls-OST0003-osc-ffff8cd7f7b25800.lock_count=0 lru_max_age should behave same as enabling lru resize. at the end, regardless enabling or disabling lru resize meaning once it gets lru_max_age, locks need to be cancelled At the end, lru_size is like hard limit of number of locks, but still cancel locks by lru_max_age. |
| Comments |
| Comment by Andreas Dilger [ 15/Nov/18 ] |
|
I agree - I didn't even know that this was the case, and I expect that making this change is fairly easy. On a related note, it is possible since 2.9 or so to use "lru_max_age=20s" so that the units are seconds. |
| Comment by Gerrit Updater [ 11/Jul/19 ] |
|
Gu Zheng (gzheng@ddn.com) uploaded a new patch: https://review.whamcloud.com/35467 |
| Comment by Gerrit Updater [ 20/Jul/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35467/ |
| Comment by Peter Jones [ 21/Jul/19 ] |
|
Landed for 2.13 |
| Comment by Gerrit Updater [ 01/Aug/19 ] |
|
Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35660 |
| Comment by Gerrit Updater [ 11/Aug/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35660/ |