Pallas: Optimizing Userspace TCP Stack for Short-Lived Connections

Haiqiang Lin, Wenxin Li, Wenyu Qu · 2023

Short-lived TCP connections are important for modern Internet applications and call for efficient network stack support. Traditional Linux TCP stack is inefficient because of the inherent kernel overheads like context switching and memory copy. A promising alternative, called user-level TCP stack, is thus becoming attractive in this context. However, existing user-level stacks mainly focus on scalability issues when handling shortlived connections and fall short in optimizing request-response latency. To fill this gap, this paper presents Pallas, a built-in packet scheduler in the user-space mTCP stack, to prioritize the transmissions of short connections over long connections to reduce the request-response latency. Pallas schedules at packetlevel first to complete 1-packet short connections as quickly as possible and then smoothly switches to connection-level to defer the transmissions of long connections. We have implemented a Pallas prototype and evaluated it on a 4-core machine. The results show that Pallas-enhanced mTCP delivers significant performance. For example, it speeds up the overall request response time of mTCP by 1.49 times.

Read the paper · More papers on PaperTik