Local Speed Tests for All Occasions
It may seem unbelievable, but I do try to keep the number of widgets, gadgets and gizmos to a minimum. There's nothing I like more than smooshing everything I can out of a piece of hardware, so despite being released in 2019, I've only recently reached the point of needing a Raspberry Pi 4 on my home network. That was for the SDR++ server I've mentioned previously. I did try to run it on the Pi 3, but it really was too slow.
It's also handy to have something reliable I can run speed tests to from various devices. My network is (mostly) just normal gigabit, but the Pi 3 has its ethernet port connected over the on-board USB 2.0 bus, so is limited to about 300 Mbit/s even on the newer B+ version. No use having a speed test on that.
Persistent iperf3
The Pi 4 has proper gigabit throughput, so I have it sat with iperf3 constantly ready and waiting for when it's needed.
sudo apt install iperf3
Give it an /etc/systemd/system/iperf3.service file:
[Unit]
Description=iperf3 server
Documentation=man:iperf3(1)
After=network.target auditd.service
[Service]
Type=simple
Restart=always
RestartSec=15
User=iperf3
ExecStart=/usr/bin/iperf3 --server --interval 0
SuccessExitStatus=1
[Install]
WantedBy=multi-user.target
I like to run it under its own system user account, so I enable it like this:
sudo useradd -r -M -s /usr/sbin/nologin iperf3
sudo systemctl daemon-reload
sudo systemctl enable iperf3.service
sudo systemctl start iperf3.service
sudo systemctl status iperf3.service
And there it waits for something like this from a client:
iperf3 -c ip_address_of_pi
It's just very handy to have ready.
Extra Credit
I did put it on my Pi 3 for fun, but it's a 'Model B Rev 1.2', meaning the most I get out of it is classic Fast Ethernet at 100 Mbit/s. Then I had to stop myself falling down the Wikipedia rabbit hole investigating 10BASE2 ethernet, which was amazingly still in use at one of my first IT jobs.