ahd(4) poor performance

Tom Samplonius tom at uniserve.com
Sat Jun 24 02:20:11 UTC 2006


On Fri, 23 Jun 2006, Matthew D. Fuller wrote:

> On Sat, Jun 24, 2006 at 12:25:06AM +0300 I heard the voice of
> Volodymyr Kostyrko, and lo! it spake thus:
>>
>>   Script:
>>
>> dd if=/dev/zero of=/dev/da0s1b count=20480&
>> dd if=/dev/zero of=/dev/da0s1b count=20480&
>     [...]
>
> This seems like it would be a record-shattering worst possible case
> for the disk.  Since there's no buffering on the raw device, each dd
> stomps on the sectors of all the others, and each is writing one
> sector at a time, so you're probably eating 8 or 10 rotations writing
> each sector along the way.  Heck of a stress, maybe, but I'm not sure
> it's all that related to anything the disk will realistically do with
> normal load.

   I agree with that, but it happens to be an almost best case scenario for a 
write-back cache.  Since all of the writes are basically over-top one another, a 
disk in write-back mode, will happily aggregate it so some of these writes never 
actually hit the disk.  One write per block would occur, no matter how many dd 
processes you had.

   But in write-through (no write cache), it is definitely a nice way to thrash 
the disk.  You would get one write per block, per dd process.

> -- 
> Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
> Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
>           On the Internet, nobody can hear you scream.


Tom


More information about the freebsd-scsi mailing list