Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

genet0 speeds under NetBSD/aarch64 on Rpi4 8 GB using UEFI/ACPI v1.17 firmware



It's probably well-known that the "GbE" NIC on the Raspberry Pi 3 is only able to achieve ~300 Mbits/s due to having hardware that is implemented via the device's USB hardware that limits its performance.  The RPi4 boasts a "true" GbE NIC, so I wanted to test whether I could achieve this under NetBSD/aarch64 -CURRENT.

TL;DR: I couldn't, but this isn't due to the hardware. :-(

I ran several speed tests using iperf3.  The tests were between the RPi4 and a laptop, which acted as the server ("iperf3 -s").  Both where connected to the same VLAN on the same physical switch.  I tested both sending and receiving (-R) performance.

As a comparison, I performed the iperf3 tests running under the latest version of Raspberry Pi OS and under NetBSD/aarch64 9.99.69-CURRENT (GENERIC64) that is booted from the UEFI/ACPI firmware v1.17.

The basic command used in each test is this:

	iperf3 -c 10.23.5.100 --repeating-payload -t 20 -O 5

I used the same command with "-R" added for the receiving tests.  I used "--repeating-payload" to eliminate any possible effects of random number generation affecting load.  The "-t 20" runs the test for 20 seconds and "-O 5" ignores the first 5 seconds (to let the transfer "get up to speed").

Here are the results:

===== NetBSD/aarch64 sending =====
Connecting to host 10.23.5.100, port 5201
[  6] local 10.23.5.65 port 65499 connected to 10.23.5.100 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  6]   0.00-1.00   sec  78.9 MBytes   659 Mbits/sec    0   4.00 MBytes       (omitted)
[  6]   1.00-2.01   sec  80.0 MBytes   664 Mbits/sec    0   4.00 MBytes       (omitted)
[  6]   2.01-3.01   sec  78.8 MBytes   665 Mbits/sec    0   4.00 MBytes       (omitted)
[  6]   3.01-4.00   sec  78.8 MBytes   664 Mbits/sec    0   4.00 MBytes       (omitted)
[  6]   4.00-5.01   sec  80.0 MBytes   664 Mbits/sec    0   4.00 MBytes       (omitted)
[  6]   0.00-1.01   sec  80.0 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]   1.01-2.01   sec  78.8 MBytes   658 Mbits/sec    0   4.00 MBytes
[  6]   2.01-3.01   sec  78.8 MBytes   663 Mbits/sec    0   4.00 MBytes
[  6]   3.01-4.00   sec  71.2 MBytes   603 Mbits/sec    0   4.00 MBytes
[  6]   4.00-5.01   sec  67.5 MBytes   561 Mbits/sec    0   4.00 MBytes
[  6]   5.01-6.01   sec  78.8 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]   6.01-7.02   sec  80.0 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]   7.02-8.01   sec  78.8 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]   8.01-9.00   sec  78.8 MBytes   664 Mbits/sec    0   4.00 MBytes
[  6]   9.00-10.01  sec  80.0 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]  10.01-11.01  sec  78.8 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]  11.01-12.00  sec  78.8 MBytes   664 Mbits/sec    0   4.00 MBytes
[  6]  12.00-13.01  sec  80.0 MBytes   665 Mbits/sec    0   4.00 MBytes
[  6]  13.01-14.01  sec  78.8 MBytes   664 Mbits/sec    0   4.00 MBytes
[  6]  14.01-15.01  sec  78.5 MBytes   654 Mbits/sec    0   4.00 MBytes
[  6]  15.01-16.00  sec  78.8 MBytes   669 Mbits/sec    0   4.00 MBytes
[  6]  16.00-17.01  sec  80.0 MBytes   668 Mbits/sec    0   4.00 MBytes
[  6]  17.01-18.01  sec  78.8 MBytes   661 Mbits/sec    0   4.00 MBytes
[  6]  18.01-19.01  sec  80.0 MBytes   666 Mbits/sec    0   4.00 MBytes
[  6]  19.01-19.99  sec  77.5 MBytes   667 Mbits/sec    0   4.00 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  6]   0.00-19.99  sec  1.53 GBytes   656 Mbits/sec    0             sender
[  6]   0.00-20.19  sec  1.54 GBytes   656 Mbits/sec                  receiver

iperf Done.
===== NetBSD/aarch64 sending =====

It's faster than ~300 Mbits/s, which is encouraging!

