[LU-17239] statahead to detect and fetch xattrs Created: 28/Oct/23 Updated: 28/Oct/23 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.14.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Andreas Dilger | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
I was running "ls" on a directory and checked "{{mds. - job_id: ls.0
snapshot_time: 1698469885
close: { samples: 1, unit: usecs, min: 69, max: 69, sum: 69, sumsq: 4761 }
getattr: { samples: 1, unit: usecs, min: 9, max: 9, sum: 9, sumsq: 81 }
getxattr: { samples: 24199, unit: usecs, min: 3, max: 31, sum: 121306, sumsq: 639108 }
- job_id: ll_sa_350160.0
snapshot_time: 1698469885
getattr: { samples: 24199, unit: usecs, min: 4, max: 969, sum: 218406, sumsq: 24834274 }
The "ls" was calling getxattr() and lgetxattr() on each of the files: statx(AT_FDCWD, "/myth/tv/2005_20171130055700.mpg.png", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_SIZE, {stx_mask=STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_SIZE, stx_attributes=0, stx_mode=S_IFREG|0666, stx_size=270222, ...}) = 0
lgetxattr("/myth/tv/2005_20171130055700.mpg.png", "security.selinux", "system_u:object_r:httpd_sys_cont"..., 255) = 41
getxattr("/myth/tv/2005_20171130055700.mpg.png", "system.posix_acl_access", NULL, 0) = -1 ENODATA (No data available)
In some cases, the xattrs will be fetched along with the inode attributes, but if there are a lot of MDS_GETXATTR RPCs being sent for cache misses, then the statahead threads should also prefetch these xattrs to the client. |