Best practices and tools for measuring wifi performance

Sidenote: a lot of the measurement packages seem either "complete" or stalled in development...
Which is a real pity especially for the one-way delay measurement tools out there, just had a look at owping and e.g. the absence of an installable packet for ubuntu does not fill me with confidence (let alone OpenWrt)...

I wish IPv6 had mandated that ICMP timestamps would still be required (and I dream about a tighter definition/resolution of what to reply, so e.g. microseconds since midnight UTC instead of millisecond since midnight UTC and no backsies...). Alas, not much use closing that barn, as the time window to solve that is clearly well in the past by now.

1 Like

A command that queues 14 Iperf3 throughput tests and writes the output to a text file:

Today I learned how to queue commands in cmd.exe and how to write output to a textfile. Cmd.exe is the Windows 10 command line tool; The command should also work with Linux, but I have not tried it yet.

Here is my final command, which singlehandedly triggers **14 separate iperf3 throughput tests and writes the output to a textfile located in the folder the command was called from.

(echo TCP test && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 && echo. && echo. && echo TCP test with 2 client streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 && echo. && echo. && echo TCP test with 4 Client Streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 && echo. && echo. && echo TCP test with 8 Client Streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 && echo. && echo. && echo Bidirectional TCP test && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 --bidir && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 --bidir && echo. && echo. && echo Bidirectional TCP test with 2 Client Streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 --bidir && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 --bidir && echo. && echo. && echo Bidirectional TCP test with 4 Client Streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 --bidir && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 --bidir && echo. && echo. && echo Bidirectional TCP test with 8 Client Streams && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 --bidir && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 --bidir && echo. && echo. && echo TCP test in reverse && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 -R && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 60 -i 10 -R && echo. && echo. && echo TCP test with 2 Client Streams in reverse && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 -R && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 2 -t 60 -i 10 -R && echo. && echo. && echo TCP test with 4 Client Streams in reverse && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 -R && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 4 -t 60 -i 10 -R && echo. && echo. && echo TCP test with 8 Client Streams in reverse && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 -R && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -P 8 -t 60 -i 10 -R && echo. && echo. && echo UDP test && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 20 -i 2 -u -b 1000M && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 20 -i 2 -u -b 1000M && echo. && echo. && echo UDP test in reverse && echo iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 20 -i 2 -u -b 1000M -R && echo. && iperf3 -c IP-ADRESS-OF-IPERF-SERVER -p 5201 -t 20 -i 2 -u -b 1000M -R) | tee output.txt

What to do if you want to use this command:

On Iperf server side:

  1. Temporarily open relevant ports (5201) in the firewall, which are necessary for Iperf to work
  2. Iperf3 -s

