Abstract
This paper presents a system called NetKernel that decouples the network stack from the guest virtual machine and offers it as an independent module. NetKernel represents a new paradigm where network stack can be managed as part of the virtualized infrastructure. It provides important efficiency benefits: By gaining control and visibility of the network stack, operator can perform network management more directly and flexibly, such as multiplexing VMs running different applications to the same network stack module to save CPU cores, and enforcing fair bandwidth sharing with distributed congestion control. Users also benefit from the simplified stack deployment and better performance. For example mTCP can be deployed without API change to support nginx natively, and shared memory networking can be readily enabled to improve performance of colocated VMs. Testbed evaluation using 100G NICs shows that NetKernel preserves the performance and scalability of both kernel and userspace network stacks, and provides the same isolation as the current architecture.
Introduction
In modern cloud computing, the network stack (TCP/IP) is typically bundled inside the guest Operating System of a Virtual Machine (VM). This "black box" approach creates several challenges for both operators and users. Cloud providers lack visibility into how VMs consume networking resources, making it difficult to guarantee performance SLAs or perform efficient troubleshooting. Furthermore, networking CPU resources are often over-provisioned per VM based on peak traffic, leading to significant resource waste when cores sit idle during off-peak periods.
NetKernel addresses these issues by decoupling the network stack from the guest VM and moving it into the cloud infrastructure managed by the operator. This shift allows cloud providers to consolidate networking resources, saving over 40% in CPU costs, while enabling users to deploy high-performance network stacks transparently without modifying their application code.
System Architecture and Methods
NetKernel treats the network stack as an independent, managed service. The architecture consists of four main components that facilitate this decoupling:
- GuestLib: A library residing inside the tenant VM that intercepts standard BSD socket calls (e.g.,
socket(),bind(),send()) and redirects them to the infrastructure. - NetKernel Queue Elements (NQEs): Small (32-byte), fixed-size descriptors that encapsulate socket semantics.
- CoreEngine: A software switch running on the hypervisor. It uses scalable, lockless shared-memory queues to route NQEs between VMs and the actual network stacks.
- Network Stack Module (NSM): A separate execution environment that runs the actual network stack. An NSM can host a standard Linux kernel stack or a high-performance userspace stack like mTCP.
By using this "split" architecture, applications can continue using standard socket APIs while the actual processing happens in a centralized module controlled by the operator.
Evaluation and Results
The researchers evaluated NetKernel using production cloud traces from September 2018 and synthetic benchmarks like nginx and redis on servers equipped with 100G NICs.
Efficiency and Performance
NetKernel demonstrated significant efficiency gains, saving over 40% of CPU cores by multiplexing multiple application gateways onto a single NSM. Despite the additional communication hop, NetKernel achieved a 100Gbps line rate for data transmission using only 3 cores, matching the performance of traditional architectures.
User Benefits
NetKernel simplifies the deployment of high-performance stacks. For instance, unmodified nginx running on NetKernel with an mTCP backend saw a 1.4x to 1.9x performance boost over the standard kernel stack. Additionally, for VMs colocated on the same host, NetKernel’s shared-memory prototype reached 100Gbps, roughly doubling the throughput of the standard TCP-based baseline. The system also successfully enforced bandwidth caps on "selfish" VMs, ensuring well-behaved tenants received their fair share of the 100G pipe.
Discussion and Future Work
The most significant insight of NetKernel is the power of multiplexing. Because VM traffic is bursty, operators can "over-subscribe" the network stack, serving many VMs with fewer cores without degrading performance. Furthermore, centralized control allows for the implementation of sophisticated congestion control or fair-sharing policies (like Seawall) at the infrastructure level.
However, challenges remain. At extremely high throughput (near 100Gbps), NetKernel incurs higher CPU overhead due to extra memory copies. Future work includes developing a zerocopy implementation and exploring hardware offloading of the CoreEngine to SmartNICs or FPGAs. Additionally, the "fate-sharing" aspect—where an NSM failure affects all connected VMs—requires robust management strategies.
Conclusion
NetKernel represents a paradigm shift in cloud networking by making the network stack a managed part of the infrastructure. This approach provides cloud operators with better visibility and resource efficiency while offering users high performance and simplified deployment of advanced networking stacks.
Summary updated