[sclug] disk transfer rates (was) Newbie, partitioning 120Gb HDD - recommendations?

Alex Butcher lug at assursys.co.uk
Wed Jan 19 16:26:31 UTC 2005

On Wed, 19 Jan 2005, Tom Dawes-Gamble wrote:

> On Wed, 2005-01-19 at 13:38 +0000, Dickon Hood wrote:
>> On Wed, Jan 19, 2005 at 12:02:52 +0000, Tom Dawes-Gamble wrote:
>> : On Wed, 2005-01-19 at 10:09 +0000, Dickon Hood wrote:
>> : > On Wed, Jan 19, 2005 at 07:52:42 +0000, Tom Dawes-Gamble wrote:
>> : > [...]
>> : > : So I've knocked together a very rough benchmark. How long so it take to
>> : > : read a gigabyte from the disk.  I did each test several times and these
>> : > : are typical results.
>> : > Try hdparm -T and -t; they're more accurate than any number of runs of dd,
>> : > as it bypasses the OS caches.
>> : More accurate for what?
>> For producing benchmarks of the type you're trying to do.
> Well I want to know how the zoning will effect the performance of my I/O
> well input really since output is normally done with deferred writes.
> It really doesn't matter how fast the data comes of the disk.  It's how
> fast the read complete in my program that matters.
> Lets say there are 15 zones on the disk and that zone 0 is twice the
> speed of zone 15.  Lets assume hdparm confirms that.  So now I partition
> the disk and have a file system that resides entirely in Zone 0 and
> another that resides in Zone 15.  If due to OS buffering and all that
> good stuff I don't see that difference in speed then what is the point?
>> Well, yes, of course.  And hdparm is a userland tool as well, it just uses
>> the exposed ATAPI API to talk to the discs directly.
> But I'm not going to use that API in my programmes so it's not measuring
> what I want to measure.

That's all very well, providing you know that you're going to be performing
exactly the same operations repeatedly. Using hdparm (or bonnie) will give
you lower bound for performance, which will be close to the real-life figure
when performing an operation that isn't cached. Your approach will give you
an upper bound, which should tend towards the bandwidth of your memory bus.

> The 1 gig test are probably pretty valid since I don't have a gig of
> buffer cache so I'm not going to have any cache hits.

There's probably some truth to that, though /some/ of the blocks will be
read from buffer cache on second and subsequent runs.

> So how do I tell hdparm to test the inner or outer part of the device?

You can't, AFAICT. It always reads from the beginning of the block device
you specify. This was why I had it report speeds for /dev/hde1 (in the fast
zone) and /dev/hde9 (in the mid- to slow zone).

> Tom.

Best Regards,
Alex Butcher      Brainbench MVP for Internet Security: www.brainbench.com
Bristol, UK                      Need reliable and secure network systems?
PGP/GnuPG ID:0x271fd950                         <http://www.assursys.com/>

More information about the Sclug mailing list