NetKernel: Making Network Stack Part of the Virtualized Infrastructure
Zhixiong Niu, Hong Xu, Peng Cheng, Qiang Su, Yongqiang Xiong, Tao Wang, Dongsu Han, Keith Winstein
NetKernel: Making Network Stack Part of the Virtualized - - PowerPoint PPT Presentation
NetKernel: Making Network Stack Part of the Virtualized Infrastructure Zhixiong Niu , Hong Xu, Peng Cheng, Qiang Su, Yongqiang Xiong, Tao Wang, Dongsu Han, Keith Winstein Current architecture in the cloud VM VM APP APP Guest OS Guest OS
Zhixiong Niu, Hong Xu, Peng Cheng, Qiang Su, Yongqiang Xiong, Tao Wang, Dongsu Han, Keith Winstein
2
VM
APP Guest OS DCN Infrastructure Hypervisor infrastructure
Network Stack
VM
APP Guest OS
Network Stack
3
TCP parameters
initcwnd initialRTO (ms) minRTO (ms) DelayedAckTimeout (ms)
4
BBR CUBIC MPTCP PCC CTCP DCTCP mTCP
StackMap
FastSocket
MegaPipe FlexSC
Kernel Buffer net.ipv4.tcp_rmem net.ipv4.tcp_wmem net.core.rmem_max net.core.wmem_max
5
Kernel Kernel NIC NIC NIC
6
Resources
DPDK Kernel FPGA RDMA NIC
7
Stack
Provider Tenant
Can’t deploy new stacks (DCTCP) Difficult to perform management tasks Difficult to even define performance SLA Difficult to troubleshoot
8
Current architecture
9
Interface unchanged (BSD sockets, etc.)
Packets handled in the NSM
9
10
applications?
100 Gbps)?
11
12
socket(), socket_sendmsg(), … nk_socket(), nk_socket_sendmsg(), …
Tenant VM GuestLib
nk_socket(), nk_sendmsg(), …
BSD Socket API
socket(), send(), …
GuestLib
transmission in NetKernel device
13
1B
type 1B VM ID 1B Queue set ID 4B VM socket ID 8B
8B data pointer 4B size 5B rsved
Tenant VM GuestLib
nk_bind(), nk_sendmsg(), …
Huge pages
BSD Socket API
socket(), send(), …
NQE
(2) translate to NQE (1) NetKernel socket (3) response NQE (4) return to app
NetKernel device Queues
14
VM1
GuestLib NK device CoreEngine
connection table
queue set 1 ServiceLib
NSM 1
<VM ID, queue set ID, socket ID> <NSM ID, queue set ID, socket ID> <01, 01, 2A 3E 97 C3> <01, 01, C8 5D 42 6F> <01, 01, FC 68 4E 02> <01, 02, ?>
…
queue set 2 queue set 1
15
Tenant VM GuestLib (NetKernel Socket)
pNICs
NetKernel device Huge pages Huge pages queues
stripped area indicates a shared memory region mmap
BSD Socket APP2 APP1 NSM ServiceLib Huge pages Network Stack NetKernel CoreEngine
Virtual Switch or Embedded Switch (SR-IOV) vNIC
queues
16
17
10 20 30 40 50 60 Time (min) 20 40 60 80 100 120 Normalized rps performance AG1 AG2 AG3
18
Application Gateway (AG): L7 proxy and load balancing services AG1 AG2 AG3 Normalized RPS Performance of a trace from a large cloud 4 core 4 core 4 core
19
10 20 30 40 50 60 Time (min) 2 4 6 8 10 12 14 Normalized rps per core Baseline Netkernel
AG1 AG2 AG3 NSM CoreEngine 1 core 1 core 1 core 5 cores 1 core
NetKernel: 9 Cores Baseline: 12 Cores
Benefit: NetKernel can help operator perform network management more efficiently
20 50 100 150 200 250 300 350 400 1 vCPU 2 vCPUs 4 vCPUs Kernel Stack NSM mTCP NSM
Krps
mTCP NSM brings ~1.8x performance gain
64 128 256 512 1024 2048 4096 8192
0essage 6ize (B)
20 40 60 80 100 120
TKrougKSut (GbSs) Baseline 1et.ernel w. sKareG mem 160
21
bridge overhead
Shared memory NSM can achieve >2x performance gain for on-host traffic Deployment and performance gains for users
Benefit: NetKernel can help user achieve deployment and performance gains
22
1 2 3 4 5 6 7 8 # of vC38s 20 40 60 80 100 120
7KUougKput (Gbps) Baseline 1etKeUnel
the same setting
Send Receive
Can achieve 100Gbps with 3 cores (send), 8 cores (receive)
1 2 3 4 5 6 7 8 # of vC38s 20 40 60 80 100 120
7KUougKput (Gbps) Baseline 1etKeUnel
23
mTCP NSM brings 2x performance gain
1 2 3 4 5 6 7 8 # Rf vC38s 200 400 600 800 1000 1200 5eTuests / sec (x 103 )
Baseline 1et.eUnel 1et.eUnel w. P7C3 160 P7C3
NSMs
24
NICs
25