Light: A Scalable, High-Performance and Fully-Compatible User-Level TCP Stack
Light: A Scalable, High-Performance and Fully-Compatible User-Level TCP Stack
Dan Li (李丹)
Tsinghua University
Data Center Network Performance
Hardware Capability of Modern Servers
Multi-core CPU
100G~400Gbps NIC
Limitation of Linux Kernel
Command
Command
Shared Hugepage Memory
Queue
Queue
• BM (Backend Module) Light Epoll Light Socket
RX Ready Queue
TX Ready Queue
TX Ready Queue
sequentially.
Undertakes the major process logic of Light Process 0 core 0 core 1 Light Process 1
User Space
the TCP/IP/Ethernet protocols DPDK
Kernel
RSS Space
NIC
Architecture Overview (2)
Light-App Separation:
APP APP APP
Core 2 Applications
• Run the Light stack and Core 0 Core 1
• LD_PRELOAD Application
• dlsym
Dynamic Linker
Network-related APIs Other APIs
Hijacked by LD_PRELOAD
dlsym
Light FM Lib GNC C Lib
Design for Full Compatibility (2)
Distinguishing FD Spaces:
ssize_t read(int fd, void *buf, size_t
count)
Bottom-up Top-down
0
Light
glibc
Implementation
Design for Full Compatibility (3)
FIFO
Kernel Light FD
Design for Full Compatibility (4)
Resource Recycle
App 1
3
Epoll Monitor
IPC socket 1
App 2
IPC socket 2
1
Kernel
Design for High Performance (1)
System Configuration
Ubuntu 18.04 (kernel version 4.15.0-13-generic)
DPDK 17.02
Code
18263 lines of C code (excluding DPDK Library and the
protocol stack ported from the kernel)
APIs
Most TCP related APIs have been realized.
Evaluation (1)
Request
Response
Request
Response
Request
Response
• Network Latency
adapter-library(nstack adapter),
developed by DMM. The library utilizes HAL
Protocol Orchestrator
nRD
Stack-transparent “Protocol Routing” (Stack VPP
Host TLDK Light …
REST
Stack
orchestrator) L2~L4
Data-plane EAL REST
IPv4 IPv6
POSIX compatible socket APIs input/output input/output
Honeycomb
User
(SBR) Kernel
stack
Kernel
Space
DMM
VPP
Flexible APIs for integration of third party stacks NIC 3rd Party stack
(EAL)
Multiple stack instances support
Multiple I/O engines support
Future Work