SeekMark – a threaded random I/O tester, designed to test the number of seeks and hence get a rough idea of the access time of a disk and the number of iops it can perform . It was loosely inspired by the ‘seeker’ program (http://www.linuxinsight.com/how_fast_is_your_disk.html), when it was noticed that the results from seeker were very much the same for a RAID array as for a single disk, and a look at the code showed that it was doing one random read at a time, basically only triggering access to one drive and waiting for that to complete before continuing. What we want to see is not only the performance of a single spindle, but how much benefit we get on random reads as we add spindles.This pretty much only works on systems that allow you to open disks as files, although it’s written such that you can test against regular files. As long as the file is sufficiently large (a couple of gigs), I get pretty much the same results when testing against a file, partition, or whole disk. The file of course could also be fragmented, helping our cause somewhat.
Version 0.9 gains some functionality that allows it to be used as a quick and dirty random I/O generator. Seekmark does a good job of pounding your disk as hard as possible in all-or-nothing fashion, but now you can specify a delay to insert between seeks to reduce the load, in order to simulate some scenario. For example you may want to test performance of some other application while the system is semi-busy doing random I/O on a database file, or you may want to test shared storage between multiple hosts where one host has 4 processes doing 64k random reads every 20ms and another host has 2 processes, one doing busy 4k random writes as fast as possible and the other doing 128k reads every 50ms. With this, is a new -e option, that runs seekmark in endless mode. That is, it will simply run until it’s killed.
Version 0.9.1 adds a patch submitted by Stefan Seidel http://stefanseidel.info/ which allows for specifying that the IO be aligned to a particular byte boundary.
Version 0.9.2 adds a 'sizelimit' parameter, in case one wants to benchmark a portion of a file/disk, or in case the disk size isn't properly detected
To build, just run: "make". You can also build manually via “gcc -o seekmark -lpthread seekmark.c”. make sure you have libpthread dev libraries installed! Update: you can also try compiling against the library rather than linking the .so, “gcc -pthread -o seekmark seekmark.c”