btrfs: reduce block group cache writeout times during commit
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 21 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | btrfs: move struct io_ctl into ctree.h and rename itfs/ fs/ | +33 | 0 replies | |
| 2/4 | Btrfs: two stage dirty block group writeoutfs/ fs/ fs/ +1 more | +170 | 0 replies | |
| 3/4 | Btrfs: don't use highmem for free space cache pagesfs/ | +5 | 0 replies | |
| 4/4 | Btrfs: allow block group cache writeout outside critical section in commitfs/ fs/ fs/ +6 more | +341 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] btrfs: reduce block group cache writeout times during commit
Large filesystems with lots of block groups can suffer long stalls during commit while we create and send down all of the block group caches. The more blocks groups dirtied in a transaction, the longer these stalls can be. Some workloads average 10 seconds per commit, but see peak times much higher.
The first problem is that we write and wait for each block group cache individually, so we aren't keeping the disk pipeline full. This patch set uses the io_ctl struct to start cache IO, and then waits on it in bulk.
The second problem is that we only allow cache writeout while new modifications are blocked during the final stage of commit. This adds some locking so that cache writeout can happen very early in the commit, and any block groups that are redirtied will be sent down during the final stages.
With both together, average commit stalls are under a second and our overall performance is much smoother.