From owner-freebsd-stable Sat Apr 18 19:15:37 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA25434 for freebsd-stable-outgoing; Sat, 18 Apr 1998 19:15:37 -0700 (PDT) (envelope-from owner-freebsd-stable@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA25428; Sun, 19 Apr 1998 02:15:30 GMT (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id MAA14356; Sun, 19 Apr 1998 12:12:21 +1000 Date: Sun, 19 Apr 1998 12:12:21 +1000 From: Bruce Evans Message-Id: <199804190212.MAA14356@godzilla.zeta.org.au> To: mark@vmunix.com, mike@smith.net.au Subject: Re: best wdc0 flags ? Cc: hardware@FreeBSD.ORG, stable@FreeBSD.ORG Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk >We've been duplicating 3GB Western Digital disks the last few days under >2.2.6, flags 0x80ff80ff on 166MHz P5/430TX boards, and averaging about >5M/sec throughput. Seems a bit slow. For a Fireball ST6.4 under -current, flags 0xa0ffa0ff (DMA...) on a K6/233/VIA2, I get 9-10M/sec for `dd if=/dev/rwd2 of=/dev/null bs=1m count=1280'. 5-6M/sec is normal for the previous generation of 5400 rpm IDE drives and for the outer tracks of this drive. >Try 'dd if=/dev/wd1 of=/dev/null bs=1m' to get an >idea of your raw disk speed as opposed to filesystem throughput. A bad idea. /dev/wd1 is not a raw disk. It is a buffered disk with a too-small block size of 2K. The effects of the buffer cache are difficult to analyze, and not very interesting because real file systems don't use a too-small block size, and clustering usually gives an effective block size of 64K or 128K for large sequential files. Read clustering seems to be unpessimizing the throughput for the 2K block size in -current, but at a huge cost: $ time dd if=/dev/rwd2 of=/dev/null bs=1m count=1280 # raw 1280+0 records in 1280+0 records out 1342177280 bytes transferred in 136.574105 secs (9827465 bytes/sec) 137.22 real 0.00 user 2.04 sys $ time dd if=/dev/wd2 of=/dev/null bs=1m count=1280 # buferred 1280+0 records in 1280+0 records out 1342177280 bytes transferred in 136.127378 secs (9859716 bytes/sec) 136.78 real 0.02 user 116.84 sys ^^^^^^^^^^ huge cost A slightly slower CPU would not be able to keep up with the disk. DMA only helps in this benchmark by freeing up some CPU cycles. PIO at 16.6M/sec would consume over half the CPU cycles, so the same CPU would not be able to keep up if the disk were in non-DMA mode. The cost for a too-small block size on the raw device is large but not huge: $ time dd if=/dev/wd2 of=/dev/null bs=2k count=1280 # raw, pessimized 655360+0 records in 655360+0 records out 1342177280 bytes transferred in 136.931865 secs (9801789 bytes/sec) 136.99 real 2.19 user 46.39 sys Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message