[LU-10938] Metadata writeback cache support Created: 22/Apr/18  Updated: 06/Dec/22

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

Type: New Feature Priority: Major
Reporter: Oleg Drokin Assignee: Qian Yingjin
Resolution: Unresolved Votes: 0
Labels: None

Attachments: PDF File LUG2018-Developer_Day-Client_Metadata_Writeback_Cache-Oleg_Drokin.pdf     Microsoft PowerPoint WBC.pptx    
Issue Links:
Related
is related to LU-13008 WBC: memory limits for caching Open
is related to LU-13009 WBC: fsync() support Open
is related to LU-13010 WBC: Reopen the file when WBC EX lock... Open
is related to LU-13015 WBC: lfs wbc and lctl wbc utils Open
is related to LU-13007 WBC: Add cache aging to flush dirty c... Open
is related to LU-13016 WBC1.5: Cached data reintegration af... Open
is related to LU-13011 WBC2: Integrate PCC with Metadata Wri... Open
is related to LU-13012 WBC: Rule based auto WBC Open
is related to LU-16361 Lustre client was crashed when I used... Open
is related to LU-14139 batched statahead processing Resolved
is related to LU-13015 WBC: lfs wbc and lctl wbc utils Open
is related to LU-11018 async close RPC Open
is related to LU-14138 Move more members in PTLRPC request i... Resolved
Sub-Tasks:
Key
Summary
Type
Status
Assignee
LU-13007 WBC: Add cache aging to flush dirty c... Technical task Open Qian Yingjin  
LU-13008 WBC: memory limits for caching Technical task Open Qian Yingjin  
LU-13009 WBC: fsync() support Technical task Open Qian Yingjin  
LU-13010 WBC: Reopen the file when WBC EX lock... Technical task Open WC Triage  
LU-13011 WBC2: Integrate PCC with Metadata Wri... Technical task Open Qian Yingjin  
LU-13012 WBC: Rule based auto WBC Technical task Open Qian Yingjin  
LU-13015 WBC: lfs wbc and lctl wbc utils Technical task Open Qian Yingjin  
LU-13016 WBC1.5: Cached data reintegration af... Technical task Open WC Triage  
LU-13021 WBC:different flush modes Technical task In Progress Qian Yingjin  
LU-13022 WBC3: Disconnected operation support Technical task Open Qian Yingjin  
LU-13044 WBC3: remove the whole subtree on MDT... Technical task Open WC Triage  
LU-13045 WBC2: batch metadata update Technical task Open Qian Yingjin  
LU-13046 WBC2: lockless IO Technical task Open Qian Yingjin  
LU-13047 WBC: Basic framework for WBC Technical task In Progress Qian Yingjin  
LU-13105 WBC: Add symlink support Technical task Open Qian Yingjin  
LU-13106 WBC: Add hardlink support Technical task Open Qian Yingjin  
LU-13521 WBC: special readdir() handling for r... Technical task Open Qian Yingjin  
LU-13563 WBC: Reclaim mechanism for cached ino... Technical task Open Qian Yingjin  
LU-13564 WBC: inode and space grant mechanism ... Technical task Open WC Triage  
LU-13577 WBC: implement mkdir() by using inten... Technical task Open Qian Yingjin  
LU-14123 WBC: better DNE support Technical task Open Qian Yingjin  
LU-14141 WBC: Stripe directory not flushed to ... Technical task Open Qian Yingjin  
LU-14757 WBC: MemFS lookup fallback to Lustre ... Technical task Open Qian Yingjin  
LU-14820 WBC: trigger flush on background when... Technical task Open Qian Yingjin  
LU-14886 WBC: Handle WB_SYNC_NONE properly Technical task Open Qian Yingjin  
LU-15413 WBC: endless loop in balance_dirty_pages Technical task Open Qian Yingjin  
LU-15426 WBC2: it should not cause rename() fa... Technical task Open Qian Yingjin  
LU-15441 WBC: Write hang with O_DSYNC file flag Technical task Open Qian Yingjin  
LU-15499 WBC: deadlock for buffered write in p... Technical task Open Qian Yingjin  
LU-15621 WBC: Recovery mechanism for batched RPC Technical task Open WC Triage  
LU-15669 WBC: replay recovery and layout insta... Technical task Open WC Triage  
LU-15799 WBC: rename() support for WBC Technical task Open Qian Yingjin  
LU-15805 WBC: uncache a given file or director... Technical task Open Qian Yingjin  
LU-16071 WBC: Handling writeback errors and re... Technical task Open WC Triage  
LU-16107 WBC: discard the cached subtrees unde... Technical task Open Qian Yingjin  
Epic/Theme: Performance
Rank (Obsolete): 9223372036854775807

 Description   

Metadata writeback cache is a highly desirable feature that should allow Lustre to overcome link latency for modifying metadata operations esp. noticeable in interactive type of workloads.

Examples include upacking large archives and building software on a single node with no contention from any other nodes.

