Abstract
Distributed file systems built on FUSE (Filesystem in Userspace) often face a performance bottleneck due to the inability to safely use the kernel's write-back page cache while maintaining strong consistency. This paper introduces DFUSE, the first FUSE-based distributed file system to enable high-performance write-back kernel caching without sacrificing correctness. By offloading lease management directly into the kernel driver, DFUSE eliminates the "performance vs. correctness" trade-off, achieving up to 68% higher throughput and 40% lower latency than traditional write-through designs.
Introduction
Cloud operators increasingly rely on FUSE to develop and deploy file systems rapidly without the risks associated with kernel-level development. However, distributed userspace file systems (DFSes) encounter a fundamental performance wall. To achieve high performance, a file system must utilize the kernel’s write-back page cache, which buffers writes in memory. In a distributed environment, this can lead to stale data reads on other nodes, breaking strong consistency.
Currently, developers must choose between prioritizing speed (enabling write-back with weak consistency) or correctness (using write-through mode). Write-through mode requires every write to traverse the network to userspace and the storage backend, which is significantly slower and prone to deadlocks due to conflicting lock orders between the kernel and userspace layers.
System Design: Kernel Offloading
The core innovation of DFUSE is the offloading of distributed coordination logic from userspace into the kernel. By embedding "distributed lease" information directly into the FUSE kernel driver, DFUSE aligns the locking mechanisms of the VFS layer and the userspace daemon.
Key components of the DFUSE design include:
- Coordinated Access: The FUSE kernel driver checks for a valid "exclusive write lease" before allowing data into the page cache. If the lease is missing, the driver proactively requests one from the userspace daemon.
- Atomic Revocation: Upon a revocation request from the Lease Manager, the kernel driver flushes dirty pages and invalidates the local cache immediately, ensuring consistency across the cluster.
- Tiered Caching: DFUSE leverages the kernel page cache for speed and a secondary userspace buffer cache (using CacheLib) to batch small I/O requests into efficient network RPCs.
- Deadlock Resolution: Moving the lease check into the kernel ensures the "Lease Lock" is acquired before the "Inode Lock," preventing circular wait conditions that plague userspace-only implementations.
Evaluation
DFUSE was evaluated on CloudLab using micro-benchmarks (fio) and macro-benchmarks (Filebench). The fio tests measured raw throughput and latency across various read/write ratios and access patterns. Filebench simulated real-world workloads, including fileserver (write-heavy), webserver (read-heavy), and netsfs (mixed metadata/data).
Key Results
The evaluation demonstrates that enabling write-back caching through kernel offloading provides substantial performance benefits over traditional write-through methods.
- Throughput and Latency: In write-heavy random I/O tests, DFUSE achieved 68.0% higher throughput and a 40.4% reduction in write latency compared to the standard write-through baseline.
- Macro-benchmarks: In the
fileserverworkload, DFUSE delivered a 26.2% throughput improvement and 20.0% lower latency. - Scalability: The system showed near-linear scalability in clusters ranging from 2 to 16 nodes.
- Contention Handling: DFUSE maintained its performance advantage even under high contention, proving that kernel-level lease management is more efficient than userspace-only optimistic concurrency controls.
Discussion and Conclusion
DFUSE demonstrates that the "FUSE tax" is not solely due to context switching, but rather the inability to safely use native kernel caching mechanisms. By adding approximately 300 lines of code to the FUSE driver, DFUSE provides a high-performance, strongly consistent distributed file system with a minimal kernel footprint.
Future work will address metadata bottlenecks, as distributed operations like file creation could also benefit from similar offloading techniques. Additionally, further optimization of the lease management protocol may be required for deployments exceeding 16 nodes, where the relative performance advantage begins to narrow.
Summary updated