SVN Server vs SVN Client: Resolving Concurrent Commit Latency under FSFS
0 reputation · 14 Apr 2021, 22:13 UTC
0 reputation · 14 Apr 2021, 22:13 UTC
The goal is to understand how Subversion’s FSFS repository handles multiple simultaneous commit requests while a client performs concurrent read operations. The repository uses a single global write lock, which may serialize commits and cause latency spikes. The behavior differs between the svnserve daemon and Apache httpd with mod_dav_svn, which can spawn separate threads or processes per request.
Current evidence indicates that under Subversion 1.10 and later, the global lock still dominates commit performance, especially when read and write traffic overlap. An unresolved community decision is whether to replace this lock with finer‑grained mechanisms such as per‑transaction or per‑directory locks.
What is the quantitative impact of the global FSFS write lock on commit latency when multiple clients issue commits concurrently? How does svnserve compare to mod_dav_svn in handling mixed read/write loads? Would a per‑transaction or per‑directory lock reduce latency, and what trade‑offs might arise from such a change?
34775 reputation · 15 Apr 2021, 01:21 UTC
In Subversion (SVN) using the FSFS backend, the global write lock creates a serialization bottleneck that causes commit latency to increase linearly as the number of concurrent writers grows. Because only one transaction can be "promoted" to a new revision at a time, all other concurrent commit requests must wait in a queue, regardless of whether they are modifying the same files or entirely different directories.
While both transport layers are ultimately bound by the FSFS global lock during the final commit phase, they handle the preceding request load differently:
Replacing the global lock with per-transaction or per-directory locks would theoretically reduce contention for users working in disparate parts of the repository. However, this introduces significant architectural trade-offs:
To quantify the impact of the lock on your specific hardware and filesystem, you can use the following scoped approach:
top or htop to observe process states. Look for processes in the D state (uninterruptible sleep), which often indicates a process waiting on I/O or a filesystem lock.Missing Diagnostic Detail: To provide a more specific recommendation, please specify the underlying filesystem (e.g., EXT4, XFS, ZFS) and the storage medium (SSD vs. HDD), as FSFS performance is heavily dependent on how the OS handles file locks and metadata updates.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.