Skip to content

Instantly share code, notes, and snippets.

@doka
Last active October 22, 2015 18:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save doka/0d9615de4362575acb95 to your computer and use it in GitHub Desktop.
IO read/write tests by bash scripts

IO read/write tests by bash scripts

Write test with 16 GB file:

On OSX:

time dd if=/dev/zero bs=2048k of=tstfile count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'

On Debian:

time dd if=/dev/zero bs=2048k of=tstfile count=8192 2>&1 | awk '/ s/ {print $1 / $6 / 1048576, "MB/sec" }'

Results in like this for 2x1 TB WD disks in Raid1

159,068 MB/sec

real	1m43.164s
user	0m0.017s
sys	0m7.197s

or for Samsung SSD (EVO 250):

297,891 MB/sec

real	0m55.622s
user	0m0.019s
sys	0m5.838s

Read test

with the file written before:

time dd if=tstfile bs=2048k of=/dev/null count=8192 2>&1 | awk '/sec/ {print $1 / $5 / 1048576, "MB/sec" }'

result of 2x1 TB WD disks in Raid1:

159,068 MB/sec

real	1m43.045s
user	0m0.017s
sys	0m4.505s

or for Samsung SSD (EVO 250):

528,516 MB/sec

real	0m31.282s
user	0m0.016s
sys	0m4.861s

clean up

rm tstfile

source: http://hints.macworld.com/article.php?story=20120704113548693

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment