From owner-freebsd-current Wed Aug 27 12:42:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA00908 for current-outgoing; Wed, 27 Aug 1997 12:42:33 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA00897 for ; Wed, 27 Aug 1997 12:42:29 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.5/8.6.9) id FAA05649; Thu, 28 Aug 1997 05:36:47 +1000 Date: Thu, 28 Aug 1997 05:36:47 +1000 From: Bruce Evans Message-Id: <199708271936.FAA05649@godzilla.zeta.org.au> To: dg@root.com, Shimon@i-Connect.Net Subject: Re: IDE vs SCSI was: flags 80ff work... Cc: current@freebsd.org Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Copper was left alone, except for running: > ``dd if=/dev/sd16s1a of=/dev/null bs=1024k'' >The partition read is a 6GB slice off a 6x4GB RAID-0 array >... >While David is right in regards to the filesystem, I did get >something correctly. Regardless of block size specified, access >to a block device is always in 4K blocks. Nope. By default, block devices are accessed with the too-small block size of BLKDEV_IOSIZE = 2K. The default is used for the whole-disk device (e.g., /dev/sd16) unless the disk is "dedicated" and happens to have a BSD file system on its "c" partition. For block devices that have a BSD file system on them, the block size is taken from the file system. You apparently have a BSD file system with a block size of 4K on /dev/sd16s1a. 4K is a small block size for a BSD file system (the default is 8K and the max is 64K), but is good for some applications (ones where the average write is <= 4K, and ones where disk space is scarce). Block devices are unsuitable for almost everything except mounting file systems on. They are unsuitable for benchmarks because you can't control the block size. I just noticed another bug: stat() says that st_blksize is 2K for all bdevs. It doesn't know that a different size is used internally for bdevs with a BSD file system on them. (st_blksize is bogus for cdevs too. It is always MAXBSIZE = 64K, which is excessive for terminals. This problem got worse when MAXBSIZE was increased from 16K to 64K.) Bruce