Introduction
File systems in userspace (FUSE) have become a cornerstone of cloud infrastructure due to their ease of deployment and isolation properties. However, distributed FUSE implementations often suffer from a significant "consistency-performance gap." To maintain strong consistency across a cluster, these systems typically rely on "write-through" caching, where every write operation must synchronously traverse the userspace daemon and the network. While "write-back" caching offers superior performance by allowing applications to continue after writing to a local cache, it historically introduces complex deadlock risks in distributed environments.
DFUSE addresses this challenge by offloading lease management logic directly into the FUSE kernel driver. This architectural shift enables high-performance write-back kernel caching while maintaining the strong consistency guarantees required by distributed applications.
The Consistency-Performance Gap
In a distributed FUSE environment, the kernel's page cache—essential for local performance—can lead to stale data reads if one node updates its cache without notifying others. To avoid this, most distributed FUSE systems (e.g., Ceph-FUSE) default to write-through mode.
Attempts to enable write-back caching often result in deadlocks due to a "reversed lock order." The kernel typically acquires an internal file lock (inode) before requesting a distributed lease from userspace. Conversely, a lease revocation from another node might attempt to acquire the lease before asking the kernel to invalidate the inode. This circular dependency can hang the entire system.
The DFUSE Architecture: Kernel Lease Offloading
The core innovation of DFUSE is Kernel Lease Offloading. By embedding a distributed lease field directly into the FUSE kernel driver’s inode structure, DFUSE makes the lease a first-class citizen within the kernel.
When an application issues a write, the DFUSE kernel driver checks the lease status before acquiring the inode lock or touching the page cache. If the required "Exclusive Write" lease is missing, the driver proactively triggers a request to the userspace daemon via new FUSE operations: fuse_acquire_dist_lease() and fuse_release_dist_lease(). This ensures a consistent locking order (Lease → Inode) for both acquisition and revocation, safely enabling write-back caching.
Furthermore, DFUSE employs a tiered caching strategy, utilizing the kernel page cache for raw speed and a secondary userspace buffer cache (powered by Facebook’s CacheLib) to batch network operations and minimize RPC overhead.
Evaluation and Key Results
The authors evaluated DFUSE on CloudLab using industry-standard benchmarks like fio and Filebench. The results highlight the dramatic performance improvements made possible by efficient write-back caching.
Key findings include:
- Throughput and Latency: DFUSE achieved up to 68.0% higher throughput and a 40.4% reduction in average latency compared to the write-through baseline in write-heavy random workloads.
- Sequential I/O Efficiency: For sequential writes, DFUSE outperformed the baseline by over 62%. The ability to batch small writes into large, efficient chunks within the kernel cache before flushing them to userspace is critical for this gain.
- Scalability: The system demonstrated near-linear scaling up to 16 nodes, maintaining its performance advantage even under high contention where multiple nodes compete for the same files.
Conclusion
DFUSE demonstrates that strong consistency in distributed userspace file systems does not have to come at the cost of performance. By strategically placing lease enforcement within the kernel while keeping complex management logic in userspace, DFUSE bridges the consistency-performance gap. While it requires minor kernel modifications, the resulting gains in throughput and latency make it a compelling architecture for modern cloud storage needs.
Summary updated