From owner-freebsd-questions Thu Jun 17 16: 4:53 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id 9F5C1150BE for ; Thu, 17 Jun 1999 16:04:40 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id IAA06876; Fri, 18 Jun 1999 08:34:37 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id IAA54769; Fri, 18 Jun 1999 08:34:45 +0930 (CST) Date: Fri, 18 Jun 1999 08:34:45 +0930 From: Greg Lehey To: Alfred Perlstein Cc: mike@hyperreal.org, freebsd-questions@FreeBSD.ORG Subject: Re: Optimizing IDE performance revisited Message-ID: <19990618083444.D9893@freebie.lemis.com> References: <19990617163819.14715.qmail@hyperreal.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: ; from Alfred Perlstein on Thu, Jun 17, 1999 at 11:57:05AM -0500 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thursday, 17 June 1999 at 11:57:05 -0500, Alfred Perlstein wrote: > On Thu, 17 Jun 1999 mike@hyperreal.org wrote: > >> OK, from posts here and on the newsgroup, and the 'wd' man page, I found >> that flags 0xb0ffb0ff were sufficient to enable the kernel to use an IDE >> controller's 32-bit transfer, bus mastering, LBA addressing and >> multi-sector transfer capabilities: >> >> controller wdc0 at isa? port "IO_WD1" bio irq 14 flags 0xb0ffb0ff >> >> I saw a reference on the newsgroup to the fact that FreeBSD 3.0 and up >> supports "PIO".. I've looked at the source in /sys/i386/isa/wd.c and only >> saw one reference to PIO as some kind of fallback. >> >> My controller is capable of PIO mode 3 (11.1 MB/s in theory). No info about DMA >> modes. My question is: is this as optimized as it can be, or no? I haven't >> really noticed an improvement, is why I ask. What does your dmesg output say? You should get something like: wdc0 at 0x1f0-0x1f7 irq 14 flags 0xa0ffa0ff on isa wdc0: unit 0 (wd0): , DMA, 32-bit, multi-block-16 If you get the "DMA" message, then your chipset does support DMA. Otherwise it'll fall back to PIO. > Enabling PIO or DMA doesn't do all that much for transfer rate, however > it offloads a lot of work from the CPU. PIO is the mode in which the CPU does the work, so it onloads a lot of work to the CPU. It can also reduce transfer rates because the CPU can't keep up. I've seen a 10 MB/s drive reduced to 2.5 MB/s and 100% CPU on a P5/133. > Before I enabled DMA on my boxes, during heavy compiles top showed > about 50% or more CPU devoted to "interupt" (processing hardware IO) > when i switched to DMA it went to under 1% :) Right. That was PIO. > if you want to see raw read performance try this: > > dd if=/dev/rwd0 of=/dev/null bs=512 count=1000 > > -----^^^^^^^^^^ >> raw device for your harddisk. The block size is important. 512 bytes (the default) will not give you optimal performance. Try 64 kB instead. While this is running (you may want to increase the count) use top or iostat to see the interrupt time. With PIO it will be high, with DMA practically 0. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message