On Iperf client side:

  1. copy 'n paste the command into a text editor
  2. search and replace IP-ADRESS-OF-IPERF-SERVER with the IP adress of your Iperf server.
  3. (Optional) search and replace 5201 with the port your Iperf server listens at. (5201 is Iperf3's default)
  4. (Optional) search and replace output.txt with the filename of your choice

The long command explained:

I use following syntax:

(echo. && echo. && echo <Iperf3command1> && echo. && <Iperf3command1> && echo <Iperf3command2> && echo. && <Iperf3command2> && echo <Iperf3command3> && echo. && <command3>...) | tee <filename>

The important bits (apart from iperf3 related) are ...

  • echo. = A new line. This will make it easier to find the tests you were looking for in the output file. Simply for Aesthetics.
  • echo <command> = The echo command in Linux is used to display a string provided by the user. The syntax is echo [option] [string] (More info here: https://phoenixnap.com/kb/echo-command-linux). What is does is to print the text you entered after it. With echo <command> && <command> it will have the command you entered precede the output. This will make it easier to find the tests you were looking for in the output file.
  • && = Example: command1 && command2 = Used to run the command following && only, if the command preceding the symbol is successful. Cmd.exe runs the first command, and then runs the second command only if the first command completed successfully.
  • <your-command> | tee result.txt = Show output in Windows cmd, but also send to output file (https://stackoverflow.com/questions/25702196/how-to-save-iperf-result-in-an-output-file). The () are necessary, when multiple commands are queued, otherwise only the last command before | tee will be written to the file.

What advantages brings command queuing?

You will save lots of time. Gone are the days when you have to wait in front of your computer for a test to finish, before you can start the next command. With this syntax you can trigger multiple tests with a single press of the enter button and then spend some time with friends or simply enjoy life and come back in 30 minutes and everything should be done by then :slight_smile:

1 Like

I found the following article to be a great read and a pointer towards determining what end-users and Internet service providers should focus on when trying to detect throughput and latency bottlenecks in their network:

While I think the whole article is worth reading, there are some particular things worth noting

  1. There is a point where maximum throughput over time becomes less relevant to the average end-user, because as soon as individual applications (e.g. video streaming, video conferences, audio, gaming, ...) are successfully transmitting with their maximum saturation, no higher throughput is required by the application. This holds true until applications evolve in response to changes in the underlaying technology.

    Following graphics illustrate this point:


    That is to say, high throughput services (e.g. 1 Gbit/s) are NOT useless. They CAN aleviate the problem of conquestion, that is when there is too much traffic (by multiple users) going on at the same time. Since 1 Gbit/s services usually are achieved by installing fiber networks, getting rid of older infrastructure (e.g. copper wires) also eliminates at least some (marginal?) latency that came with that. In any case, conquestion is not the only problem users and ISPs have.

  2. In the article, there is lots of info about bufferbloat, buffers, queuing, packet loss rates, the importance of location and what latencies to expect, simply because of lower bound limitations (e.g. speed of light, latency in voice calls caused by encoding / decoding sound, ...).

    I guess, the takeaway would be, if you are an end-user and want to tune your network: do the waveform bufferbloat test and checkout QoS, FQ-Qodel, Cake, AQM and so on and so forth. (Note: not all of these tools apply to wifi!). While there are some things you can do with your local device, a lot depends on your internet service provider.

  3. If you require low latency, (automatic) tuning of AQM and introduction of Low Latency, Low Loss, Scalable Throughput (L4S) are something to look forward to! are proposed to make the world a better place (but it seems like L4S also has it's deficiencies).

I respectfully disagree... L4S was designed by people that believe "believing hard enough" can replace actual engineering, and it shows (in that L4S has known problem spots that in spite of being described well have not been addressed by L4S' proponents). L4S is designed primarily to built a short RTT fast-lane, without actually confessing that. You can assign that to incompetence or to intent, I opt for the latter. In that role it seems like an attempt at avoiding network neutrality rules all the while giving close-by data centers (aka larger ISPs with captive eye-balls) more leverage when trying to sell data center close to the eyeballs to content providers (CAPs)... as with L4S a CAP close by will massively outperform a CAP further away if both compete.
L4S is too little too late*... if you use sqm-scripts/cake today it is unlikely that you will notice a switch to L4S as a worthwhile improvement in responsiveness.

*) and it was already that decade ago its design began

I still consider it unfortunate that the IETF actually decided to publish the 3 L4S RFC before the well known deficiencies had been remedied, because as it stands these deficiencies will likely never be remedied. However I predict L4S will simply stutter/fail in the market as it over-promises and under-delivers.

3 Likes

Thank you for your insightful comment!

No with L4S (at least with the default L4S AQM the dual queue AQM) there is only one of each:
a) a low latency queue
b) a non-low latency queue

all L4S flows will share queue a) all the rest will share queue b), any flow misbehaving in a) will affect all other flows in a) as well (there are some proposed optional remedies (queue protection), but these are all easily side-stepped as they are not aimed at adversarial flow behavior). The L4S specifications also allow flow-queueing schedulers that would avoid that problem, but the expected largest immediate deployment of L4S (low latency docsis) will opt for a simplistic dual queue set-up and IMHO will be far inferior to today's cake/sqm-scripts.
Note however I am hardly objective in this matter, as I tried to convince the IETF to not ratify L4S and failed, so you can interpret my objection as valid or as "sour grapes", your choice :wink:

3 Likes

Hello. Thanks for sharing this information, and I'm a fan of Flent myself.
There's also a tool built in for MacOS in Monterey and newer called networkQuality. It's very basic but can be useful too. Just open the terminal and type.

networkQuality

To learn more about the tool type

man networkQuality

Here you can see the networkQuality tool in action https://www.youtube.com/watch?v=WcXcNdrEYR0.

Read more here https://support.apple.com/en-gb/HT212313 and https://github.com/network-quality/server.

1 Like