6 ms·
Most switches are routing switches and the same pipeline is used for both L2 switching and L3 routing. There is no sensible difference in switching and routing
by vbernat 9y ago
Most switches are routing switches and the same pipeline is used for both L2 switching and L3 routing. There is no sensible difference in switching and routing unless the switch has the ability to completely disable L3 routing. The typical latency is 500ns in store-and-forward mode (cut-through fallbacks to store-and-forward in most situations). If L2 processing could be done in 300ns, this is 200ns. With 10 routers, this is 0.002 milliseconds. Not something noticeable. Even if you compare with cut-through switching which could lower the latency to 50ns, that's still only a 0.005 milliseconds penality.
- baybal2 9y agoMy measurements give me from 10ms to 50ms for IP routing on mainstream hardware (for the whole route). L2 switching is faster than IP routing because even cheap "smart" L2 hardware come with hardware acceleration, but a typical non-core router for a mid-tier ISP is usually a consumer grade, PC hardware based router.
- vidarh 9y agoDo you mean microseconds here? ms is milliseconds, and that just does not make any sense. E.g. I'm 7 (visible) hops away from the nearest Google DNS, and roundtrip pings to 8.8.8.8 are between 7ms and 8ms.
- baybal2 9y agoYes, milliseconds. The difference there is because routers above you most likely are a carrier grade equipment like Cisco gear with ASIC based switching. This is what you can expect from big ISP in a big city, and less likely in networks serving more remote suburbs.
- vbernat 9y agoAn EX2200, a routing switch you can pay for about 500$, is also ASIC-based. Linux on a server has no problem routing with a latency in the order of 100ns. I don't see what kind of equipments would route in the order of 10ms. That's just too huge.
- baybal2 9y agoI meant 10ms for the whole route. >100ms Under load with anymuch sizeable routing table?
- vbernat 9y agoRoute lookup with 1 core with a full view on Linux is on the order of 100ns. https://vincent.bernat.im/en/blog/2017-ipv4-route-lookup-linux#performance_1 https://vincent.bernat.im/en/blog/2017-ipv4-route-lookup-lin... Linux is able to handle about 5 Gbps of traffic of small packets (64 bytes) with one core. This gives a latency of 100ns to keep the pace. You need to find a Linux router 10000 time slower than this to get a 1ms latency.
- baybal2 9y agoThen, I must be getting something wrong