OSX & Linux Disk Benchmarking

As a SysAdmin, you’ll need to benchmark disk performance from time to time, or rather just gloat that your system’s drive is better than your buddy’s. In my particular case, I have an existing need to quantify performance metrics on my work macbook pro’s disk speed with Symantec PGP (don’t get me started on this product), without it, and with Apple FileVault in place of it.

Perusing the web I came across a good article from cultofmac.com that assisted me with my disk benchmark testing.  This can apply to OSX and most Linux systems as well.

To test a system’s write speed, I used the following command from a terminal window:

time dd if=/dev/zero bs=1024k of=speedtest count=1024

Output from my work iMac w/SSD:

1024+0 records in
1024+0 records out
1073741824 bytes transferred in 8.948791 secs (119987362 bytes/sec)

real 0m8.954s
user 0m0.001s
sys 0m0.413s

The bytes per seconds number when converted to Megabytes equates to 114.42887 Mb per second.

To test the read speed of my disk, I ran the following from terminal.app:

dd if=speedtest bs=1024k of=/dev/null count=1024


1024+0 records in
1024+0 records out
1073741824 bytes transferred in 0.145955 secs (7356659197 bytes/sec)

So this is around 7016 Mb (6.8 Gb) per second with some rounding.  Based on the above output results, my work iMac w/ SSD can write at 114 Mb/s, and read at 6.8Gb/s.

When I get around to testing on my work laptop, these commands should give me good data metrics.

As far as bytes to Mb/Gb/etc conversioning goes, you can use google conversion web tools, or the “units” command on a Linux host if available.  There are several alternatives you can use as well.

Units Linux command sample for reference:

units –terse “119987362 bytes” “MiB”




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s