I think this is a really good test! It tells you the theoretical maximum routing speed of the device, if the Ethernet ports were not a bottleneck. If you have a 100Mbps Internet connection and your router has gigabit ports but this test only comes back with 50Mbps then you know you're not going to get your full Internet speed through the device.
Here's the output for an old TP-Link WDR4300, no longer supported by the latest OpenWRT releases:
$ iperf3 -c localhost
Connecting to host localhost, port 5201
[ 4] local 127.0.0.1 port 60432 connected to 127.0.0.1 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 49.0 MBytes 409 Mbits/sec 0 1.06 MBytes
[ 4] 1.00-2.00 sec 47.3 MBytes 398 Mbits/sec 0 1.06 MBytes
[ 4] 2.00-3.01 sec 49.0 MBytes 409 Mbits/sec 0 1.06 MBytes
[ 4] 3.01-4.00 sec 46.7 MBytes 394 Mbits/sec 0 1.06 MBytes
[ 4] 4.00-5.00 sec 48.4 MBytes 406 Mbits/sec 0 1.06 MBytes
[ 4] 5.00-6.00 sec 47.9 MBytes 402 Mbits/sec 0 1.06 MBytes
[ 4] 6.00-7.00 sec 47.7 MBytes 400 Mbits/sec 0 1.06 MBytes
[ 4] 7.00-8.00 sec 47.8 MBytes 401 Mbits/sec 0 1.06 MBytes
[ 4] 8.00-9.00 sec 47.7 MBytes 400 Mbits/sec 0 1.06 MBytes
[ 4] 9.00-10.00 sec 47.7 MBytes 401 Mbits/sec 0 1.06 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 479 MBytes 402 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 478 MBytes 401 Mbits/sec receiver
This sort of data would be useful when planning to buy a device to use as a router. A while back I bought a Mikrotik CRS309, a managed 10 gigabit switch. Unfortunately the mangement side of it is almost useless because after buying it I found that while the switch part will pass traffic at 10G, if you want to do anything interesting it falls back to passing packets via the CPU...which is connected to the switch at 1G. And the CPU is so underpowered it only starts at 500 Mbps and each firewall rule you add drops the throughput by around 100Mbps. So despite it having 10 Gbps ports, it's a slower router than the above TP-Link, which tops out at around 112 Mbps with a dozen or so firewall/port forwarding rules.
As an experiment I tried adding an extra five dummy iptables rules that would match the lo
interface before the default ACCEPT
rule to see what kind of impact it would have, and it made no difference at all! So not sure what the Mikrotik was doing but OpenWRT seems to route much more efficiently.
It would be interesting to try these tests multithreaded. iperf v2 seems to be multicore, so just for a fun comparison here is a test on an old Dell server (PowerEdge R720), not running OpenWRT:
$ iperf -c localhost
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size: 2.76 MByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 41078 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 31.2 GBytes 26.8 Gbits/sec
And the same test running in parallel, one thread per CPU core:
$ iperf -c localhost -P16
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size: 2.76 MByte (default)
------------------------------------------------------------
[ ID] Interval Transfer Bandwidth
[ 11] 0.0-10.0 sec 21.4 GBytes 18.4 Gbits/sec
[ 12] 0.0-10.0 sec 21.3 GBytes 18.3 Gbits/sec
[ 7] 0.0-10.0 sec 21.1 GBytes 18.1 Gbits/sec
[ 8] 0.0-10.0 sec 21.3 GBytes 18.3 Gbits/sec
[ 3] 0.0-10.0 sec 21.3 GBytes 18.3 Gbits/sec
[ 6] 0.0-10.0 sec 21.4 GBytes 18.4 Gbits/sec
[ 4] 0.0-10.0 sec 21.3 GBytes 18.3 Gbits/sec
[ 5] 0.0-10.0 sec 21.1 GBytes 18.1 Gbits/sec
[ 10] 0.0-10.0 sec 21.1 GBytes 18.2 Gbits/sec
[ 18] 0.0-10.0 sec 21.4 GBytes 18.4 Gbits/sec
[ 9] 0.0-10.0 sec 21.2 GBytes 18.2 Gbits/sec
[ 22] 0.0-10.0 sec 21.2 GBytes 18.2 Gbits/sec
[ 14] 0.0-10.0 sec 21.2 GBytes 18.2 Gbits/sec
[ 13] 0.0-10.0 sec 21.2 GBytes 18.2 Gbits/sec
[ 16] 0.0-10.0 sec 21.4 GBytes 18.4 Gbits/sec
[ 17] 0.0-10.0 sec 21.3 GBytes 18.3 Gbits/sec
[SUM] 0.0-10.0 sec 340 GBytes 292 Gbits/sec
26 Gbps vs 292 Gbps is quite a big difference!