Metadata writeback cache support
(LU-10938)
|
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Technical task | Priority: | Minor |
| Reporter: | Qian Yingjin | Assignee: | Qian Yingjin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
The memory size on a client is limit compared with the local persistent storage such as SSDs/NVMe. For a WBC subtree, its metadata can be reasonably whole cached in MemFS. But data for regular files maybe grows up too large to cache on client-side MemFS. Data on PCCPCC can be used as the client-side persistent caching for the data of regular files under protection of EX WBC lock. The PCC copy stub can be created according to FID when create the regular file on MemFS and then all data I/O are directed into PCC. Or when the regular file growing too large for the client memory, create the corresponding PCC copy stub and attach the file into PCC. Or at the time of assimilate data from MemFS into Lustre clio, create the PCC copy stub, write the data into PCC. All these operations do not require interaction with MDS until flush is needed.During flushing for a regular file, it just needs to set the file with HSM exists, archived and released on MDT. The file data cached on PCC can defer resync to Lustre OSTs or evict from PCC when it is nearly full. Metadata and Data all on PCCIt is desirable if metadata and data can both be cached on PCC, not only for larger capacity compared with the memory size of the client, but also for persistence and recoverability. The proposal design are as follows:
FID maintain: Once the metadata is also cached on PCC, directories and files under the root WBC directory may be evicted from VFS memory cache (dcache, page chace, inode cache), so when create metadata stub on PCC or the inode is evicted from cache (FID has already allocated for this file on the client), the client needs to store FID into a extent attribute EA of the metadata stub on PCC. If not care about the consistence of FID for the file, maybe we could allocate a new FID for the file when flush the file to MDT? Also we could use the strategy in LU-13024: Lustre HSM support for a subtree to organize and name the root WBC directory on PCC Advantages:
Disadvantage:
|
| Comments |
| Comment by Andreas Dilger [ 27/Nov/19 ] |
|
I think this is a WBC v2 target. Getting basic WBC functionality working is the goal for 2.14. |
| Comment by Andreas Dilger [ 28/Nov/19 ] |
The client can already allocate the FIDs itself, why would it need to allocate a new FID when flushing the file to the MDT? The only time I this this might be needed is if the client selected a FID on one MDT, but that MDT is full when it comes time to flush the WBC files/directories. However, as part of the WBC v1 implementation there needs to be a "grant" request for inodes/blocks on each MDT (as is done with OSTs today) to ensure that the client does not create more data/files than can fit into the filesystem. Otherwise the client data would be lost/discarded with ENOSPC long after it is written instead of returning an error to the application, which makes users unhappy. |
| Comment by Gerrit Updater [ 23/Jul/21 ] |
|
Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/44392 |
| Comment by Gerrit Updater [ 30/Jul/21 ] |
|
Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/44427 |
| Comment by Gerrit Updater [ 23/Nov/21 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/45639 |
| Comment by Gerrit Updater [ 07/May/22 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47246 |
| Comment by Gerrit Updater [ 18/May/22 ] |
|
"Yingjin Qian <qian@ddn.com>" uploaded a new patch: https://review.whamcloud.com/47386 |