Scalable Kernel TCP Design and Implementation for Short-Lived Connections

被引:32
|
作者
Lin, Xiaofeng [1 ]
Chen, Yu [2 ]
Li, Xiaodong [3 ]
Mao, Junjie [2 ]
He, Jiaquan [2 ]
Xu, Wei [2 ]
Shi, Yuanchun [2 ]
机构
[1] Sina Corp, ZHIHU Corp, Beijing, Peoples R China
[2] Tsinghua Univ, Dept Comp Sci & Technol, Beijing, Peoples R China
[3] Sina Corp, Beijing, Peoples R China
基金
国家高技术研究发展计划(863计划);
关键词
TCP/IP; multicore system; operating system;
D O I
10.1145/2954679.2872391
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
With the rapid growth of network bandwidth, increases in CPU cores on a single machine, and application API models demanding more short-lived connections, a scalable TCP stack is performance-critical. Although many clean-state designs have been proposed, production environments still call for a bottom-up parallel TCP stack design that is backward-compatible with existing applications. We present Fastsocket, a BSD Socket-compatible and scalable kernel socket design, which achieves table-level connection partition in TCP stack and guarantees connection locality for both passive and active connections. Fastsocket architecture is a ground up partition design, from NIC interrupts all the way up to applications, which naturally eliminates various lock contentions in the entire stack. Moreover, Fastsocket maintains the full functionality of the kernel TCP stack and BSD-socket-compatible API, and thus applications need no modifications. Our evaluations show that Fastsocket achieves a speedup of 20.4x on a 24-core machine under a workload of short-lived connections, outperforming the state-of-the-art Linux kernel TCP implementations. When scaling up to 24 CPU cores, Fastsocket increases the throughput of Nginx and HAProxy by 267% and 621% respectively compared with the base Linux kernel. We also demonstrate that Fastsocket can achieve scalability and preserve BSD socket API at the same time. Fastsocket is already deployed in the production environment of Sina WeiBo, serving 50 million daily active users and billions of requests per day.
引用
收藏
页码:339 / 352
页数:14
相关论文
共 50 条
  • [1] Scalable kernel TCP design and implementation for short-lived connections
    Lin X.
    Chen Y.
    Li X.
    Mao J.
    He J.
    Xu W.
    Shi Y.
    1600, Association for Computing Machinery (51): : 339 - 352
  • [2] Pallas: Optimizing Userspace TCP Stack for Short-Lived Connections
    Lin, Haiqiang
    Li, Wenxin
    Qu, Wenyu
    2022 IEEE 28TH INTERNATIONAL CONFERENCE ON PARALLEL AND DISTRIBUTED SYSTEMS, ICPADS, 2022, : 570 - 577
  • [3] Preemptive retransmission - Improving the performance of short-lived TCP connections
    Tarr, Alex J.
    Ghita, Bogdan V.
    PROCEEDINGS OF THE SIXTH IASTED INTERNATIONAL CONFERENCE ON COMMUNICATION SYSTEMS AND NETWORKS, 2007, : 63 - +
  • [4] Modeling short-lived TCP connections with open multiclass queuing networks
    Garetto, M
    Lo Cigno, R
    Meo, M
    Alessio, E
    Marsan, MA
    PROTOCOLS FOR HIGH SPEED NETWORKS, PROCEEDINGS, 2002, 2334 : 100 - 116
  • [5] Modeling short-lived TCP connections with open multiclass queuing networks
    Garetto, M
    Lo Cigno, R
    Meo, M
    Marsan, MA
    COMPUTER NETWORKS, 2004, 44 (02) : 153 - 176
  • [6] Analytical computation of completion time distributions of short-lived TCP connections
    Király, C
    Garetto, M
    Meo, M
    Marsan, MA
    Lo Cigno, R
    PERFORMANCE EVALUATION, 2005, 59 (2-3) : 179 - 197
  • [7] A Stochastic model for short-lived TCP flows
    Zheng, D
    Lazarou, GY
    Hu, R
    2003 IEEE INTERNATIONAL CONFERENCE ON COMMUNICATIONS, VOLS 1-5: NEW FRONTIERS IN TELECOMMUNICATIONS, 2003, : 76 - 81
  • [8] Modelling of wireless TCP for short-lived flows
    Pack, S
    Choi, YH
    INTERNATIONAL JOURNAL OF COMMUNICATION SYSTEMS, 2005, 18 (10) : 961 - 973
  • [9] Wireless TCP model for short-lived flows
    Pack, S
    Ahn, S
    Choi, Y
    Choe, S
    57TH IEEE VEHICULAR TECHNOLOGY CONFERENCE, VTC 2003-SPRING, VOLS 1-4, PROCEEDINGS, 2003, : 1725 - 1729
  • [10] Simulation analysis of RED with short lived TCP connections
    Altman, E
    Jiménez, T
    COMPUTER NETWORKS, 2004, 44 (05) : 631 - 641