[LU-8150] Track creates in MDS stats Created: 16/May/16  Updated: 22/Nov/16  Resolved: 22/Jun/16

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.8.0
Fix Version/s: Lustre 2.9.0

Type: Bug Priority: Minor
Reporter: Matt Ezell Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-8335 Interop - b2_8<->master : sanity test... Closed
Severity: 3
Rank (Obsolete): 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.



 Comments   
Comment by Gerrit Updater [ 16/May/16 ]

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

Comment by Matt Ezell [ 16/May/16 ]

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]
Comment by Andreas Dilger [ 17/May/16 ]

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.

Comment by Gerrit Updater [ 22/Jun/16 ]

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

Comment by Joseph Gmitter (Inactive) [ 22/Jun/16 ]

Landed to master for 2.9.0

Generated at Sat Feb 10 02:15:05 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.