Test read write performance

2015-09-06 20:29

A quick way to get a sense for read/write performance is to utilize the hdparm and dd tools.

For read performance run hdparm with -t for device read timing and -T for cached read timings. Run these a couple of times on a otherwise idling system.

~$ sudo hdparm -tT /dev/sda

/dev/sda:
Timing cached reads:   19422 MB in  2.00 seconds = 9719.33 MB/sec
Timing buffered disk reads: 1192 MB in  3.00 seconds = 396.75 MB/sec

For write performance run dd to write a temp file. Use conv=fdatasync to get timings including device sync and change size, bs, and count depending on what kind of work load you want to simulate. Run a couple of times on a idle system.

~$ dd if=/dev/zero of=/tmp/output conv=fdatasync bs=4k count=100k; rm -f /tmp/output
102400+0 records in
102400+0 records out
419430400 bytes (419 MB) copied, 1,28685 s, 326 MB/s