from Hacker News

The networkQuality tool on macOS

by cyberhost on 5/14/23, 10:45 AM with 85 comments

  • by ajb on 5/14/23, 12:35 PM

    Nice that it gives "responsiveness under working conditions" and defines latency as "idle latency". So this tool makes faults like buffer bloat clear to the user rather than just giving the max bandwidth like most tools.
  • by moritzwarhier on 5/14/23, 7:13 PM

    Tangentially related: the wirelles chips that Apple uses make a world of a difference compared to my other machines (Lenovo ThinkPads in cheap to low-mid price range).

    They have signal where other devices don't, and, most importantly, Bluetooth does not interfere with 2.4GHz WiFi in a crowded apartment building in a crowded street.

    This makes a world of a difference. With my previous laptop, I simply couldn't use wireless internet simultaneously with Bluetooth unlesss being in the same room next to my router.

    With apple client hardware and the same router (it also supports 5GHz, but I'm not sure if that's the underlying cause as it still works great on 2.4GHz with the MacBook), WiFi and BT work flawlessly across my whole apartment.

  • by keyle on 5/14/23, 11:46 AM

    That is neat. But an undocumented tool is hardly a secret... [1]

    [1]: https://www.macobserver.com/tips/macos-monterey-includes-net...

  • by CrLf on 5/14/23, 4:24 PM

    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/...

  • by yborg on 5/14/23, 5:19 PM

    Looks like it's been upgraded in Ventura, here is the output from Monterey:

    ==== SUMMARY ==== Upload capacity: 5.983 Mbps Download capacity: 116.813 Mbps Upload flows: 20 Download flows: 16 Responsiveness: Medium (274 RPM) Base RTT: 42 Start: 5/14/23, 12:15:20 PM End: 5/14/23, 12:15:36 PM OS Version: Version 12.6.5 (Build 21G531)

    and it doesn't support the Private Relay option.

  • by Alifatisk on 5/14/23, 12:03 PM

    Very cool finding! Made me want to explore what other tools my mac has pre-installed in /usr/bin
  • by heywire on 5/14/23, 11:51 AM

    From the article, a set of reference servers, one in Swift, one in Go:

    https://github.com/network-quality/server

  • by lxgr on 5/14/23, 3:32 PM

    That's neat!

    Interestingly, while the downlink speed indicated seems accurate, it consistently (through VPNs, private relay, or directly) shows my uplink as 1/6th of what I can practically achieve.

    Makes sense, given that they are using their CDN for this – a typical CDN would likely not be optimized for high eyeball ISP -> CDN throughput.

  • by acolombi on 5/14/23, 4:44 PM

    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

  • by mofle on 5/14/23, 8:30 PM

    I made a free GUI app for this tool: https://sindresorhus.com/speediness
  • by selfhoster69 on 5/14/23, 1:56 PM

    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 --doh-url https://dns.google/dns-query https://mensura.cdn-apple.com/api/v1/gm/config | jq -r .test_endpoint
      hkhkg1-edge-bx-007.aaplimg.com
      ~> ping hkhkg1-edge-bx-007.aaplimg.com
      PING hkhkg1-edge-bx-007.aaplimg.com (17.253.85.13) 56(84) bytes of data.
      64 bytes from hkhkg1-edge-bx-007.aaplimg.com (17.253.85.13): icmp_seq=1 ttl=54 time=107 ms
    
    Seems like I'm two different PoPs depending on which DNS I'm using.
  • by thadk on 5/14/23, 8:51 PM

    Now that Apple TV+ is a big player in streaming video, they need to make sure the incumbent internet providers in the USA are not playing traffic shaping games targeting their servers. It is just like how Netflix hosts a major speed tester.
  • by coldcode on 5/14/23, 1:47 PM

    I don't see any explanation of what the results mean. There is no man page; the help is just a list of options.
  • by ruph123 on 5/14/23, 5:57 PM

    Is there a good tool for Limux that can assess network quality as a whole? It would be nice to have something that can do a few tests all in one run and give me an idea of what is going on (besides tools like ping for latency, iperf for local bandwidth and packet loss).
  • by dieulot on 5/14/23, 1:52 PM

    It’s an unreliable tool worldwide because (I assume) it uses Apple’s servers/CDNs, which do not reliably max out my bandwidth (400MB/s in France). Verify the results with another tool if you don’t live in the US.
  • by punnerud on 5/14/23, 8:16 PM

    Responsiveness differ greatly for me between tests in Norway, in contrast to fast.com (Netflix) and Speedtest.net

    Guess they change servers regardless if its the most optimal one?

  • by Grazester on 5/14/23, 5:37 PM

    That Apple logo before the networkQuality on the main page seems like something an Apple lawyer will send a cease and desist for.
  • by ChrisMarshallNY on 5/14/23, 11:50 AM

    That's a cool tool.

    Thanks!

  • by cynicalsecurity on 5/14/23, 1:44 PM

    All kinds of undocumented findings will occur in a closed source software. And this one is not even the most shocking.
  • by perfmode on 5/14/23, 2:37 PM

    maybe i can cancel my pingplotter pro subscription
  • by AndroTux on 5/14/23, 1:51 PM

    5 bucks that at least the conclusion was written by ChatGPT.
  • by martini333 on 5/14/23, 11:26 AM

    Holding Alt and Clicking the Wi-Fi-symbol is more useful.
  • by gumby on 5/14/23, 4:29 PM

    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?