smoltcp runs 15M web servers on one VM
By bypassing the Linux kernel network stack and switching to userland networking via smoltcp with DPDK and AF_XDP, a developer successfully ran over 15 million concurrent web servers on a 10GB RAM, single-core VM. Custom lightweight isolation and zero-copy packet buffers slashed per-server memory overhead from 3.3KB in Linux kernel space down to 620 bytes in userspace.
Standard Linux kernel networking abstractions impose a hidden per-socket memory tax that quietly cripples hyper-dense sandbox and microservice architectures. Moving the network stack into userspace demonstrates that hardware limits are rarely the bottleneck—kernel data structures are.
- –Linux allocates ~3.3KB per socket across `tcp_sock`, `socket_alloc`, and VFS structures, exhausting memory around 2.5 million idle listeners on a 10GB VM.
- –Userland TCP/IP with smoltcp slashes idle server overhead to 620 bytes, enabling over 16 million servers within 10GB of RAM when paired with AnyIP subnet routing.
- –DPDK delivers top raw throughput by completely taking over the NIC with a dedicated polling core, but sacrifices host OS networking and SSH access in the process.
- –AF_XDP emerges as the pragmatic sweet spot for production systems, combining eBPF packet redirection and zero-copy userspace buffers without breaking kernel management tooling.
- –For AI agent sandboxes and microVM architectures running millions of isolated execution environments, kernel bypass and custom scheduling are transitioning from niche HFT tricks to mandatory runtime primitives.
DISCOVERED
12h ago
2026-11-19
PUBLISHED
15h ago
2026-11-19
RELEVANCE
AUTHOR
fessguid