Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-11672

improving lru_max_age policy when lru resize is disabled

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Lustre 2.13.0, Lustre 2.12.3
    • Labels:
      None
    • Environment:
      2.11.56
    • 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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                guzheng Gu Zheng (Inactive)
                Reporter:
                sihara Shuichi Ihara
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: