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

Add support for statahead pattern with regularized file name

Details

    • 9223372036854775807

    Description

      Some applications do stat() calls under a directory within which all the children files have regularized file name:

      • mdtest benchmark: mdtest.$i
      • du more than 10000 entries: file.$i
      • ML/AI with ingested data that have typically a rule of filename in the directory.

      These applications call stat() on the files in the Alphabetic sorting order of the file name.

      This kind of metadata operations can not be optimized by current statahead mechanism.
      The current statahead mechanism works as follows:
      1. Open the directory via opendir() call. It will authorize the statahead.
      2. readdir() to get the name and inode number for the dentries.
      3. do stat() on the dentries one by one.
      4. Close the directory which will deauthorize the statahead.

      In current statahead mechanism, the stat() calls in the order of populate the dentries via readdir(). For the ldiskfs backend, it is ordering by the hash of the file name, not a kinds fo sorting oder.

      However, we can improve the statahead to support statahead pattern with regularized file name to optimize the metadata performance for the above applications

      Attachments

        Issue Links

          Activity

            [LU-14361] Add support for statahead pattern with regularized file name

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51592/
            Subject: LU-14361 statahead: add tunable for fname pattern detection
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f4bf36d8f4957b62e4edab58b971829dccedd0c0

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51592/ Subject: LU-14361 statahead: add tunable for fname pattern detection Project: fs/lustre-release Branch: master Current Patch Set: Commit: f4bf36d8f4957b62e4edab58b971829dccedd0c0

            Two patches still to be landed for this ticket to be completed:

            but the second fix patch should be merged into the first patch to avoid crashes during testing that have so far prevented the patch from landing.

            adilger Andreas Dilger added a comment - Two patches still to be landed for this ticket to be completed: https://review.whamcloud.com/51592 " LU-14361 statahead: add tunable for fname pattern detection " https://review.whamcloud.com/55850 " LU-14361 statahead: wait all inuse statahead done during umount " but the second fix patch should be merged into the first patch to avoid crashes during testing that have so far prevented the patch from landing.

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55850
            Subject: LU-14361 statahead: wait all inuse statahead done during umount
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 4ea4a1a754536678dda492c7b56257d0641011bc

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/55850 Subject: LU-14361 statahead: wait all inuse statahead done during umount Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 4ea4a1a754536678dda492c7b56257d0641011bc

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49291/
            Subject: LU-14361 statahead: wait inuse entry finished during cleanup
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d22c78fde8d75aecb6f712fd51bc4843a517cad4

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/49291/ Subject: LU-14361 statahead: wait inuse entry finished during cleanup Project: fs/lustre-release Branch: master Current Patch Set: Commit: d22c78fde8d75aecb6f712fd51bc4843a517cad4

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48954/
            Subject: LU-14361 statahead: add support for mdtest shared dir workload
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 629b0534e141be289d2e4c763fcd141af4acd3d2

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/48954/ Subject: LU-14361 statahead: add support for mdtest shared dir workload Project: fs/lustre-release Branch: master Current Patch Set: Commit: 629b0534e141be289d2e4c763fcd141af4acd3d2

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51587/
            Subject: LU-14361 statahead: return ENOENT for batched statahead
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 1b7ea3444bf877b4f000c413de1f5473ddf56689

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51587/ Subject: LU-14361 statahead: return ENOENT for batched statahead Project: fs/lustre-release Branch: master Current Patch Set: Commit: 1b7ea3444bf877b4f000c413de1f5473ddf56689

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/54275/
            Subject: LU-14361 statahead: add connect flag check for batch RPC
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: fd4c531bbb2af5357d55301801c47ae6b979e5dd

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/54275/ Subject: LU-14361 statahead: add connect flag check for batch RPC Project: fs/lustre-release Branch: master Current Patch Set: Commit: fd4c531bbb2af5357d55301801c47ae6b979e5dd

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/54275
            Subject: LU-14361 statahead: add connect flag check for batch RPC
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 02dadd578a35dff47f107b3c9229ffe6b6b9d336

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/54275 Subject: LU-14361 statahead: add connect flag check for batch RPC Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 02dadd578a35dff47f107b3c9229ffe6b6b9d336

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53634/
            Subject: LU-14361 statahead: increase the initial statahead count
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 76ff18798974b15c4a171dbb76a1077623a66d8a

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/53634/ Subject: LU-14361 statahead: increase the initial statahead count Project: fs/lustre-release Branch: master Current Patch Set: Commit: 76ff18798974b15c4a171dbb76a1077623a66d8a

            "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53634
            Subject: LU-14361 statahead: increase the initial statahead count
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: dd6b7c0f476085c0cbe0c0a4c05710e1205b5d25

            gerrit Gerrit Updater added a comment - "Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/53634 Subject: LU-14361 statahead: increase the initial statahead count Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: dd6b7c0f476085c0cbe0c0a4c05710e1205b5d25
            qian_wc Qian Yingjin added a comment -

            The reason for these failures may be that @sbi->ll_sa_min is too small, the default value is 

            #define LL_SA_REQ_MIN_DEF 8,

            it results in the stat-ahead is not so aggressive, too low hit rate and quit wrongly...

            Increasing this value in sanity/123i should fix the failure. 

             

            I will make a patch later.

            qian_wc Qian Yingjin added a comment - The reason for these failures may be that @sbi->ll_sa_min is too small, the default value is  #define LL_SA_REQ_MIN_DEF 8, it results in the stat-ahead is not so aggressive, too low hit rate and quit wrongly... Increasing this value in sanity/123i should fix the failure.    I will make a patch later.

            People

              qian_wc Qian Yingjin
              qian_wc Qian Yingjin
              Votes:
              0 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: