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

statahead to detect and fetch xattrs

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • Lustre 2.14.0
    • None
    • 3
    • 9223372036854775807

    Description

      I was running "ls" on a directory and checked "{{mds.
      *.job_stats}}" and saw that while all of the getattr RPCs were being sent to the MDS by a statahead thread, the main "ls" process was still sending an equal number of "getxattr" RPCs to the MDS, which is almost certainly losing a lot of the benefit from the statahead operations since the "ls" s.

      - 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.

      Attachments

        Issue Links

          Activity

            People

              wc-triage WC Triage
              adilger Andreas Dilger
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: