Subject: ATAPI CD performance
To: None <port-i386@netbsd.org>
From: Federico Lupi <flupi@mclink.it>
List: port-i386
Date: 10/05/1999 01:12:18
I have changed my PC to a PIII 450, Intel SR440BX, 128MB.
	wd0  Quantum Fireball (7200 rpm)
	cd0  Asus 40x (ATAPI)
	cd1  HP CD-Writer Plus 8100

PROBLEM: the performance of the Asus 40x is very poor.

When I give the following command:
	dd if=/dev/cd0d of=/dev/null bs=100b
the output of 'systat iostat' for cd0 (Asus) is
	cd0  KBps   102.8
	     tps
The same command on cd1 (HP) results in
	cd1  KBps   518.8
	     tps    259.4
This is very strange: the Asus should be much faster than the HP.
'systat vmstat' gives similar figures
for Asus:
	        cd0      64 irq 14      99.8% idle
	xfers    61
	Kbyte   122
	sec     1.0
for HP:
	        cd1      259 irq 15     98% idle
	xfers   256
	Kbyte   510
	sec      10

The performance is so poor that I cannot copy a CD from cd0
to cd1 at 2x (HP supports writing at 4x).  Copying from cd0
to wd0 takes ages...

The (partial) output from 'dmesg' follows

    NetBSD 1.4.1 (LOGE) #5: Wed Sep 29 00:14:51 CEST 1999
        root@loge.nibel.net:/usr/src/sys/arch/i386/compile/LOGE
    cpu0: family 6 model 7 step 3
    cpu0: Intel Pentium III (686-class)
    real mem  = 133693440
    avail mem = 122294272
    ...
    cd0 at atapibus0 drive 1: <ASUS CD-S400/A, , V2.1H> type 5 cdrom removable
    cd0: 32-bits data port
    cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
    wd0 at pciide0 channel 0 drive 0: <QUANTUM FIREBALLP KA6.4>
    wd0: drive supports 16-sector pio transfers, lba addressing
    wd0: 6149MB, 13328 cyl, 15 head, 63 sec, 512 bytes/sect x 12594960 sectors
    wd0: 32-bits data port
    wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4, Ultra-DMA mode 3, Ultra-DMA mode 2
    ...
    cd1 at atapibus1 drive 0: <Hewlett-Packard CD-Writer Plus 8100, YMW375ECHU, 1.0g> type 5 cdrom removable
    cd1: 32-bits data port
    cd1: drive supports PIO mode 3, DMA mode 1
    wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
    cd0(pciide0:0:1): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
    cd1(pciide0:1:0): using PIO mode 0, DMA mode 1 (using DMA data transfers)


Thank you for your help,
Federico Lupi