Skip to content

NFS client attribute cache performance improvements

Trond Myklebust linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9NFSv4: Don't invalidate the directory twicefs/nfs/nfs4proc.c+3 -06 replies
2/9NFSv4: Update the attribute cache info in update_changeattrfs/nfs/nfs4proc.c+8 -10 replies
3/9NFSv4: Don't discard the attributes returned by asynchronous DELEGRETURNfs/nfs/nfs4proc.c+1 -40 replies
4/9NFS: Don't revalidate the file on close if we hold a delegationfs/nfs/inode.c+2 -00 replies
5/9NFS: Clean up cache validity checkingfs/nfs/file.c fs/nfs/inode.c fs/nfs/internal.h+34 -220 replies
6/9NFS: Only look at the change attribute cache state in nfs_weak_revalidate()fs/nfs/dir.c+3 -20 replies
7/9NFS: Fix and clean up the access cache validity checkingfs/nfs/dir.c+9 -90 replies
8/9NFS: Remove unused function nfs_revalidate_inode_rcu()fs/nfs/inode.c include/linux/nfs_fs.h+0 -100 replies
9/9NFS: Clean up nfs_attribute_timeout()fs/nfs/inode.c include/linux/nfs_fs.h+7 -80 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] NFS client attribute cache performance improvements

The following patchset makes the largest difference w.r.t. NFSv4, where we don't always ask for the full set of attributes from the server, however there are also some tidbits for NFSv3.

With this patchset, running xfstests over NFSv4.1 shows the following improvement in execution times:

Generic/074 now 264s, was 344s
Generic/075 now 15s was 26s
Generic/089 now 178s was 236s
Generic/112 now 14s was 25s
Generic/113 now 14s was 20s
Generic/127 now 206s was 223s
Generic/133 now 85s was 118s
Generic/247 now 27s was 43s

I saw no statistically significant performance regressions (and no functional regressions).

For nfsstats, the client shows a significant decrease in % GETATTR and % LOOKUP calls on the same workloads.

For 2 runs of xfstests, the numbers are:
GETATTR: now 1456511, was 2168740
LOOKUP: now 301073, was 545571
ACCESS: now 137211 was 139447

Trond Myklebust (9):
NFSv4: Don't invalidate the directory twice
NFSv4: Update the attribute cache info in update_changeattr
NFSv4: Don't discard the attributes returned by asynchronous
DELEGRETURN
NFS: Don't revalidate the file on close if we hold a delegation
NFS: Clean up cache validity checking
NFS: Only look at the change attribute cache state in
nfs_weak_revalidate()
NFS: Fix and clean up the access cache validity checking
NFS: Remove unused function nfs_revalidate_inode_rcu()
NFS: Clean up nfs_attribute_timeout()

 fs/nfs/dir.c           | 23 +++++++++--------
 fs/nfs/file.c          | 12 +--------
 fs/nfs/inode.c         | 68 ++++++++++++++++++++++++++++++--------------------
 fs/nfs/internal.h      |  1 +
 fs/nfs/nfs4proc.c      | 17 +++++++++----
 include/linux/nfs_fs.h |  2 --
 6 files changed, 67 insertions(+), 56 deletions(-)
Signature · 1 line
2.9.3