Hacker News new | ask | show | jobs
by mmis1000 1344 days ago
In the last decade, we have bump link speed from 100m 1G to some board even have 2.5G rj45 port now. I am not sure if move data between kernel and userland at 2.5G/s is even a good idea.

And even worse, because kernel still have to distribute data to other userland program, you actually need another round trip so the impact need to multiply by two.

3 comments

Worse, IP package sizes didn't grow at all. So it would require 200 000 context switches per second if you don't want to add code bundling packets kernel-side and dispatching them a-la Nagle's algorithm. This is both error-prone and adds latency. Even worse, trampolines and other mitigations make it so switches clear CPU cache.
The trick is to not copy the data, but to pass pages around.
It's the opposite: In the last decade networking connection speeds have plateaued. In the 90s we had 100M ethernet, in the 00's 1G ethernet, in the 2010's 10G ethernet, and it stuck there for a long time. We had much much less CPU cycles available per packet when 1G came, for example.
I don't think I have seen 10G ethernet network card in consumer grade hardware even recently. 10G is there in core infrastructure for a long time. But only until recently you see 2.5Gbps in endpoint devices. (Probably 2.5 makes more sense to a RJ45 head cable)

And also I don't think 10G routers/switchs ever use pure software based solution to handle the traffics. They are all hardware based or mixed solutions.

It's amazing that memory bandwidth / cpu speed / core counts grows so much that makes this even possible. But it still isn't a good idea.