PCC Phase 2 (LU-12714)

[LU-10499] Readonly Persistent Client Cache support Created: 12/Jan/18  Updated: 23/Sep/23  Resolved: 18/Feb/22

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

Type: Technical task Priority: Minor
Reporter: Li Xi Assignee: Qian Yingjin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocker
is blocking LU-10092 PCC: Lustre Persistent Client Cache Resolved
Related
is related to LU-13602 Skip unknown FLR component types Resolved
is related to LU-13842 Can't add pcc cache with roid only pa... Resolved
is related to LU-13843 removing non existing path with lctl ... Closed
is related to LU-13841 error messages need additional explan... Closed
is related to LU-10602 Add file heat support for Persistent ... Open
is related to LU-10606 HSM info as part of LOV layout xattr Open
is related to LU-13924 Document PCC "lfs pcc add" options Open
is related to LU-16700 reserve flags and define data structu... Resolved
Rank (Obsolete): 9223372036854775807

 Description   

Readwrite Persistent Client Cache has been implemented by using HSM features (LU-10092). When a file is cached on Readwrite PCC (RW-PCC), only this single client can read/write to the file. RW-PCC can accelerate I/O intensive applications which read/write data into a file in a single client. However, in some other use cases, part of the files will never be updated, but need to be readed at the same time from multiple clients. Readonly Persistent Client Cache tries to implement a readonly cache level on Lustre clients using SSDs/NVMe.

Readonly Persistent Client Cache (RO-PCC) shares the same framework with Readwrite Persistent Client Cache, except that no HSM mechanism is used in readonly mode of PCC. Instead, readonly mode of PCC uses grouplock to protect the data from being written from other clients.

Whenever a file is fetched into RO-PCC, like the archive number of RW-PCC, a grouplock ID needs to be specified. The grouplock of this ID will be held in the client as long as the file is being cached in RO-PCC. Multiple clients can fetch the same file into its local cache using the same grouplock ID. Because of the semantics of grouplock, no other client can read/write from/to the file if the grouplock with the same ID is not held. Also because of the semantics of grouplock, no client can fetch the file to RO-PCC with a different grouplock ID.



 Comments   
Comment by Li Xi (Inactive) [ 12/Jan/18 ]

Patch will be pushed as soon as cleanup finishes.

Comment by Gerrit Updater [ 12/Jan/18 ]

Li Xi (lixi@ddn.com) uploaded a new patch: https://review.whamcloud.com/30847
Subject: LU-10499 llite: add readonly support for PCC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a5c1ccfdfa3decb879958cff3de32372a763135b

Comment by Andreas Dilger [ 26/Jan/18 ]

The one problem with the grouplock is that this will be dropped when the filesystem is restarted. Secondly, the grouplock prevents other clients from reading the file, even if there is still a copy on the original OST.

What I think would be a better mechanism for this would be to leverage the FLR functionality and state machine directly for the PCC mirrors.

Comment by Li Xi (Inactive) [ 05/Feb/18 ]

> The one problem with the grouplock is that this will be dropped when the filesystem is restarted. Secondly, the grouplock prevents other clients from reading the file, even if there is still a copy on the original OST.

Agreed. However, I don't think dropping the lock when the file system is restarted is a big problem. Remounting the client doesn't happen a lot.

In order to solve the problem that other clients can't reading the PCC cached files, we can either:

1) Add readonly support for the grouplock. When some on is holding the readonly grouplock of the file, no write lock is allowed, and only readlock can be granted.

2) Add none-copy support for readonly PCC. When a client is accessing the file which is cached by other clients on readonly PCC, the client will require the PCC grouplock automatically, but will not copy the data to local storage. Instead, the client will read from the OSTs directly.

Either way should work well. But I'd prefer solution 2), unless solution 1) can help other use cases since solution 1) will be much harder.

> What I think would be a better mechanism for this would be to leverage the FLR functionality and state machine directly for the PCC mirrors.

I don't have any idea about how to use FLR for PCC. Can you explain more details?

Comment by Gerrit Updater [ 04/Apr/18 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/31868
Subject: LU-10499 llite: Add new DLM mode PCCRO for readonly PCC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a6e8e5b5108168cfb907f23122ce2ef0c6a37822

Comment by Qian Yingjin (Inactive) [ 04/Apr/18 ]

 Currently Readonly mode of PCC uses grouplock to protect the data from being written or even normal read from other clients, even if there is still a copy on the original OSTs.
The patch above introduces a new kind of LDLM lock mode PCCRO, which is compatible with PR lock mode (but not compatible with PW and GROUP lock mode), so when the file is PCC-fetched and attached on a client, the client will obtain PCCRO lock on the file, the PCCRO lock is kept until the administrator detachs the PCC-fetched file. It allows the read access for the file data on original OSTs from other clients, but no write lock (PW) is allowed.

Comment by Gerrit Updater [ 17/Apr/18 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/32021
Subject: LU-10499 llite: fix problem of fetch
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 83af1ef273fe694df1fbbf7d4cc3cbb33f803194

Comment by Gerrit Updater [ 23/Jul/18 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/32852
Subject: LU-10499 pcc: add readonly mode for PCC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 952936bcf729ff8e0a8c013bebe4ebc218bda280

Comment by Gerrit Updater [ 14/Aug/18 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/32998
Subject: LU-10499 pcc: add readonly mode for PCC
Project: fs/lustre-release
Branch: pcc
Current Patch Set: 1
Commit: d8ccc3ef8bbf7c3f180681dd758833875733956e

Comment by Gerrit Updater [ 22/Apr/20 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/38305
Subject: LU-10499 pcc: add readonly mode for PCC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 22e483f35b11758575fe1d752cf0d40d4e09315f

Comment by Gerrit Updater [ 22/Jul/20 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/39483
Subject: LU-10499 hsm: make HSM layout be a kind of foreign layout
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 10e6228d530df034513d6a41f24f28243e13bae2

Comment by Gerrit Updater [ 30/Nov/20 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/40791
Subject: LU-10499 pcc: introducing OBD_CONNECT2_PCCRO flag
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: d2638ccd5c1a327840c68d875eb30a0a3f4f895d

Comment by Gerrit Updater [ 12/Jul/21 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40791/
Subject: LU-10499 pcc: introducing OBD_CONNECT2_PCCRO flag
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6007dc9382df7260841a4748158307ade25f22ef

Comment by Colin Faber [ 18/Feb/22 ]

Per lixi_wc  – all the known issues of Readonly PCC have been solved.

Comment by Gerrit Updater [ 06/Jul/22 ]

"Li Xi <lixi@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47887
Subject: LU-10499 pcc: add readonly mode for PCC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: cbe025c527067f894705df1fe55dccc3cade511a

Comment by Gerrit Updater [ 20/Jun/23 ]

"Qian Yingjin <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51375
Subject: LU-10499 pcc: use foreign layout for PCCRO on server side
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 22dc3585644251aeae2042b6a29f7846a982cbca

Comment by Gerrit Updater [ 23/Sep/23 ]

"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51375/
Subject: LU-10499 pcc: use foreign layout for PCCRO on server side
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: aebb405e32e4d40bc2d70a95356b3b85be280668

Generated at Sat Feb 10 02:35:38 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.