[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: |
|
||||||||
| 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: |
| 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: |
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Build Master (Inactive) [ 30/Apr/12 ] |
|
Integrated in Result = SUCCESS
|
| Comment by Bob Glossman (Inactive) [ 17/May/12 ] |
|
http://review.whamcloud.com/#change,2826 |
| 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 ] |
| Comment by Andrew Perepechko [ 30/Jan/13 ] |
|
Xyratex are implementing an xattr writethrough cache feature. An additional inode bit lock is introduced. A client |
| Comment by Nathan Rutman [ 30/Jan/13 ] |
|
Xyratex MRP-57 |
| Comment by Jodi Levi (Inactive) [ 13/Jun/13 ] |
|
Duplicate of |