SocksDirect: Datacenter Sockets can be Fast and Compatible
- Bojie Li ,
- Tianyi Cui ,
- Zibo Wang ,
- Wei Bai (webai) ,
- Lintao Zhang (lintaoz)
ACM SIGCOMM Conference (SIGCOMM) |
Communication intensive applications in hosts with multi-core CPU and high speed networking hardware often put considerable stress on the native socket system in an OS. Existing socket replacements often leave significant performance on the table, as well have limitations on compatibility and isolation.
In this paper, we describe SocksDirect, a user-space high performance socket system. SocksDirect is fully compatible with Linux socket and can be used as a drop-in replacement with no modification to existing applications. To achieve high performance, SocksDirect leverages RDMA and shared memory (SHM) for interhost and intra-host communication, respectively. To bridge the semantics gap between socket and RDMA / SHM, we optimize for the common cases while maintaining compatibility in general. SocksDirect achieves isolation by employing a trusted monitor daemon to handle control plane operations such as connection establishment and access control. The data plane is peer-to-peer between processes, in which we remove multi-thread synchronization, buffer management, large payload copy and process wakeup overheads in common cases. Experiments show that SocksDirect achieves 7∼20x better message throughput and 17∼35x better latency than Linux socket, and reduces Nginx HTTP latency to 1/5.5.