Another highly visible set of usecases would include "File/directory-per-process" kind of benchmarks like say mdtest.



 Comments   
Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32128
Subject: LU-10938 wbc: Basic code to assimilate pagecache pages into clio
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: f3cdb29f8c02a88455bc1c9156fb70963e050cca

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32126
Subject: LU-10938 wbc: Send and receive parent-locked lock handle
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 607a7170545314e5d381407c2e6c4990c557b290

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32124
Subject: LU-10938 wbc: Basic symlink support - client and server
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8d0e49f970d8ada9af1a048192d79a705eec6898

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32116
Subject: LU-10938 wbc: Intent mkdir implementation on client and server
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 30092387795a6d34bc8a30ec438f0022a05fed20

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32127
Subject: LU-10938 wbc: Async file create: do intent open to create layout on the server
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: b482c5ace6c5201f6c8786b3625bf9bf2cec6ed2

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32121
Subject: LU-10938 wbc: Add 40 RPCs at once limit
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 127a844d4cbd42d237976ec344215d387ba76314

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32119
Subject: LU-10938 wbc: Server side of client-parent locked mkdir
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5b268fc0689fefa3b597779d19ed0b33817d4c8d

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32118
Subject: LU-10938 wbc: Framework for WBC lock cancellation
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6061281933204aa0f2f6ebb3d070880cbb2eb6f8

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32117
Subject: LU-10938 wbc: Introduce LLIF_VIRTUAL flag for wbc-cached metadata
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 647f1567950e8f299f17f7cb9802ad5b75f971d9

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32120
Subject: LU-10938 wbc: Client side of client-parent locked mkdir
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 055c497a3d1da9e5fd533a684be0e60732e052b0

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32125
Subject: LU-10938 wbc: chr/blockdev - pass in rdev to server for proper creation
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 5a6eeee95d5c1cd5dca7f87b3ce0263d3fa7f668

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32123
Subject: LU-10938 wbc: Added support for file creation
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 6750899f8b6b1a7b4d2b42984c5634d24701d83f

Comment by Gerrit Updater [ 23/Apr/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32122
Subject: LU-10938 wbc: only request update bit on lookup speculatively with trybits
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 8a59d672b252467dac9d4c76dbe22312ba4a8bf7

Comment by Patrick Farrell (Inactive) [ 01/May/18 ]

Oleg,

This is a bit of a silly question, but I don't know the answer in Gerrit.  How can I get the full patch series in to my local git/how can I tell what the order is so I can find the last one to check out?

Thanks

Comment by Oleg Drokin [ 02/May/18 ]

the tip of the tree is this patch: https://review.whamcloud.com/#/c/32128/3 - you know this by looking in the right top part of that page titled "related changes" and seeing it's at the very top of the list.

So if you checkout this patch (download -> checkout) - you'll get this patch and everything else it's based upon

Comment by Gerrit Updater [ 02/May/18 ]

Oleg Drokin (oleg.drokin@intel.com) uploaded a new patch: https://review.whamcloud.com/32241
Subject: LU-10938 ptlrpc: Add WBC connect flag
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 7a30319c516f54f818e678483c08d8a30076aa15

Comment by Patrick Farrell (Inactive) [ 02/May/18 ]

Thanks!

I'll probably figure this out, but is there any particular trick to turning this on?  Will it happen automatically if I make a new directory and start creating stuff in it?

Comment by Oleg Drokin [ 02/May/18 ]

yes, current code asumes you start from an mkdir, the resulting directory will have wbc fully enabled (there's a bit of a bug that if you delete the directory then create another with the same name - wbc would not turn on, I need to track it down some day).

Comment by Patrick Farrell (Inactive) [ 02/May/18 ]

Perfect.  Just observed that myself.  Thank you, nice and easy to test.

Comment by Gerrit Updater [ 29/May/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/32241/
Subject: LU-10938 ptlrpc: Add WBC connect flag
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f024aabf8bbf797e101eec5ff054f7a6e3d253ed

Comment by Andreas Dilger [ 03/Jul/19 ]

One thought I had was whether it is possible to cache/merge setattr-like requests like utimensat(), fchmod(), fchown(), fchgrp(), etc. on the client when creating/writing DoM regular files on the client? The client should already have a write lock on the file for DoM write, and the MDS shouldn't care whether the time, mode, permission, and maybe UID/GID changes before the file is written to the MDS because these attributes should all be sent with the write request.

Comment by Patrick Farrell (Inactive) [ 04/Jul/19 ]

I should perhaps know the answer to this question, but which Lustre attributes are exclusively on the MDS?  Permissions are, xattrs are, and size is not (even in DOM, it's pulled from the data object - it's just that object is on the MDS) but what about the various time properties?

The issue that will come up, I think, is which bits the client has a write lock on.

Comment by Andreas Dilger [ 04/Jul/19 ]

The timestamps belong to the target that has the most recent ctime, but in any case since this optimization would be useful mostly for DoM files, the MDS would own all of the attributes including the size, as long as the later components were not initialized. Even if the later components were initialized, setting the timestamps, UID, GID, permission, etc. could be cached on the client as long as it has the DoM write lock on the MDT inode, since no other clients could modify/access these attributes.

Comment by Nathan Rutman [ 05/Jul/19 ]

Status of the prototype, per ISC

  • No cache/quota/space limits, no background flushing, no batching, ...
  • Early tests show 10-20x single-client speedup tests (untar, make, …)
Comment by Qian Yingjin [ 13/Jul/19 ]

After reading the code, I found that current WBC still need to solve the following problem of reopen the file:

  1. When WBC is valid, open the file;
  2. the EX layout was revoked, the file is flushed
  3. at this time, we still need to reopen the file on MDS.
Comment by Qian Yingjin [ 02/Sep/19 ]

I will try to rebase all WBC patches against master branch.
Should I merge the series of WBC patches into a big one patch?

Comment by Patrick Farrell (Inactive) [ 02/Sep/19 ]

I would strongly prefer not merging them.  Having them broken out like this is really nice.

Comment by Gerrit Updater [ 25/Nov/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/36851
Subject: LU-10938 wbc: Basic test scripts for WBC
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 97f122f36e995e251defe8f53a511d614e747ad2

Comment by Gerrit Updater [ 27/Dec/19 ]

Yingjin Qian (qian@ddn.com) uploaded a new patch: https://review.whamcloud.com/37104
Subject: LU-10938 wbc: add symlink support
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 96f7534209e0c7c81b891ea0cadcdb9e9e746237

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