By SIG for High Performance Network
Transmission Control Protocol (TCP), as the most widely used network protocol, is commonly applied in mobile communication, data center, and other scenarios. For data centers, Shared Memory Communications over RDMA (SMC-R) of high-performance network protocol is implemented through elastic RDMA, and the application TCP protocol is transparently replaced to realize the transparent acceleration of application network.
In this blog, we'll discuss the origin of SMC-R and its significance in enhancing the performance of TCP applications. If you'd like to learn more about SMC-R, you can check out the following blogs: "Transparently Improve TCP Application Network Performance on the Cloud" and "SMC-R: A Hybrid Solution of TCP and RDMA".
The Linux kernel network protocol stack does not have a silver bullet. The current Linux network protocol stack is implemented under the tradeoff of performance (throughput and CPU usage), latency, and generality.
In real-world scenarios, we may need a high-performance but not common user-mode protocol stack, or a common, higher-performance and lower-latency solution. However, solutions based on traditional ethernet network interface controllers are difficult to be significantly improved, but benefit more from hardware, such as 100G/400G networks. In view of this, we consider whether we can provide TCP compatible behavior and socket interfaces based on other high-performance networks to provide better performance.
Before talking about inter-host communication, let's focus on the stand-alone dimension. How can Inter-Process Communication (IPC) be implemented in the intra-host dimension? Here are several common IPC methods:
No doubt, shared memory is the fastest IPC method, but it lacks OS-level unified implementation and an interface. In most cases, the method is provided in the library of a specific programming language
Here, we break down the shared memory IPC process in the intra-host dimension:
If there is a technology that can "move" memory between two machines, then we can extend this high-performance IPC solution from the stand-alone dimension to different hosts. Obviously, Remote Direct Memory Access (RDMA) can help us efficiently move memory.
Compared with the shared memory communication process of a single machine, the RDMA-based process is as follows:
Based on the shared memory model of RDMA, SMC-R came into being. SMC-R is short for Shared Memory Communication over RDMA.
Let's take a look at how SMC-R accelerates TCP applications.
SMC-R is a hybrid protocol. It uses TCP to realize information interaction during connection establishment, and uses RDMA network to realize high-performance data transmission on the data path. At the same time, once the RDMA connection fails to be established, it can fallback to TCP, providing minimum communication capability over TCP. In addition, SMC-R with multiple RNICs can implement the fault migration of runtime to ensure runtime reliability.
RDMA provides the verbs interface for applications. Based on shared memory model, SMC-R offers a set of kernel interfaces that are fully compatible with TCP sockets. It can use LD_PRELOAD to transparently replace TCP sockets with SMC sockets according to replacing rules based on eBPF, and then to implement transparent replacement and acceleration.
Based on SMC-R transparent replacement, we tested several application scenarios. Among them, Redis improves its performance by up to 57%. Redis can enjoy the performance acceleration brought by SMC-R without any modification.
To realize transparent replacement and acceleration of TCP applications, you can use the following three solutions:
In OpenAnolis, we are also continuously enhancing and optimizing SMC, including performance, usage scenarios, stability and transparent replacement. SMC-R has participated in OpenAnolis for over six months, and contributed over 60 patches to the Linux upstream community.
You are welcome to communicate and exchange ideas in OpenAnolis. You can find relevant information from the links below.
OpenAnolis Officially Launches Its First CSV Confidential Container Solution with HYGON
84 posts | 5 followers
FollowOpenAnolis - June 26, 2023
Alibaba Cloud Community - July 15, 2022
OpenAnolis - March 7, 2022
OpenAnolis - June 15, 2022
OpenAnolis - May 13, 2022
Alibaba Clouder - June 24, 2020
84 posts | 5 followers
FollowConnect your business globally with our stable network anytime anywhere.
Learn MoreConnect your on-premises render farm to the cloud with Alibaba Cloud Elastic High Performance Computing (E-HPC) power and continue business success in a post-pandemic world
Learn MoreEstablish high-speed dedicated networks for enterprises quickly
Learn MoreAlibaba Cloud offers an accelerated global networking solution that makes distance learning just the same as in-class teaching.
Learn MoreMore Posts by OpenAnolis