From owner-freebsd-arch Tue Nov 9 19:23:53 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 88EAD14BC4 for ; Tue, 9 Nov 1999 19:23:45 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id EAA01984 for ; Wed, 10 Nov 1999 04:23:39 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id EAA04937 for freebsd-arch@freebsd.org; Wed, 10 Nov 1999 04:23:37 +0100 (MET) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 770E414BC4 for ; Tue, 9 Nov 1999 19:23:23 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from p13-ts5.syd2.zeta.org.au (beefcake.zeta.org.au [203.26.10.12]) by mailman.zeta.org.au (8.8.7/8.8.7) with ESMTP id OAA19800; Wed, 10 Nov 1999 14:28:58 +1100 Date: Wed, 10 Nov 1999 14:22:58 +1100 (EST) From: Bruce Evans X-Sender: bde@alphplex.bde.org To: Simon Shapiro Cc: freebsd-arch@freebsd.org Subject: Re: I/O Evaluation Questions (Long but interesting!) In-Reply-To: <3828BB53.DD482CD2@simon-shapiro.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > And this, ladies and gentlemen is what I do not understand; > > Why is random WRITE to a block device about 10-11 times > slower than raw device? > Actually, sequential read is 1/3 of raw device too. Why? Block devices have to use a fixed block size. This size is normally BLKDEV_IOSIZE. For historical reasons, BLKDEV_IOSIZE is normally too small. On i386's, it is 2048 in RELENG_3 and 4096 in -current. -current has a sysctl to set the default size. Large i/o's are split up into blocks of the fixed size. Small blocks are very bad for sequential i/o's. They may actually be good for random i/o's if the original i/o's are small. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message