Subject: Re: Performance of an IDE drive
To: Manuel Bouyer <bouyer@antioche.eu.org>
From: Julio M. Merino Vidal <jmmv@mac.com>
List: port-i386
Date: 01/25/2006 21:09:27
El 25/01/2006, a las 20:50, Manuel Bouyer escribi=F3:

> On Wed, Jan 25, 2006 at 12:12:56PM +0100, Julio M. Merino Vidal wrote:
>> Hi all,
>>
>> I have a Maxtor 120GB drive currently installed on my workstation,
>> an Athlon XP machine with a VIA KT400 chipset (thus using viaide(4)
>> under NetBSD-current).  If I do the following to get a rough idea of
>> the drive's performance:
>>
>> 	dd if=3D/dev/wd0d of=3D/dev/zero bs=3D8m count=3D100
>>
>> I get something around 22 MB/s.
>>
>> The thing is that I would like to move that drive to my server and
>> share it with Samba or whatever.  The server is a Pentium 3 450Mhz
>> machine and has a PCI ATA100 controller.  I plugged the drive there
>> and reran the same test as on the other machine.  It gave only
>> 5 MB/s.
>>
>> This machine is using cmdide(4) (on NetBSD 3.0) for that PCI card
>> and the kernel reports that the drive is running in UDMA5 mode.
>>
>> Might this be due to misconfiguration or, simply put, the machine
>> cannot give more?
>>
>> Thanks,
>>
>> PS: Running the command shown above using rwd0d instead of wd0d on
>> the P3 machine gives around 30MB/s.  (Haven't tried on the other
>> box, though.)
>
> Using the block device instead of raw device, all data go though the
> buffer cache. Depending on what's your doing it may need to flush
> other data first, and system CPU usage is much highter. If you get
> 30MB/s using the raw device your controller is fine.

Hmm... just another fact which I discovered after sending the
message.  I first connected the 120gb drive as a slave of the
older one (a 20gb disk that also does udma5).  Then, I tried
connecting it as a master of the second channel and it gives
around 15 MB/s, which sounds much better to me.  Why could this
be?

Thanks,