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

He's "cheating" by using sendmmsg() to send many messages per system call, reducing the number of context switches.


Barely. On a reasonably configured kernel (you need both syscall auditing and context tracking turned off, which is doable at compile time or runtime), a modern CPU should be able to round-trip a syscall in under 40 ns. That only eats 4% CPU at 1M syscalls per second.

(It's slightly worse than that due to extra cache and TLB pressure, but I doubt that matters in this workload.)




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

Search: