Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

Does that cause a ctx switch or any other overhead? What is the real world performance like relative to in-kernel networking?


It basically provides all packets in memory mapped space directly to userspace, and the NIC can populate that memory. There’s no context Switches involved unless you want them (eg wait for packets to arrive).

The performance really depends on your application. There’s a lot in the kernel network stack (eg iptables/nftables) that not every application needs and that might be costly. But then again for usual TCP based applications with larger dataflows the kernel path is also already decently optimized with hardware offloads - and running userspace networking stacks comes with its own issues.

If networking functions like sendmsg make up > 30% of an applications profile it can be worthwhile to investigate it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: