Re: [Ext2-devel] disk throughput

Andrew Morton (akpm@zip.com.au)
Thu, 08 Nov 2001 22:08:26 -0800


Jeremy Fitzhardinge wrote:
>
> On Thu, 2001-11-08 at 07:24, Constantin Loizides wrote:
> >
> > > This is one I made a while ago while doing some measurements; its also
> > <[snip]
> >
> > That's an interesting plot. I would like to do one for my disk!
> >
> > How did you do it?
> > How do you find out about the seek distance???
> > Do you create one big file and then start
> > seeking around accessing different blocks of it?
>
> Its pretty simple. I open /dev/hda (the whole device), and read random
> blocks, timing how long it takes for the data to come back since the
> last one. I set up a few hundred/thousand buckets, and accumulate the
> measured time into the bucket for that seek distance. So:
>
> fd=open("/dev/hda")
> llseek(fd, last = rand());
> read(fd)
> while(!finished) {
> blk = rand();
> llseek(fd, blk);
> read(fd);
> bucket[abs(last-blk)] = time;
> last = blk;
> }

How do you avoid aftifacts from Linux caching with this test?

> I found the random seeking was the only way I could get reasonable
> numbers out of the drive; any of the ordered patterns of the form "OK,
> lets measure N block seeks" seemed to be predicted by the drive and gave
> unreasonably fast results.
>

But we *want* unreasonably fast results! We need to understand
this device-level prediction, then decide if it's sufficiently
widespread for us to go and exploit the hell out of it.

Have you any ideas as to what's happening?

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/