SWARM: Replicating Shared Disaggregated-Memory Data in No Time

Antoine Murat, Clément Burgelin, Athanasios Xygkis, Igor Zablotchi, Marcos K. Aguilera, Rachid Guerraoui · DOI

Introduction

In modern data centers, memory disaggregation—the physical separation of compute and memory resources—has emerged as a key strategy for improving resource utilization and scalability. However, providing fault tolerance for shared disaggregated memory remains a significant challenge. Traditional replication protocols often impose a "latency tax" that is unacceptable in microsecond-scale environments. SWARM addresses this by achieving linearizable, wait-free replication in a single network roundtrip (RTT) for the common case, providing performance nearly identical to unreplicated memory.

The Challenge of Disaggregated Memory

Standard replication protocols, such as the Attiya, Bar-Noy, and Dolev (ABD) algorithm, typically require at least two RTTs: the first to discover the latest timestamp and the second to commit the new data. In high-performance environments using technologies like CXL or one-sided RDMA, doubling the latency is a non-starter.

Furthermore, these "one-sided" memory technologies often lack the ability to execute complex logic on the memory nodes themselves, forcing replication logic to reside entirely on the client side. Existing solutions often trade off consistency for performance or require expensive "two-sided" operations that consume storage-side CPU cycles.

The SWARM Protocol

SWARM introduces two primary innovations to achieve 1-RTT replication using only one-sided memory primitives.

Safe-Guess: Speculative Timestamping

The core of SWARM's performance is the Safe-Guess protocol. It eliminates the initial coordination RTT by having writers guess a fresh timestamp based on loosely synchronized local clocks.

The Safe-Guess protocol allows for 1-RTT writes by speculatively using a guessed timestamp.

In the common "fast path," if the guessed timestamp is higher than any existing one, the write completes in a single RTT. If the guess is stale (the "slow path"), SWARM employs a novel wait-free primitive called timestamp locks. These locks allow a writer to safely re-execute with a corrected timestamp without exposing inconsistent or oscillating values to readers, maintaining linearizability even under contention.

In-n-Out: Atomic Updates for Large Objects

Hardware typically only supports atomic updates for small (e.g., 64-bit) words. For larger objects, standard "out-of-place" updates require two RTTs: one to write the data and another to update a pointer. SWARM's In-n-Out technique overcomes this by performing an in-place write and an out-of-place write simultaneously.

The In-n-Out buffer management technique enables 1-RTT operations for large objects by combining in-place and out-of-place writes.

Readers prioritize the in-place data, validating it with a hash. If a concurrent write has garbled the in-place data (causing a hash failure), the reader falls back to the out-of-place pointer. This dual-path approach ensures that both reads and writes remain 1-RTT operations in the common case.

Evaluation and Results

The authors implemented SWARM in SWARM-KV, a high-performance key-value store, and evaluated it using the Yahoo! Cloud Serving Benchmark (YCSB) with Zipfian distributions to simulate real-world access patterns.

  • Ultra-Low Latency: SWARM-KV achieves a median GET latency of 2.4 µs, which is only 27% higher than completely unreplicated memory (1.9 µs).
  • Superior Performance: Compared to FUSEE, the previous state-of-the-art, SWARM-KV is up to 2x faster for GET operations and 3.4x faster for UPDATEs.
  • High Scalability and Resilience: The system scales linearly with the number of clients, reaching over 28 million operations per second on a 100 Gbps fabric. Because it lacks a central leader, SWARM-KV provides zero-downtime resilience; if a memory node fails, clients simply redirect operations to the remaining replicas.

Conclusion and Future Work

SWARM demonstrates that strong consistency and high performance are not mutually exclusive in disaggregated memory systems. By leveraging speculation and clever buffer management, it provides a practical path toward fault-tolerant, microsecond-scale shared memory. Future work will focus on reducing the memory footprint—currently 2x that of some competitors due to the In-n-Out buffers—and extending the protocol to support durable persistent memory without sacrificing its 1-RTT performance.

Summary updated

BibTeX
@inproceedings{murat2024swarm,
  author = {Antoine Murat and Clément Burgelin and Athanasios Xygkis and Igor Zablotchi and Marcos K. Aguilera and Rachid Guerraoui},
  title = {{SWARM: Replicating Shared Disaggregated-Memory Data in No Time}},
  booktitle = {SOSP},
  year = {2024},
  doi = {10.1145/3694715.3695945},
}
Figure