===== NetBSD/aarch64 receiving =====
Connecting to host 10.23.5.100, port 5201
Reverse mode, remote host 10.23.5.100 is sending
[  6] local 10.23.5.65 port 65497 connected to 10.23.5.100 port 5201
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-1.00   sec  10.1 MBytes  84.3 Mbits/sec                  (omitted)
[  6]   1.00-2.01   sec  12.9 MBytes   107 Mbits/sec                  (omitted)
[  6]   2.01-3.01   sec  5.74 MBytes  48.4 Mbits/sec                  (omitted)
[  6]   3.01-4.01   sec  10.0 MBytes  83.9 Mbits/sec                  (omitted)
[  6]   4.01-5.01   sec  10.7 MBytes  89.8 Mbits/sec                  (omitted)
[  6]   0.00-1.01   sec  8.33 MBytes  69.2 Mbits/sec
[  6]   1.01-2.00   sec  7.17 MBytes  60.7 Mbits/sec
[  6]   2.00-3.01   sec  6.74 MBytes  56.2 Mbits/sec
[  6]   3.01-4.00   sec  9.93 MBytes  83.6 Mbits/sec
[  6]   4.00-5.00   sec  9.57 MBytes  80.2 Mbits/sec
[  6]   5.00-6.00   sec  6.05 MBytes  51.0 Mbits/sec
[  6]   6.00-7.01   sec  5.52 MBytes  45.9 Mbits/sec
[  6]   7.01-8.00   sec  5.92 MBytes  50.1 Mbits/sec
[  6]   8.00-9.00   sec  10.7 MBytes  89.4 Mbits/sec
[  6]   9.00-10.01  sec  11.6 MBytes  96.7 Mbits/sec
[  6]  10.01-11.00  sec  6.37 MBytes  53.8 Mbits/sec
[  6]  11.00-12.01  sec  8.53 MBytes  71.1 Mbits/sec
[  6]  12.01-13.00  sec  9.19 MBytes  77.5 Mbits/sec
[  6]  13.00-14.01  sec  10.5 MBytes  88.1 Mbits/sec
[  6]  14.01-15.00  sec  10.3 MBytes  87.2 Mbits/sec
[  6]  15.00-16.00  sec  7.98 MBytes  66.8 Mbits/sec
[  6]  16.00-17.01  sec  6.84 MBytes  56.8 Mbits/sec
[  6]  17.01-18.01  sec  4.09 MBytes  34.3 Mbits/sec
[  6]  18.01-19.00  sec  8.24 MBytes  70.0 Mbits/sec
[  6]  19.00-20.00  sec  4.32 MBytes  36.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-20.20  sec   160 MBytes  66.5 Mbits/sec                  sender
[  6]   0.00-20.00  sec   158 MBytes  66.2 Mbits/sec                  receiver

iperf Done.
===== NetBSD/aarch64 receiving =====

However, receiving is very erratic and not even 100 Mbits/s (though I do dimly recall seeing occasional bursts over 100 Mbits/s on a few runs)! :-(

For comparison, here are the speeds I got when running the same iperf3 commands when booted into Raspberry Pi OS:

===== Raspberry Pi OS sending =====
Connecting to host 10.23.5.100, port 5201
[  6] local 10.23.5.65 port 42104 connected to 10.23.5.100 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  6]   0.00-1.00   sec   109 MBytes   914 Mbits/sec    0    366 KBytes       (omitted)
[  6]   1.00-2.00   sec   113 MBytes   946 Mbits/sec    0    366 KBytes       (omitted)
[  6]   2.00-3.00   sec   112 MBytes   940 Mbits/sec    0    366 KBytes       (omitted)
[  6]   3.00-4.00   sec   112 MBytes   940 Mbits/sec    0    366 KBytes       (omitted)
[  6]   4.00-5.00   sec   112 MBytes   940 Mbits/sec    0    387 KBytes       (omitted)
[  6]   0.00-1.00   sec   112 MBytes   939 Mbits/sec    0    387 KBytes
[  6]   1.00-2.00   sec   110 MBytes   926 Mbits/sec    0    404 KBytes
[  6]   2.00-3.00   sec   110 MBytes   927 Mbits/sec    0    404 KBytes
[  6]   3.00-4.00   sec   110 MBytes   925 Mbits/sec    0    404 KBytes
[  6]   4.00-5.00   sec   110 MBytes   923 Mbits/sec    0    404 KBytes
[  6]   5.00-6.00   sec   110 MBytes   923 Mbits/sec    0    404 KBytes
[  6]   6.00-7.00   sec   110 MBytes   922 Mbits/sec    0    404 KBytes
[  6]   7.00-8.00   sec   110 MBytes   924 Mbits/sec    0    404 KBytes
[  6]   8.00-9.00   sec   109 MBytes   919 Mbits/sec    0    404 KBytes
[  6]   9.00-10.00  sec   112 MBytes   936 Mbits/sec    0    622 KBytes
[  6]  10.00-11.00  sec   112 MBytes   943 Mbits/sec    0    622 KBytes
[  6]  11.00-12.00  sec   111 MBytes   933 Mbits/sec    0    622 KBytes
[  6]  12.00-13.00  sec   112 MBytes   944 Mbits/sec    0    622 KBytes
[  6]  13.00-14.00  sec   111 MBytes   933 Mbits/sec    0    622 KBytes
[  6]  14.00-15.00  sec   111 MBytes   934 Mbits/sec    0    622 KBytes
[  6]  15.00-16.00  sec   112 MBytes   944 Mbits/sec    0    622 KBytes
[  6]  16.00-17.00  sec   112 MBytes   944 Mbits/sec    0    622 KBytes
[  6]  17.00-18.00  sec   112 MBytes   943 Mbits/sec    0    622 KBytes
[  6]  18.00-19.00  sec   111 MBytes   933 Mbits/sec    0    622 KBytes
[  6]  19.00-20.00  sec   112 MBytes   944 Mbits/sec    0    622 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  6]   0.00-20.00  sec  2.17 GBytes   933 Mbits/sec    0             sender
[  6]   0.00-20.00  sec  2.17 GBytes   933 Mbits/sec                  receiver

