Publications

KVS: high-efficiency kernel-level virtual switch

2017 Symposium on Cloud Computing (SoCC '17), poster Association for Computing Machinery, New York, NY, USA, 635. https://doi.org/10.1145/3127479.3131615

Heungsik Choi, Gyeongsik Yang, Kyungwoon Lee, Chuck Yoo

Download PDF

Paper summary

Reduce packet-processing work inside the kernel

A kernel-level virtual switch can improve forwarding while using less memory than the compared DPDK implementation.

KVS targets repeated socket-buffer allocation and flow-lookup hashing in Linux virtual switching. It keeps processing in the kernel and does not use huge pages.

Reuse the packet buffer and the NIC’s hash

A single reusable socket buffer per core reduces cache misses. A revised exact-match cache uses the packet’s NIC-generated RSS hash to look up flow rules, avoiding another software hash calculation for each packet.

KVS reuses one socket buffer per core and uses the NIC’s RSS hash to index its exact-match cache.View full-size figure
KVS reuses one socket buffer per core and uses the NIC’s RSS hash to index its exact-match cache.

Trade peak forwarding rate for lower memory use

For 64-byte packets on one core, KVS forwards 2.68 Gbps, compared with 0.65 Gbps for Linux OVS and 4.2 Gbps for DPDK OVS. It uses 645 MB per core versus DPDK OVS’s 1,012 MB, a 36.3% saving. The single-buffer scheme also lowers measured last-level-cache misses per packet from 0.93 to 0.55. The results come from the paper’s single-server, small-packet setup.

Single-core forwarding throughput with 64-byte packets.
SwitchThroughput
Linux OVS0.65 Gbps
KVS2.68 Gbps
DPDK OVS4.2 Gbps

Key takeaways

  1. Kernel switching contains reusable work. Per-core packet buffers and NIC-provided hashes reduce allocation and lookup overhead without moving processing to user space.
  2. KVS trades peak forwarding rate for lower memory use. KVS improves the tested Linux switch and uses less memory than DPDK, while DPDK remains faster in the small-packet comparison.