[LU-549] Add xattr list/value cache on client Created: 28/Jul/11  Updated: 13/Jun/13  Resolved: 13/Jun/13

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.3.0
Fix Version/s: Lustre 2.1.4

Type: Bug Priority: Minor
Reporter: Andreas Dilger Assignee: nasf (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Related
is related to LU-2869 extended attribute cache for Lustre Resolved
Story Points: 5
Severity: 3
Rank (Obsolete): 4548

 Description   

Caching the xattr list (and xattrs themselves) on the clients is becoming increasingly important, since this has shown up as a performance problem in the past (e.g. doing an RPC to get "security.capability" for every file access).

We can easily/compatibly add a simple xattr list and/or value cache on the client under the MDS_INODELOCK_UPDATE bit, which setxattr always gets in LCK_EX mode. mdt_reint_setxattr() also gets the MDS_INODELOCK_LOOKUP for XATTR_NAME_ACL_ACCESS, but this should be expanded to also include XATTR_SECURITY_PREFIX. This should also allow negative xattr caching so that an RPC is not sent repeatedly for xattrs that do not exist. Whether we want to cache the non-security xattrs under a separate MDS_INODELOCK_XATTR bit lock can be decided/implemented separately.

A second phase would be to read/send/cache common xattrs on the client on first access to avoid extra RPCs. This will become increasingly important with clients, since SELinux and other xattr-heavy tools are becoming increasingly common.

If we begin to cache xattrs on the client, we should remove the special-case handling of security.capability in ll_setxattr_common() which was added as a hack to address a serious performance problem.



 Comments   
Comment by nasf (Inactive) [ 20/Dec/11 ]

The patch for packaged xattr:

http://review.whamcloud.com/#change,1212

Comment by Andreas Dilger [ 12/Jan/12 ]

Fan Yong, do you have any performance tests to show what the improvement is with this patch?

Comment by nasf (Inactive) [ 12/Jan/12 ]

I only tested "ls -l" for containing only sub-dirs case before, at least double the performance. Not test other cases yet.

Comment by James A Simmons [ 26/Mar/12 ]

Against master this patch is broken. Can you update please.

Comment by Peter Jones [ 26/Mar/12 ]

Fanyong

Let me know if someone else should take this work over

Peter

Comment by nasf (Inactive) [ 28/Mar/12 ]

This is the patch against latest master:

http://review.whamcloud.com/#change,1212,set15

Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,client,sles11,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,client,el5,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,server,el5,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,client,el6,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,server,el5,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,server,el5,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,client,el6,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,server,el6,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,client,el5,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,server,el5,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
  • lustre/include/linux/lustre_compat25.h
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,client,el5,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,client,el5,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,server,el6,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
  • lustre/llite/xattr.c
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,server,el6,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,client,el6,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/llite/xattr.c
  • lustre/include/linux/lustre_compat25.h
  • lustre/autoconf/lustre-core.m4
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » i686,server,el6,ofa #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/include/linux/lustre_compat25.h
  • lustre/llite/xattr.c
  • lustre/autoconf/lustre-core.m4
Comment by Build Master (Inactive) [ 30/Apr/12 ]

Integrated in lustre-master » x86_64,client,el6,inkernel #498
LU-549 llite: Improve statfs performance if selinux is disabled (Revision 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3)

Result = SUCCESS
Oleg Drokin : 7cc542fd4c26ccb117ceb13a47ac8ced3107b9b3
Files :

  • lustre/autoconf/lustre-core.m4
  • lustre/include/linux/lustre_compat25.h
  • lustre/llite/xattr.c
Comment by Bob Glossman (Inactive) [ 17/May/12 ]

http://review.whamcloud.com/#change,2826
back port to b2_1

Comment by James A Simmons [ 17/May/12 ]

Do we want this back ported to 2.1.X?

Comment by James A Simmons [ 19/Jun/12 ]

Rebased to master at http://review.whamcloud.com/#change,1212

Comment by Ian Colle (Inactive) [ 29/Jun/12 ]

See also http://review.whamcloud.com/#change,2503

Comment by Andrew Perepechko [ 30/Jan/13 ]

Xyratex are implementing an xattr writethrough cache feature.
The patch has been coded and is currently under inspection.

An additional inode bit lock is introduced. A client
refills its xattr cache with a single RPC under LCK_PR
lock. setxattr RPC is sent synchronously and is updated
in the client cache under LCK_PW lock.

Comment by Nathan Rutman [ 30/Jan/13 ]

Xyratex MRP-57

Comment by Jodi Levi (Inactive) [ 13/Jun/13 ]

Duplicate of LU-2869

Generated at Sat Feb 10 01:08:08 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.