DRust: Language-Guided Distributed Shared Memory with Fine Granularity, Full Transparency, and Ultra Efficiency
Haoran Ma, Yifan Qiao, Shi Liu, Shan Yu, Yuanjiang Ni, Qingda Lu, Jiesheng Wu, Yiying Zhang, Miryung Kim, Harry Xu
TL;DR
This work introduces DRust, a practical DSM system that leverages Rust's ownership model to expose single-writer/multiple-reader semantics to the runtime, enabling object-level concurrent access with minimal synchronization. By implementing a global, partitioned heap and extending pointers with ownership- and color-tracking fields, DRust achieves low-overhead coherence where writes move objects to the writer and reads fetch copies, all while maintaining sequential consistency for safe Rust code. The system adapts Rust standard libraries for distributed operation, adds affinity mechanisms (TBox, spawn_to), and provides per-node runtimes plus a global controller for load balancing and fault tolerance via heap replication. Empirically, DRust outperforms GAM and Grappa by up to $2.64\times$ and $29.16\times$ respectively (average improvements around $2.02\times$ and $9.48\times$), with modest single-node overhead and strong scalability across multiple applications and workloads, underscoring the practical viability of language-guided DSM.
Abstract
Despite being a powerful concept, distributed shared memory (DSM) has not been made practical due to the extensive synchronization needed between servers to implement memory coherence. This paper shows a practical DSM implementation based on the insight that the ownership model embedded in programming languages such as Rust automatically constrains the order of read and write, providing opportunities for significantly simplifying the coherence implementation if the ownership semantics can be exposed to and leveraged by the runtime. This paper discusses the design and implementation of DistR, a Rust-based DSM system that outperforms the two state-of-the-art DSM systems GAM and Grappa by up to 2.64x and 29.16x in throughput, and scales much better with the number of servers.
