Mach: Cloudflare’s New Speed Test

In a previous blog post, we explored Cloudflare’s web-based speed test tool at speed.cloudflare.com. This provides detailed network quality insights including latency under load and comprehensive performance breakdowns. It’s a browser-based tool with a detailed graphical presentation of the results, as well as an easy-to-understand good-bad output.

Now, Cloudflare has released “mach,” a command-line utility that makes most of this functionality available for third-party integrations and automated testing using Cloudflare’s CDN. The project’s page is available at https://github.com/cloudflare/networkquality-rs.

What Makes Mach Different?

The primary difference between speed.cloudflare.com and mach isn’t in functionality—mach largely replicates the web tool’s capabilities. The key advantage is that mach is a free, open-source CLI utility that organizations can integrate into their own monitoring systems, scripts, and applications. Built in Rust around the IETF draft “Responsiveness under Working Conditions,” mach measures network responsiveness in Round trips Per Minute (RPM), focusing on real-world performance under load rather than just peak throughput.

Core Features and Capabilities

Mach offers several measurement modes through its modular design:

Responsiveness Testing (RPM): The default operation measures network responsiveness under load, providing separate RPM scores for download and upload conditions along with loaded and unloaded latency measurements.

Latency Measurement: Uses TCP connection timing to measure round-trip time and jitter without the overhead of full HTTP requests.

Download Timing: Measures the complete lifecycle of downloading resources, including DNS lookup time, connection establishment, TLS handshake duration, and transfer rates.

Flexible Server Support: While defaulting to Cloudflare’s responsiveness servers, mach can test against other endpoints, including Apple’s servers.

Sample Output Examples

Here’s what you can expect when running different mach commands:

Basic Responsiveness Test

$ mach rpm
{
  "unloaded_latency_ms": 10.819,
  "jitter_ms": 6.945,
  "download": {
    "throughput": 104846062,
    "loaded_latency_ms": 86.936,
    "rpm": 446
  },
  "upload": {
    "throughput": 48758784,
    "loaded_latency_ms": 206.837,
    "rpm": 433
  }
}

This output reveals crucial insights: while unloaded latency is excellent at 10.8ms, it degrades significantly under load (86.9ms for download, 206.8ms for upload), indicating potential bufferbloat issues that affect real-world performance.

Latency-Only Measurement

$ mach rtt
{
  "jitter_ms": 2.949,
  "latency_ms": 10.549
}

Resource Download Timing

$ mach download https://cloudflare.com/cdn-cgi/trace
time_lookup: 0.0000
time_connect: 0.0531
time_secure: 0.1144
duration: 0.2224
bps: 8130.7393
bytes_total: 226

Installation and Usage

Getting started with mach requires a Rust installation. Once Rust is available, you can build from source:

cargo build --release
./target/release/mach

Or install directly with cargo:

cargo install --path ./cli
mach

You can find more information at https://github.com/cloudflare/networkquality-rs

Mach Speed Test on the NetBeez Dashboard 

At NetBeez, we have integrated mach into our network monitoring platform, enabling our customers to leverage Cloudflare’s measurements as part of their network performance monitoring strategy. Our monitoring agent can be installed on dedicated WiFi and wired hardware, as well as Virtual, Docker, Windows, MacOS and Linux platforms. This makes the collection of upload and download synthetic monitoring data from multiple end points easy and scalable.  

As an example, here are the three different speed tests NetBeez has integrated on our Ad-Hoc setup: NDT from M-Labs, Fast.com by Netflix, and the Cloudflare one.

The output looks as follows on three different types of agents: AWS, wired, and WiFi:

In addition, you can set it up to run on a schedule so that it collects periodic measurements and creates baselines and historical trends. In addition, you can set up alerts to be notified when the performance is not within the acceptable limits. As an example, when Jess’s laptop download bandwidth was lower than 25Mbps, it was caught by NetBeez and it looks like this on the dashboard:

Conclusion on Mach Speed Test

Cloudflare’s mach brings the power of their speed test to the command line. This tool offers a lightweight, scriptable way to measure real-world network performance. Mach speed test support IETF’s RPM standard and enables seamless integration into platforms like NetBeez. This is a valuable tool for proactive, automated network monitoring across any environment.

decoration image

Get your free trial now

Monitor your network from the user perspective

You can share

Twitter Linkedin Facebook

Let's keep in touch

decoration image