Date: Wed, 27 Aug 1997 18:37:16 -0700 (PDT) From: Simon Shapiro <Shimon@i-Connect.Net> To: Bruce Evans <bde@zeta.org.au> Cc: current@freebsd.org, dg@root.com Subject: Re: IDE vs SCSI was: flags 80ff work... Message-ID: <XFMail.970827183716.Shimon@i-Connect.Net> In-Reply-To: <199708271936.FAA05649@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Bruce Evans; On 27-Aug-97 you wrote: > >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). I have no filesystem of any kind on that partition. I have seen it before. I trust that what you describe should be correct, but in practive, you may not be. I offered this as an explanation of what caused me to make a mistake, and now you tell me I am yet wrong again :-) > 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. They make for a very interesting database storage device. Write to the bdev and you get buffered I/O. Write to the cvdev and you get unbuffered, uncached I/O. > 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.) Stat also never tells you the size of a cdev, only of a bdev. Simon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.970827183716.Shimon>