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

readahead page count calculation is incorrect for unaligned reads

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • Lustre 2.13.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      While looking at at 47K strided read workload, I noticed that there were a lot of 1 page read RPCs, roughly half as many as the larger RPCs:

      read write
      pages per rpc rpcs % cum % | rpcs % cum %
      1: 12 35 35 | 0 0 0
      2: 0 0 35 | 0 0 0
      4: 0 0 35 | 0 0 0
      8: 0 0 35 | 0 0 0
      16: 22 64 100 | 0 0 0

      read write
      rpcs in flight rpcs % cum % | rpcs % cum %
      0: 0 0 0 | 0 0 0
      1: 34 100 100 | 0 0 0

       

      I dug in to this, and I eventually figured out that when a read is unaligned on both the first and last page, the length calculation used to determine the count of pages for readahead is incorrect.  A 47K read is 12 pages in length, but when it is unaligned at start and end, the total page count is 13 pages.

       

      The fix is pretty simple, and the 1 page RPCs disappear from the workload.

      This should significantly increase performance for unaligned read workloads of this type.  I'll try to get some benchmarks to include in the patch.

      Attachments

        Issue Links

          Activity

            [LU-12367] readahead page count calculation is incorrect for unaligned reads

            Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35015/
            Subject: LU-12367 llite: Fix page count for unaligned reads
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: d4a54de84c0554a21b215621b4df5fdd93e38f74

            gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35015/ Subject: LU-12367 llite: Fix page count for unaligned reads Project: fs/lustre-release Branch: master Current Patch Set: Commit: d4a54de84c0554a21b215621b4df5fdd93e38f74

            Shilong is doing a large scale fix of strided readahead under LU-12644.

            pfarrell Patrick Farrell (Inactive) added a comment - Shilong is doing a large scale fix of strided readahead under LU-12644 .

            Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35109
            Subject: LU-12367 llite: Disable strided readahead
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 511c58e1222c89db179db43d962f704c8b51a220

            gerrit Gerrit Updater added a comment - Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35109 Subject: LU-12367 llite: Disable strided readahead Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 511c58e1222c89db179db43d962f704c8b51a220

            Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35015
            Subject: LU-12367 llite: Fix page count for unaligned reads
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 7af46dfb50f22becd566e897ca28be4594e87cd9

            gerrit Gerrit Updater added a comment - Patrick Farrell (pfarrell@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/35015 Subject: LU-12367 llite: Fix page count for unaligned reads Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 7af46dfb50f22becd566e897ca28be4594e87cd9

            People

              pfarrell Patrick Farrell (Inactive)
              pfarrell Patrick Farrell (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: