Live data from Hacker News

The networkQuality tool on macOS

cyberhost.uk

41–50 of 92 posts

Re: The networkQuality tool on macOS

#41
post #39

This is a little weird for me: Using Cloudflare's 1.1.1.1: ~> curl -s --doh-url https://cloudflare-dns.com/dns-query https://mensura.cdn-apple.com/api/v1/gm/config | jq -r .test_endpoint sgsin3-edge-bx-008.aaplimg.com PING sgsin3-edge-bx-008.b.aaplimg.com (17.253.61.15) 56(84) bytes of data. 64 bytes from sgsin3-edge-bx-008.b.aaplimg.com (17.253.61.15): icmp_seq=1 ttl=52 time=74.2 ms If I use 8.8.8.8: ~> curl -s --do…

Where are you actually located? 1.1.1.1 does not support the EDNS client subnet header [1], which means that practically, the CDN's DNS server will see your request as originating from your nearest 1.1.1.1 resolver. 8.8.8.8 does, so if the CDN evaluates it, you might get a better match (or a worse one!) [1] https://developers.cloudflare.com/1.1.1.1/faq/#does-1.1.1.1-...

EDNS makes a huge difference as many CDNS still use it.

Here is a test I did 4 years back. https://blog.miyuru.lk/edns-geo-table-2019/

I have a tinfoil-hat theory that CF removed EDNS support to make other CDNs slow and make their own CDN look good, but if there's a CF POP nearby it does not make much difference.

Re: The networkQuality tool on macOS

#42
Apple's "networkQuality" tool (or the open source alternative that you can run in other operating systems: https://github.com/network-quality/goresponsiveness) is very useful to understand how your connection behaves under extreme conditions, but extreme conditions is not something home connections see regularly, so make sure to use a combination of tools if you want to understand how your home connection behaves under expected use.

It's more of an art than a science, really, and your ISP may be optimizing for more average use cases.

Personally, I like to start with a regular web-based speed test (I'm biased towards https://speed.cloudflare.com, but any test that shows latency under load is OK, like https://www.waveform.com/tools/bufferbloat or https://fast.com [1]) and then combine it with "networkQuality" running concurrently (if possible, from a different host) and see how it impacts the numbers.

Of course, this only makes sense if you have your own router running (for example) OpenWRT where you can enable active queue management (SQM/AQM) and actually do something to improve the results [2].

[1] In more recent times I'm finding fast.com to be a bit unreliable, as some ISPs may treat Netflix traffic specially (like allowing for longer bursts over contracted speeds, etc. — net neutrality notwithstanding).

[2] I highly recommend this last option if you can. In my case, it allows me to be able to run "networkQuality" during a video call (over WiFi even) without any visible degradation. See: https://openwrt.org/docs/guide-user/network/traffic-shaping/...

Re: The networkQuality tool on macOS

#43
It’s good to have an article that highlights a tool others wouldn’t know about, and nice that the authors got the default config, but otherwise it literally just repeats the options from the help text.

Perhaps mostly GPT-generated text?

Re: The networkQuality tool on macOS

#44
post #42

Apple's "networkQuality" tool (or the open source alternative that you can run in other operating systems: https://github.com/network-quality/goresponsiveness ) is very useful to understand how your connection behaves under extreme conditions, but extreme conditions is not something home connections see regularly, so make sure to use a combination of tools if you want to understand how your home connection behaves un…

> Of course, this only makes sense if you, for example, have your own router running OpenWRT where you can enable active queue management (SQM/AQM)

You actually rarely if ever can make use of this, because you need flow offloading past ~175Mbps, which completely bypasses SQM.

Re: The networkQuality tool on macOS

#45

Very cool finding! Made me want to explore what other tools my mac has pre-installed in /usr/bin

One nice thing about macOS is that many of the system GUI tools are graphical wrappers around a command-line tool that does the real work.

Most of them live in /usr/sbin

I keep a list for my students. Here are some:

   diskutil
   mdfind
   mdutil
   plutil
   networksetup
   softwareupdate
   screencapture
   pmset
   hdiutil
   pkgutil
   caffeinate
   osascript
   defaults
   launchctl
For example, mdfind lets you use Spotlight search on the command line. diskutil powers "Disk Utility.app". pkgutil lets you install .pkg files and also get information about programs installed that way. screencapture lets you take screenshots from the command line (you can specify which windows, etc.)

Anyhow, there's a bunch.

There are also random useful executables not in $PATH. This program powers your WiFi menu:

   /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport
Try "airport -I"

A silly one-liners to print out your overall WiFi strength:

   airport -I | grep -E 'agrCtlRSSI|agrCtlNoise' | awk '{print $2}' | sed -e 'N;s/\n/ - /' | bc
Put that in a script called "wifi-strength" and walk around your house with a laptop while running the following:

   watch -n1 "wifi-strength | say"

Re: The networkQuality tool on macOS

#46
post #44
post #42

Apple's "networkQuality" tool (or the open source alternative that you can run in other operating systems: https://github.com/network-quality/goresponsiveness ) is very useful to understand how your connection behaves under extreme conditions, but extreme conditions is not something home connections see regularly, so make sure to use a combination of tools if you want to understand how your home connection behaves un…

> Of course, this only makes sense if you, for example, have your own router running OpenWRT where you can enable active queue management (SQM/AQM) You actually rarely if ever can make use of this, because you need flow offloading past ~175Mbps, which completely bypasses SQM.

That's not true, fortunately. You do need a router with a beefy CPU, though.

With SQM (CAKE) enabled, my WRT1900acs router (1.6GHz dual-core) can handle my 500/100 Mbps FTTH connection just fine, with plenty of CPU to spare. From my calculations it probably doesn't quite have enough CPU to sustain 1 Gbps, should I ever upgrade to that. But the router itself is a few years old now, so that's not really surprising.

Re: The networkQuality tool on macOS

#48

I don't see any explanation of what the results mean. There is no man page; the help is just a list of options.

https://www.ietf.org/archive/id/draft-cpaasch-ippm-responsiv...

You may want to read the RFC draft. However, the results are meant to be opaque. You just need to know that more RPM is better.

Re: The networkQuality tool on macOS

#49

One thing this tool doesn’t offer is an over time component. I wrote this (it’s pretty primitive) to examine latencies over time. https://github.com/acolombi/ping_parse

Not saying that it isn't useful in practice, but ping is not the best tool if you want accurate latency measurements (ICMP is often deprioritized, in the network and by the OS when sending back replies).
Post reply on HN