iperf Done.
===== Raspberry Pi OS sending =====

===== Raspberry Pi OS receiving =====
Connecting to host 10.23.5.100, port 5201
Reverse mode, remote host 10.23.5.100 is sending
[  6] local 10.23.5.65 port 42100 connected to 10.23.5.100 port 5201
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-1.00   sec   111 MBytes   930 Mbits/sec                  (omitted)
[  6]   1.00-2.00   sec   112 MBytes   941 Mbits/sec                  (omitted)
[  6]   2.00-3.00   sec   112 MBytes   941 Mbits/sec                  (omitted)
[  6]   3.00-4.00   sec   112 MBytes   941 Mbits/sec                  (omitted)
[  6]   4.00-5.00   sec   112 MBytes   941 Mbits/sec                  (omitted)
[  6]   0.01-1.00   sec   113 MBytes   940 Mbits/sec
[  6]   1.00-2.00   sec   112 MBytes   941 Mbits/sec
[  6]   2.00-3.00   sec   112 MBytes   941 Mbits/sec
[  6]   3.00-4.00   sec   112 MBytes   941 Mbits/sec
[  6]   4.00-5.00   sec   112 MBytes   941 Mbits/sec
[  6]   5.00-6.00   sec   112 MBytes   941 Mbits/sec
[  6]   6.00-7.00   sec   112 MBytes   941 Mbits/sec
[  6]   7.00-8.00   sec   112 MBytes   941 Mbits/sec
[  6]   8.00-9.00   sec   112 MBytes   941 Mbits/sec
[  6]   9.00-10.00  sec   112 MBytes   941 Mbits/sec
[  6]  10.00-11.00  sec   112 MBytes   941 Mbits/sec
[  6]  11.00-12.00  sec   112 MBytes   941 Mbits/sec
[  6]  12.00-13.00  sec   112 MBytes   941 Mbits/sec
[  6]  13.00-14.00  sec   112 MBytes   941 Mbits/sec
[  6]  14.00-15.00  sec   112 MBytes   941 Mbits/sec
[  6]  15.00-16.00  sec   112 MBytes   941 Mbits/sec
[  6]  16.00-17.00  sec   112 MBytes   941 Mbits/sec
[  6]  17.00-18.00  sec   112 MBytes   941 Mbits/sec
[  6]  18.00-19.00  sec   112 MBytes   941 Mbits/sec
[  6]  19.00-19.99  sec   112 MBytes   941 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  6]   0.00-20.00  sec  2.19 GBytes   941 Mbits/sec                  sender
[  6]   0.00-19.99  sec  2.19 GBytes   941 Mbits/sec                  receiver

iperf Done.
===== Raspberry Pi OS receiving =====

It seemed to me that sending was faster (vs. receiving) on NetBSD/aarch64 and receiving was faster (vs. sending) on Raspberry Pi OS.

Am I right in assuming the difference is due to the implementation of genet0 in the UEFI/ACPI firmware?  I am guessing the driver implementation under Raspberry Pi OS is better taking advantage of the hardware, including maybe any hardware offload it may provide??

Is there anything obvious I can do to improve network speeds under NetBSD/aarch64?

I am using "ACPI" in my firmware, not "ACPI + devicetree".  Should I be using the latter with NetBSD/aarch64?

Cheers,

Paul.


Home | Main Index | Thread Index | Old Index