I've recently been examining the performance statistics of my linux-based router, and have been surprised by what I'm seeing. I expected the routing workload to be much more taxing to RAM and CPU than it is. Can you help me understand why this is the case?
Asked
Active
Viewed 811 times
1 Answers
14
What part of a router's job takes up RAM? Precious little. Packets in, packets out. The network stacks of modern operating systems are very well-tuned, and all packet inspection and routing happen directly in the kernel, so no ancillary user-land code is necessary.
If your router is also performing NAT, then the state table would consume some memory, but even a modest 2GB system is able to store hundreds of thousands of NAT state table entries without blinking an eye.
Additionally, if your router is performing dynamic routing duties (VRRP, BGP, etc.) those will consume memory.
To conclude, though, most firewall and routing tasks are very easy on system resources.
EEAA
- 108,414
- 18
- 172
- 242
-
2And if you were to add lots of memory to be used for queuing packets for transmission, you would likely find that beyond a few KB per interface you'd likely see adding more memory causing worse performance rather than improving it. – kasperd Sep 07 '15 at 19:05