[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: |
|
||||||||
| 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 |
| 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/ |
| Comment by Joseph Gmitter (Inactive) [ 22/Jun/16 ] |
|
Landed to master for 2.9.0 |