From owner-freebsd-current Wed Dec 8 21:39:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from mail.rdc1.az.home.com (ha1.rdc1.az.home.com [24.1.240.66]) by hub.freebsd.org (Postfix) with ESMTP id 15F531532F for ; Wed, 8 Dec 1999 21:39:13 -0800 (PST) (envelope-from straka@home.com) Received: from home.com ([24.1.209.47]) by mail.rdc1.az.home.com (InterMail v4.01.01.00 201-229-111) with ESMTP id <19991209053907.SICP21794.mail.rdc1.az.home.com@home.com> for ; Wed, 8 Dec 1999 21:39:07 -0800 Message-ID: <384F407B.5484C354@home.com> Date: Wed, 08 Dec 1999 22:39:07 -0700 From: "Richard S. Straka" X-Mailer: Mozilla 4.05 [en] (X11; U; FreeBSD 4.0-CURRENT i386) MIME-Version: 1.0 To: "freebsd-current@FreeBSD.ORG" Subject: ata vs wd driver performance Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have recently performed some testing on the ata and wd drivers on my system. When writing to and reading from a file on the same file system in the same directory, the ata driver appears to take almost double the CPU time as compared to the wd driver. However, when reading from the raw disk, the ata and wd driver take about the same amount of CPU time. DMA is enabled in both driver. Can someone explain why the ata driver is using more CPU? Rich Straka straka@home.com ********* wd driver results writing to a file. $ time dd if=/dev/zero of=test.dat bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 41.810011 secs (6420363 bytes/sec) real 0m42.136s user 0m0.002s sys 0m19.939s ********* ata driver results writing to a file. $ time dd if=/dev/zero of=test.dat bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 39.475358 secs (6800077 bytes/sec) real 0m39.750s user 0m0.008s sys 0m35.665s ******** wd driver results reading from a file. $ time dd if=test.dat of=/dev/null bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 39.992958 secs (6712068 bytes/sec) real 0m40.040s user 0m0.025s sys 0m13.387s ******** ata driver results reading from a file. $ time dd if=test.dat of=/dev/null bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 37.914618 secs (7079999 bytes/sec) real 0m37.944s user 0m0.009s sys 0m28.221s ******** wd results reading from raw disk. $ time dd if=/dev/rwd0 of=/dev/null bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 33.100446 secs (8109723 bytes/sec) real 0m33.137s user 0m0.000s sys 0m0.266s ******** ata results reading from raw disk. $ time dd if=/dev/rwd0 of=/dev/null bs=1024k count=256 256+0 records in 256+0 records out 268435456 bytes transferred in 34.518500 secs (7776568 bytes/sec) real 0m34.535s user 0m0.000s sys 0m0.222s ******************************************************* dmesg with wd driver. ******************************************************* Copyright (c) 1992-1999 The FreeBSD Project. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 4.0-CURRENT #1: Sat Dec 4 09:22:58 MST 1999 Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 333189478 Hz CPU: AMD-K6(tm) 3D processor (333.19-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x580 Stepping = 0 Features=0x8001bf AMD Features=0x80000800 real memory = 134152192 (131008K bytes) avail memory = 127021056 (124044K bytes) Preloaded elf kernel "kernel" at 0xc0303000. npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 isab0: at device 7.0 on pci0 isa0: on isab0 ide_pci0: at device 7.1 on pci0 chip1: at device 7.3 on pci0 sym0: <875> irq 10 at device 8.0 on pci0 sym0: Symbios NVRAM, ID 7, Fast-20, parity checking sym0: open drain IRQ line driver, using on-chip SRAM vga-pci0: at device 9.0 on pci0 fxp0: irq 12 at device 10.0 on pci0 fxp0: Ethernet address 00:a0:c9:27:fc:1d fdc0: at port 0x3f0-0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 wdc0 at port 0x1f0-0x1f7 irq 14 flags 0xa008a008 on isa0 wdc0: unit 0 (wd0): , DMA, 32-bit, multi-block-8 wd0: 4134MB (8467200 sectors), 8400 cyls, 16 heads, 63 S/T, 512 B/S wdc1 at port 0x170-0x177 irq 15 flags 0xa008a008 on isa0 wdc1: unit 0 (wd2): , DMA, 32-bit, multi-block-8 wd2: 2441MB (4999680 sectors), 4960 cyls, 16 heads, 63 S/T, 512 B/S wdc1: unit 1 (atapi): , removable, dma, iordy wcd0: drive speed 2062KB/sec, 240KB cache wcd0: supported read types: CD-R, CD-DA wcd0: Audio: play, 255 volume levels wcd0: Mechanism: ejectable tray wcd0: Medium: no/blank disc inside, unlocked atkbdc0: at port 0x60-0x6f on isa0 atkbd0: irq 1 on atkbdc0 vga0: at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A sio2 at port 0x3e8-0x3ef irq 5 on isa0 sio2: type 16550A ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0 ppc0: Winbond chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold lpt0: on ppbus 0 lpt0: Interrupt-driven port ppi0: on ppbus 0 pcm0: at port 0x530-0x53f irq 11 drq 1 flags 0xa610 on isa0 Waiting 8 seconds for SCSI devices to settle sym0: Downloading SCSI SCRIPTS. (noperiph:sym0:0:-1:-1): SCSI bus reset delivered. Mounting root from ufs:/dev/wd0s2a da0 at sym0 bus 0 target 3 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing Enabled da0: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C) ******************************************************* dmesg with ata driver. ******************************************************* Copyright (c) 1992-1999 The FreeBSD Project. Copyright (c) 1982, 1986, 1989, 1991, 1993 The Regents of the University of California. All rights reserved. FreeBSD 4.0-CURRENT #0: Wed Dec 8 22:13:02 MST 1999 Timecounter "i8254" frequency 1193182 Hz Timecounter "TSC" frequency 333189391 Hz CPU: AMD-K6(tm) 3D processor (333.19-MHz 586-class CPU) Origin = "AuthenticAMD" Id = 0x580 Stepping = 0 Features=0x8001bf AMD Features=0x80000800 real memory = 134152192 (131008K bytes) avail memory = 127029248 (124052K bytes) Preloaded elf kernel "kernel" at 0xc0301000. npx0: on motherboard npx0: INT 16 interface pcib0: on motherboard pci0: on pcib0 pcib1: at device 1.0 on pci0 pci1: on pcib1 isab0: at device 7.0 on pci0 isa0: on isab0 ata-pci0: at device 7.1 on pci0 ata-pci0: Busmastering DMA supported ata0 at 0x01f0 irq 14 on ata-pci0 ata1 at 0x0170 irq 15 on ata-pci0 chip1: at device 7.3 on pci0 sym0: <875> irq 10 at device 8.0 on pci0 sym0: Symbios NVRAM, ID 7, Fast-20, parity checking sym0: open drain IRQ line driver, using on-chip SRAM vga-pci0: at device 9.0 on pci0 fxp0: irq 12 at device 10.0 on pci0 fxp0: Ethernet address 00:a0:c9:27:fc:1d fdc0: at port 0x3f0-0x3f7 irq 6 drq 2 on isa0 fdc0: FIFO enabled, 8 bytes threshold fd0: <1440-KB 3.5" drive> on fdc0 drive 0 atkbdc0: at port 0x60-0x6f on isa0 atkbd0: irq 1 on atkbdc0 vga0: at port 0x3b0-0x3df iomem 0xa0000-0xbffff on isa0 sc0: on isa0 sc0: VGA <16 virtual consoles, flags=0x200> sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0 sio0: type 16550A sio1 at port 0x2f8-0x2ff irq 3 on isa0 sio1: type 16550A sio2 at port 0x3e8-0x3ef irq 5 on isa0 sio2: type 16550A ppc0 at port 0x378-0x37f irq 7 drq 3 on isa0 ppc0: Winbond chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/16 bytes threshold lpt0: on ppbus 0 lpt0: Interrupt-driven port ppi0: on ppbus 0 pcm0: at port 0x530-0x53f irq 11 drq 1 flags 0xa610 on isa0 ad0: ATA-3 disk at ata0 as master ad0: 4134MB (8467200 sectors), 8400 cyls, 16 heads, 63 S/T, 512 B/S ad0: 16 secs/int, 1 depth queue, DMA ad1: ATA-3 disk at ata1 as master ad1: 2441MB (4999680 sectors), 4960 cyls, 16 heads, 63 S/T, 512 B/S ad1: 16 secs/int, 1 depth queue, DMA acd0: CDROM drive at ata1 as slave acd0: read 2062KB/s (2062KB/s), 240KB buffer, PIO acd0: supported read types: CD-R, CD-DA acd0: Audio: play, 255 volume levels acd0: Mechanism: ejectable tray acd0: Medium: no/blank disc inside, unlocked Waiting 8 seconds for SCSI devices to settle sym0: Downloading SCSI SCRIPTS. (noperiph:sym0:0:-1:-1): SCSI bus reset delivered. Mounting root from ufs:/dev/wd0s2a da0 at sym0 bus 0 target 3 lun 0 da0: Fixed Direct Access SCSI-2 device da0: 40.000MB/s transfers (20.000MHz, offset 16, 16bit), Tagged Queueing Enabled da0: 2170MB (4445380 512 byte sectors: 255H 63S/T 276C) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message