How Alibaba’s SMC‑R Brings Zero‑Modification RDMA to Cloud Applications
This article explains the background, architecture, and performance of Alibaba Cloud's SMC‑R technology, which enables transparent, zero‑modification use of RDMA over standard socket interfaces, offering higher throughput and lower latency for cloud workloads while providing automatic fallback to TCP.
From TCP to RDMA
RDMA is a zero‑copy, protocol‑offload technology widely used in high‑performance computing, high‑frequency trading and other latency‑sensitive scenarios. Alibaba Cloud has deployed RDMA in its data centers, supporting core services such as ESSD and PolarDB.
From verbs to socket
Traditional RDMA uses the IB verbs interface, which is incompatible with the POSIX socket API, creating a high adoption barrier. Projects like rsocket and libvma attempted to bridge this gap, but they suffer from user‑space resource management issues and compatibility limitations.
SMC‑R: Kernel‑level socket‑compatible RDMA
SMC‑R (Shared Memory Communications over RDMA) implements a TCP‑compatible socket family that uses RDMA RC for data transfer. It operates in kernel space between the socket layer and the IB verbs layer, allowing applications to switch from AF_INET to AF_SMC without code changes.
Alibaba Cloud Linux 3 and Anolis OS add sysctl controls and whitelist mechanisms to enable transparent, zero‑modification replacement of TCP with SMC‑R, supporting both RoCE and iWARP networks.
Automatic negotiation and safe fallback
During connection setup, peers exchange a TCP option indicating SMC‑R support. If either side cannot use RDMA, the stack falls back to standard TCP over the established connection, ensuring reliability.
Shared‑memory ring buffer communication
SMC‑R uses a remote memory buffer (RMB) organized as a ring, with producer and consumer cursors to coordinate writes and reads, guaranteeing data integrity and avoiding overrun.
Monitoring and diagnostics
Tools such as sysctl, proc entries, and the smc‑tools suite provide visibility into SMC‑R sockets and performance metrics.
Performance results
Benchmarks on Alibaba Cloud with Elastic RDMA show that SMC‑R improves Redis QPS by ~50% for latency‑sensitive workloads and increases Thrift and Netty RPC throughput by 30% and 12% respectively, while maintaining full socket compatibility.
Limitations
RDMA connection establishment is slower than TCP, and memory consumption per connection is higher, making SMC‑R less suitable for short‑lived connections or public‑internet exposure.
Future work
The SMC‑R code will be open‑sourced in the OpenAnolis high‑performance network SIG, with documentation on Alibaba Cloud Linux 3, aiming to make zero‑modification RDMA adoption easier for more cloud applications.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Open Source Linux
Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
