Actions
Bug #82190
open
DV
mds: cross-rank rename of a just-written file waits for mds_tick_interval
Bug #82190:
mds: cross-rank rename of a just-written file waits for mds_tick_interval
Status:
Fix Under Review
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Due date:
% Done:
0%
Source:
Backport:
umbrella,tentacle,squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:
Description
Renaming a file that a client has just written, into a directory whose authority is another active rank, takes a full mds_tick_interval (5 s by default). Workloads that write output and move it into a tree pinned to another rank pay this on every file.
Reproducer: two active ranks, directory /src on rank 0 and /dst pinned to rank 1; write a 4 KiB file in /src, close it, rename it into /dst. On a vstart cluster (Reef 18.2.8, same code on main):
- kernel client: median 2.8-5.0 s per rename (p90 up to 8.3 s); ceph-fuse: 3.5-4.6 s
- with mds_tick_interval 1: about 1.5 s
- the same rename within one rank: 3 ms (kernel), 37 ms (ceph-fuse)
- with fsync before the rename (kernel): 67 ms
The MDS logs show two waits on an update that is submitted to the journal but not flushed, and nothing asks for a flush, so the tick's log flush ends them:
- On the rank that owns the file, handle_peer_rename_prep() freezes the inode. The client's flush of its dirty caps (Fw) on the file arrives at about the same time; _do_cap_update() holds an auth pin on the inode until the update is journaled, and the freeze waits for it ("freeze_inode - waiting for auth_pins to drop to 3" until "file_update_finish" at the next tick).
- With the kernel client, the destination rank discovers the just-created source dentry, and handle_discover() blocks on its xlock ("handle_discover blocking on xlocked"), which the create holds until it is journaled.
Fix: flush the log in those places. PR to follow.
DV Updated by Dan van der Ster about 1 month ago
- Status changed from New to Fix Under Review
- Pull request ID set to 73171
Actions