Re:Ask HN: What VPN service are you currently using?
by cbhl on Monday February 25, 2019 @12:15PM
(#19247254)
Does using multiple cores on a single NIC actually speed up a network connection? If you're doing gigabit with 1500 byte packets, you get 12 ms to encrypt and process each packet -- I'd expect any cross-CPU synchronization to easily blow through that.
[ Parent
| on HN ]
Re:Ask HN: What VPN service are you currently using?
by 05 on Monday February 25, 2019 @12:41PM
(#19247523)
If the bottleneck is encryption speed, then you can definitely improve perf by spreading packets across the cores. Inter-core synch isn’t that expensive, and 12us is 24000 cycles on a 2GHz CPU. cmpxchg costs ~20 cycles (https://stackoverflow.com/questions/4187914/average-latency-...).
PS. And you don’t need to submit/receive packets to NIC one by one, either; those things support DMA scatter/gather.