Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.9.0
    • Lustre 2.8.0
    • 3
    • 9223372036854775807

    Description

      File creates are not tracked on the MDS in the md_stats file:

      # lctl set_param mdt.*.md_stats=clear
      mdt.lustre-MDT0000.md_stats=clear
      # touch /mnt/lustre/newfile1
      # lctl get_param mdt.*.md_stats
      mdt.lustre-MDT0000.md_stats=
      snapshot_time             1463430465.508409 secs.usecs
      open                      1 samples [reqs]
      close                     1 samples [reqs]
      getattr                   1 samples [reqs]
      setattr                   1 samples [reqs]
      getxattr                  1 samples [reqs]
      setxattr                  1 samples [reqs]
      

      If you call mknod() with S_IFREG to create a file, it is tracked as a mknod. Most file creates are from open with create intent.

      Attachments

        Issue Links

          Activity

            [LU-8150] Track creates in MDS stats

            Landed to master for 2.9.0

            jgmitter Joseph Gmitter (Inactive) added a comment - Landed to master for 2.9.0

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20246/
            Subject: LU-8150 mdt: Track open+create as mknod
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 6c2bbc022832087f2ff0f65d83e3b0a460e45911

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/20246/ Subject: LU-8150 mdt: Track open+create as mknod Project: fs/lustre-release Branch: master Current Patch Set: Commit: 6c2bbc022832087f2ff0f65d83e3b0a460e45911

            This also needs an update to the Lustre User Manual, in the LustreMonitoring.xml file for JobID stats (search for "getxattr").

            The other question that Oleg and I were discussing is whether there should be an equivalent change on the mdc and/or llite stats to distinguish between open and create stats? This can be checked after the client got the reply to see if the new inode was created, either by comparing the before and after FIDs (same FID == create new file, different FID == open existing file), or checking the reply disposition for DISP_OPEN_CREATE.

            adilger Andreas Dilger added a comment - This also needs an update to the Lustre User Manual, in the LustreMonitoring.xml file for JobID stats (search for "getxattr"). The other question that Oleg and I were discussing is whether there should be an equivalent change on the mdc and/or llite stats to distinguish between open and create stats? This can be checked after the client got the reply to see if the new inode was created, either by comparing the before and after FIDs (same FID == create new file, different FID == open existing file), or checking the reply disposition for DISP_OPEN_CREATE .
            ezell Matt Ezell added a comment -

            With the patch I just uploaded, open with create intent is now tallied as a mknod. I chose this route instead of adding a new stat bucket for create to minimize the impact on tools that parse md_stats and job_stats.

            Previous test case after patch:

            # lctl set_param mdt.*.md_stats=clear
            mdt.lustre-MDT0000.md_stats=clear
            # touch /mnt/lustre/newfile2
            # lctl get_param mdt.*.md_stats
            mdt.lustre-MDT0000.md_stats=
            snapshot_time             1463431661.429641 secs.usecs
            open                      1 samples [reqs]
            close                     1 samples [reqs]
            mknod                     1 samples [reqs]
            getattr                   1 samples [reqs]
            setattr                   1 samples [reqs]
            getxattr                  1 samples [reqs]
            setxattr                  1 samples [reqs]
            
            ezell Matt Ezell added a comment - With the patch I just uploaded, open with create intent is now tallied as a mknod. I chose this route instead of adding a new stat bucket for create to minimize the impact on tools that parse md_stats and job_stats. Previous test case after patch: # lctl set_param mdt.*.md_stats=clear mdt.lustre-MDT0000.md_stats=clear # touch /mnt/lustre/newfile2 # lctl get_param mdt.*.md_stats mdt.lustre-MDT0000.md_stats= snapshot_time 1463431661.429641 secs.usecs open 1 samples [reqs] close 1 samples [reqs] mknod 1 samples [reqs] getattr 1 samples [reqs] setattr 1 samples [reqs] getxattr 1 samples [reqs] setxattr 1 samples [reqs]

            Matt Ezell (ezellma@ornl.gov) uploaded a new patch: http://review.whamcloud.com/20246
            Subject: LU-8150 mdt: Track open+create as mknod
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 353fcf21eff5c8560ea7f301e7fafd28516ad63f

            gerrit Gerrit Updater added a comment - Matt Ezell (ezellma@ornl.gov) uploaded a new patch: http://review.whamcloud.com/20246 Subject: LU-8150 mdt: Track open+create as mknod Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 353fcf21eff5c8560ea7f301e7fafd28516ad63f

            People

              bogl Bob Glossman (Inactive)
              ezell Matt Ezell
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: