I am doing some configuration on my home network and one of the questions always is: how fast is it REALLY.
To measure network speed, file downloads/transfers. The problem: you are intruducing several variables (server response,…).
I use iperf3 to do that. ipfer3 can be installed through MacPorts or homebrew.
On a server (e.g.: Mac mini connected to the router by cable), use the command “ipfer3 -sD”. s for server and D for deamon (so it doesn’t quit when you end the shell session).
Then on the client (e.g. your MacBook) you run it with “ipfer3 -c xx.xx.xx.xx”, xx being the IP address of the server. It then starts several TCP streams (UDP can also be done) and at the end (SUM), the total network throughput is shown. I have name resolution in my network, so I can use “iperf3 -c macmini”.
This is very useful to check if different router settings (2.4 vs 5, channel, location) affect your speed.
Bonus: I am configuring a server right now and since it is not doing and real work right now, i can use it to test internet speed. That server is attached to the net with a dedicated 1Gbit line and has enough reserves (Debian, 32GB, Intel NIC, 4 cores,…) to provide reliable results.
Feel free to use it (while it’s in “test state”) with: “iperf3 -c 220.127.116.11”. You can add parameters to iperf3, such as V for verbose (more info) and n to increase the amount of transferred data: “iperf3 -c 18.104.22.168 -V -n 50M”. iperf3 will be available on that server for the next days.
Speedtest works great but the problem with speed tests like this is that it doesn’t tell you much about latency – that time between when you click and when things start arriving. I seldom care about file download speed but those tenths of a second after every click are the difference between a snappy Mac experience and that sluggish feeling. And that general slowdown is hard to report to the services provider.
Speed issues here come and go and I can never summon enough data to prove it. I would love a way to monitor my Internet connection, pinging now and then and telling me when things are slow.
Replace 22.214.171.124 for whatever server you want to ping against and ~/Desktop/ping.txt for the file you want to log your pings. This sends a new line to the text file each time you execute it and adds it. Two columns: date+time, ping. Before writing the ping, three pings are used to initialize the pinging, since I observed that the first ping is often way off. If you are interested in initial pings, remove the ping with the -c 3.
You can automate it and execute it at regular intervals. Either through cron/crontab, Keyboard Maestro (periodical trigger) or whatever tool allows you to execute a shell script at given intervals.
I would argue that you never can know exactly, because there are so many variables in play when it comes to network speed.
Your approach of averaging internal to the network traffic is probably one of the best ways of measuring your internal network.
The speed test sites while not perfect are good enough for most people. Since joe blogs probably is not transferring large files point to point within their house.
My approach if I ever were to really care (I live in Australia, our best internet is still garbage) I would probably replicate much of what the speed test people do, which is bung up severs with several different cloud providers, in multiple regions, hit all of them and average speed.
I also suspect that this question from @Lars was more like the workflow questions, a here’s how I do a thing, do you see room for improvement.
And basically the only improvement I can see is on the usability side of things, joe blogs does not want to be running terminal commands it is “too hard”, people are lazy, whack a GUI on in electron, as a controller over the top of the script, add some pretty charts, some input validation and throw it up on the store for $3 a pop, and see what happens.
Like @MRubenzahl I’m more concerned with Latency and Jitter (rather than speed) because I do a lot of videoconferencing to international locations with marginal connectivity. A fast connection with >100ms Jitter will only support a compromised visual collaboration.
This is a very comprehensive test for US connections. It requires installing a small bit of code locally. A brief sample of the extensive tests is here.
A useful test for desktop and mobile devices is found at nperf.com. They have servers all over the world, so I ask colleagues to run the test from their location and send me the results. Note that if running the mobile version, you probably want to select “Speed Test” instead of “Full Test” under the configuration options. A full test will use a lot of bandwidth if the connection is metered.
With the talk about monitoring performance over time, I need to add SamKnows. It’s a modified router box that tests performance around the clock. It’s free, but you must apply for one and availability seems to depend on the sponsoring organizations (governments, ISPs, mysterious corporations…). See samknows.com.
Anyway, once you have the box you can examine up and down performance, latency, error rates, DNS performance. Here’s my past day. It can also average any period of time to show the hourly rates, and show daily averages over time.