I patched iozone for better disk benchmarks on modern macOS - Jeff GeerlingI patched iozone for better disk benchmarks on modern macOS<br>May 26, 2026
A decade ago, I settled on iozone for disk benchmarking on all my systems. Tools like fio ('Flexible IO' tester) are a little more capable for raw disk performance testing, and other tools test network-scale filesystems better, but iozone gives me an easy overview of real-world disk performance across hard drives and SSDs, and runs on Mac, Windows, and Linux (and a smattering of other OSes).<br>It's been around since 1991, and is still updated today—in fact, the two latest updates (version 509 and 510) contain patches I sent in to get iozone to compile on Apple Silicon Macs running newer releases of macOS.<br>I was benchmarking a MacBook Neo, and the iozone compilation step broke my PyInfra benchmarking scripts. I think MacPorts and Homebrew tweaked their build scripts to override any errors, but it's better to just fix the upstream code.<br>I'm pretty bad with C, so I used a local Qwen model to help validate my fixes; see my patches in this GitHub issue.<br>I emailed the patches to Don Capps, who maintains iozone, and he incorporated them into the source. Version 510 contains the fix, and builds on all my Macs running macOS 26 with Clang 21.0.0.<br>cd ~/Downloads<br>curl "http://www.iozone.org/src/current/iozone3_510.tar" | tar -x<br>cd iozone3_510/src/current<br>make --quiet macosx
The clang compiler still spits out a number of deprecation warnings, but you can ignore those.<br>After a few seconds, you should be able to run iozone to benchmark any storage device on your Mac (set the -f parameter to a file path in any connected volume, to test the filesystem performance on that volume).<br>Here I'm running it in my Downloads directory, to benchmark the SSD built into the Mac:<br>./iozone -e -I -a -s 1g -r 4k -r 1024k -i 0 -i 1 -i 2 -f ~/Downloads/iozone
With a 1GB test file size on my MacBook Neo, testing at 4k and 1M block sizes, I get the result:<br>$ ./iozone -e -I -a -s 1g -r 4k -r 1024k -i 0 -i 1 -i 2 -f ~/Downloads/iozone<br>Iozone: Performance Test of File I/O<br>Version $Revision: 3.510 $<br>Compiled for 64 bit mode.<br>Build: macosx
Contributors:William Norcott, Don Capps, Isom Crawford, Kirby Collins<br>Al Slater, Scott Rhine, Mike Wisner, Ken Goss<br>Steve Landherr, Brad Smith, Mark Kelly, Dr. Alain CYR,<br>Randy Dunlap, Mark Montague, Dan Million, Gavin Brebner,<br>Jean-Marc Zucconi, Jeff Blomberg, Benny Halevy, Dave Boone,<br>Erik Habbinga, Kris Strecker, Walter Wong, Joshua Root,<br>Fabrice Bacchella, Zhenghua Xue, Qin Li, Darren Sawyer,<br>Vangel Bojaxhi, Ben England, Vikentsi Lapa,<br>Alexey Skidanov, Sudhir Kumar.
Run began: Tue May 26 16:17:26 2026
Include fsync in write timing<br>F_NOCACHE=1 - Turns data caching off<br>Auto Mode<br>File size set to 1048576 kB<br>Record Size 4 kB<br>Record Size 1024 kB<br>Command line used: ./iozone -e -I -a -s 1g -r 4k -r 1024k -i 0 -i 1 -i 2 -f /Users/jgeerling/Downloads/iozone<br>Output is in kBytes/sec<br>Time Resolution = 0.000001 seconds.<br>Processor cache size set to 1024 kBytes.<br>Processor cache line size set to 32 bytes.<br>File stride size set to 17 * record size.<br>random random bkwd record stride<br>kB reclen write rewrite read reread read write read rewrite read fwrite frewrite fread freread<br>1048576 4 666141 188600 1465976 8232715 4415111 915494<br>1048576 1024 859037 1358016 1449306 16421172 15936521 1087545
iozone test complete.
An average of 1.5 GB/sec for 1MB reads and writes isn't bad. Though writing that... it's mind-numbing how fast local storage has gotten in the past decade since we switched from HDD to SSD, and then from SATA to NVMe. 1.5 GB/sec is insanely fast, historically speaking. But it's rather slow for a single NVMe drive compared to my other machines!<br>Huge thanks to Don Capps for incorporating my patches into iozone, so it can be used on all flavors of macOS, in addition to Windows, Linux, FreeBSD, etc.
Further reading:<br>Build your own Dial-up ISP with a Raspberry Pi<br>I built a pint-sized Macintosh<br>How to Securely Erase an old Hard Drive on macOS Tahoe
Comments