Thank you for starting this great thread. A lot of good advice in here.
I also have a few tips to contribute.
iperf3 tips
One important thing to note here is that by default iperf3 UPLOADS data from the client to the server.
The reason this is important to consider on WiFi is that WiFi clients oftentimes have much weaker antennas than WiFi routers.
For example, on my M1 Macbook Air I can get up to 700-800 mbit when downloading from the server, but only 400-500 when uploading.
This can be solved by using this option:
-R, --reverse run in reverse mode (server sends, client receives)
I would suggest to add that to all the commands in your post, because download is probably what most people are interested in testing.
Where you run the testing tool server and client is important
A lot of the performance is affected by the processing speed of the components between the client and the server.
For example, if you have a router with a weak CPU and run the iperf3 server on the router, then it's possible the speeds will be limited, because iperf3 itself uses up a large portion of the router's available CPU and starves the router of the CPU to achieve full wifi transmission rates.
The solution would be to connect a wired computer to the router that runs the iperf3 server. And then run the test from a wifi client to the wired computer.
But this stil doesn't give you the FULL picture. Because routing from lan to wan also requires CPU power and this is not being done when testing on lan only. This is especially important if you want to test the maximum bandwidth your router can handle with SQM.
If you want to determine the routing capabilities, then the iperf3 server should be "behind the WAN port" of the router.
Realistically you would need two routers for that setup.
For example, maybe you have the ISP router that's connected to the internet and has a LAN of 192.168.1.0/24.
Then you connect the new router you want to test to it that has its own lan of 192.168.2.0/24. Plug the new router's WAN port into the ISP router's LAN port so that it is in both networks and routes between them.
Then you connect a the iperf3 server to the ISP router. And you connect the wifi client to the new router.
Then you run the test from a client connected to the new router. This fully tests the performance of your router and all components involved.
Again, this is most likely not necessary if you just want to test your current network connection as you can run speedtests directly to the internet to test the routing performance.
But if you want to determine the maximum performance your router is capable off, then that's one way to do it.
Test bufferbloat on both wired and wifi
A similar issue si when you are measuring bufferbloat (latency under load). You should always first test it on ethernet to determine the bufferbloat performance of the routing component and SQM system.
This tests the bufferbloat between router and ISP.
After that you can test it on WiFi to determine if there is any additional bufferbloat between WiFi -> Router.
Avoid WiFi scanning tools while testing
Another important thing that could trip you up if you are testing a lot of things is WiFi scanning.
If you run a software that analyses channels, then the software is going to make periodic scans of available WiFi access points.
When it does that, it oftentimes interrupts the entire WiFi connection. This causes all WiFi transmissions to stop for a few miliseconds or even seconds.
This can cause you to have huge ping spikes and reduced transmission that will give you the wrong impression of your WiFi performance.