Test Speed Of Partitions (and therefore also Hard Disk Drives)


The command sudo hdparm -t /dev/sda on my Samsung SpinPoint F1 HD103UJ returns:

 Timing buffered disk reads:  210 MB in  3.02 seconds =  69.63 MB/sec


Compile seeker (multithreaded) from seeker_baryluk.c using:

gcc -o seeker -O2 -march=native seeker_baryluk.c -pthread

And execute it like this (where the default number of threads is 1):

./seeker device number_of_threads

Example output:

./seeker /dev/sdb2 1: 113 r/s
./seeker /dev/sdb2 2: 114 r/s
./seeker /dev/sda2 128: 117 r/s
./seeker /dev/md0 1: 115 r/s
./seeker /dev/md0 2: 225 r/s
./seeker /dev/md0 4: 213 r/s
./seeker /dev/md0 8: 218 r/s
./seeker /dev/md0 16: 214 r/s

Here, /dev/md0 is a Raid0 of two 500G Samsung HDDs.
On a different terminal one can at the same time run iostat md0 sda2 sdb2 -x 1 and analyze the load.
The interepretation of these values depends on exact setup, and needs knowledge of some mechanisms used in kernel.