Subject: Re: hd tuning
To: NetBSD-i386 <port-i386@netbsd.org>
From: Matthias Redlich <m-redlich@t-online.de>
List: port-i386
Date: 06/01/2003 14:08:25
Thanks for you replies!

Although I've known that NetBSD tries to optimize the settings while
bootstrapping I've thought that there were some other tricks. (not that
I am dissatisfied with the current performance ;)

I didn't want to start a flamewar!

Cheers,
Matthias



Am Son, 2003-06-01 um 01.35 schrieb David Maxwell:
> On Sun, Jun 01, 2003 at 01:13:27AM +0200, Matthias Redlich wrote:
> > Hello netbsd-i386 community,
> > 
> > I'm performing and comparing some benchmarks on a Linux server and on a
> > NetBSD server at the moment.
> > Of course, I'm trying to optimize the settings on both systems.
> > 
> > I've just optimized the settings for the harddrives of Linux
> > installation. Now I'm searching for an equivalent to hdparm for NetBSD.
> > Could you recommend me a tool?
> > 
> > It would also be kind if you told me any other tools for NetBSD which
> > can be used to improve the performance. (not only hd performance)
> 
> NetBSD doesn't have a real equivalent to hdparm... it is designed to not
> need one.
> 
> I looked up hdparm, and found this:
> 
> http://linux.oreillynet.com/pub/a/linux/2000/06/29/hdparm.html
> 
> I quote:
> 
> "Well, it's generally considered a good idea for any self-respecting
> distribution to install itself in the kewlest, slickest, but SAFEST way
> it possibly can. The above settings are virtually guaranteed to work on
> any hardware you might throw at it. But since we know we're throwing
> something more than a dusty, 8-year-old, 16-bit multi-IO card at it[...]"
> 
> The common Linux approach is "Leave settings at minimum and force the
> user to be a developer - make them fiddle with settings to increase
> performance."
> 
> The NetBSD approach is "Detect the controller and HD, and automatically
> configure for the highest throughput supported by both devices."
> 
> >From the boot messages where I'm typing this:
> 
> This machine detected an Intel 82371AB IDE controller, a Maxtor 34098H4
> and a MATSHITADVD-ROM SR-8582. Although the HD supports Ultra-DMA mode
> 5, the kernel sets Ultra-DMA mode 2 because that's the best this
> controller supports.
> 
> pciide0 at pci0 dev 4 function 1: Intel 82371AB IDE controller (PIIX4) (rev. 0x0 1)
> pciide0: bus-master DMA support present
> pciide0: primary channel wired to compatibility mode
> wd0 at pciide0 channel 0 drive 1: <Maxtor 34098H4>
> wd0: drive supports 16-sector PIO transfers, LBA addressing
> wd0: 39083 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 80043264 sectors
> wd0: 32-bit data port
> wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
> pciide0: primary channel interrupting at irq 14
> wd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)
> pciide0: secondary channel wired to compatibility mode
> atapibus0 at pciide0 channel 1: 2 targets
> cd0 at atapibus0 drive 0: <MATSHITADVD-ROM SR-8582, , 0ACA> cdrom removable
> cd0: 32-bit data port
> cd0: drive supports PIO mode 4, DMA mode 2
> pciide0: secondary channel interrupting at irq 15
> cd0(pciide0:1:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
> 
> One tool of interest, for looking at (or setting) ata hard drive
> paramters, is atactl.
> 
> pohl# atactl wd0 identify
> Model: Maxtor 34098H4, Rev: YAH814Y0, Serial #: L4055B1C
> Device type: ATA, fixed
> Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 80043264
> Device capabilities:
>         ATA standby timer values
>         IORDY operation
>         IORDY disabling
> Device supports following standards:
> ATA-1 ATA-2 ATA-3 ATA-4 
> Command set support:
>         NOP command
>         READ BUFFER command
>         WRITE BUFFER command
>         Host Protected Area feature set
>         look-ahead
>         write cache
>         Power Management feature set
>         SMART feature set
>         Advanced Power Management feature set
>         DOWNLOAD MICROCODE command
> Command sets/features enabled:
>         look-ahead
>         write cache
>         SMART feature set
> 
> 								David
-- 
Matthias Redlich <m-redlich@t-online.de>