Measuring hard drive seek times

I’ve been fascinated with I/O and file system performance for years, and chose prefetch.net as my domain name after reading about pre-fetching algorithms in the book UNIX file systems (a great book that I need to read again). Since most applications access data that is not laid out sequentially on a hard drive platter, seek times come into play when you start to look at getting the most bang for your buck on random I/O workloads.

This past week I saw this first hand. I was playing around with some disk drives and started to wonder how many seeks I could get per second. I was also curious what the access time of each seek was, so I started poking around for a tool that displays this information. After a quick search, I came across seeker.

When seeker is run with the path to a block device, it will initiate reads to a device and measure the number of seeks per second, the average time of each seek, and the starting and ending offsets that were used to randomly access blocks on the disk. Here is a sample run:

$ seeker /dev/sda

Seeker v3.0, 2009-06-17, http://www.linuxinsight.com/how_fast_is_your_disk.html
Benchmarking /dev/sda [156250000 blocks, 80000000000 bytes, 74 GB, 76293 MB, 80 GiB, 80000 MiB]
[512 logical sector size, 512 physical sector size]
[1 threads]
Wait 30 seconds..............................
Results: 50 seeks/second, 19.881 ms random access time (128677785 < offsets < 79965549334)

If you want to see the effects of multiple threads accessing a disk, you can pass a thread count to seeker:

$ seeker /dev/sda 32

Seeker v3.0, 2009-06-17, http://www.linuxinsight.com/how_fast_is_your_disk.html
Benchmarking /dev/sda [156250000 blocks, 80000000000 bytes, 74 GB, 76293 MB, 80 GiB, 80000 MiB]
[512 logical sector size, 512 physical sector size]
[32 threads]
Wait 30 seconds..............................
Results: 53 seeks/second, 18.587 ms random access time (36588683 < offsets < 79946851693)

In the example above 32 threads would try to access data at random locations and the results from these disk accesses would be measured and printed. Seeker is a super handy utility, and I would put it right up there with blktrace.

2 thoughts on “Measuring hard drive seek times”

  1. Hi, where can I get the latest version of seeker? I see you are using version 3.0 but I only find version 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *