Linux Kernel and Measuring network throughput.

can Linux route at line-rate between two network interfaces? That’s the question we will try to answer in the next few minutes.

Photo by Dan Roizer on Unsplash

This article was originally published on my personal blog at Toonk.io

Test setup

n2.large.x86 CPU specs.
Test setup

Test 1 — packet forwarding on Linux

Receive Side Scaling (RSS)
Test results for test 1
14M pps, unidirectional test.

Test 2 - Introducing a simple stateful iptables rule

iptables -I FORWARD -d 10.10.11.1 -m conntrack — ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -I FORWARD -d 10.10.12.1 -m conntrack — ctstate RELATED,ESTABLISHED -j ACCEPT
Test results for test 2, impact of conntrack

Test 3 - Introducing a NAT rule

iptables -I POSTROUTING -t nat -d 10.10.12.1 -s 10.10.11.1 -j SNAT — to 10.10.12.2
iptables -I POSTROUTING -t nat -d 10.10.11.1 -s 10.10.12.1 -j SNAT — to 10.10.11.2
Test results for test 3
This is what a (unhappy) 64core system looks like when trying to forward and NAT 5.9M pps

Conclusion

--

--

Cloud Infrastructure geek based in Vancouver Canada. http://twitter.com/atoonk/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store