From owner-cvs-all Sun Sep 19 19:26:30 1999 Delivered-To: cvs-all@freebsd.org Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by hub.freebsd.org (Postfix) with ESMTP id 9804015A6B; Sun, 19 Sep 1999 19:26:19 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id LAA07158; Mon, 20 Sep 1999 11:55:56 +0930 (CST) Date: Mon, 20 Sep 1999 11:55:56 +0930 From: Greg Lehey To: Matthew Dillon Cc: Poul-Henning Kamp , dg@root.com, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: User block device access (was: cvs commit: src/sys/miscfs/specfs spec_vnops.c src/sys/sys vnode.h src/sys/kern vfs_subr.c) Message-ID: <19990920115556.J55065@freebie.lemis.com> References: <16748.937762251@critter.freebsd.dk> <199909191806.LAA73255@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199909191806.LAA73255@apollo.backplane.com>; from Matthew Dillon on Sun, Sep 19, 1999 at 11:06:28AM -0700 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-cvs-all@FreeBSD.ORG Precedence: bulk On Sunday, 19 September 1999 at 11:06:28 -0700, Matthew Dillon wrote: >> >> Matt your "prove phk wrong at any time and at any cost" reflex is >> getting more and more in the way of your technical knowledge here :-) >> >> Did you usee the (...) I had up there ? Did you try it yourself ? >> >> rover# time dd if=/dev/rda0 of=/dev/null bs=1m count=100 >> 100+0 records in >> 100+0 records out >> 104857600 bytes transferred in 33.712305 secs (3110366 bytes/sec) >> 0.0u 0.0s 0:33.76 0.2% 67+1707k 2+0io 2pf+0w >> rover# time dd if=/dev/da0 of=/dev/null bs=1m count=100 >> 100+0 records in >> 100+0 records out >> 104857600 bytes transferred in 84.777081 secs (1236863 bytes/sec) >> 0.0u 3.7s 1:24.79 4.4% 75+2771k 51201+0io 0pf+0w >> rover# >> >> Block devices are (at least ?) an order of magnitude more >> resource consuming than char devices. > > Oh for gods sake, your problem here is not with the buffered > block device, it looks to me like you are overrunning the > buffer cache's capabilities with too-large block size. Also, if you > are only getting 3.1 MBytes/sec over the raw interface there's > something seriously screwy with your setup. > > Try using a reasonable block size, like 32k and see if that helps. > > I get the disk's platter transfer rate whether I use a block device, > a raw device, or a file, with only minor differences between them. > That's 27-28 MBytes/sec across a two-disk stripe, and 13-14 MBytes/sec > from a single disk. Poul-Henning has already replied to this with some figures. I can confirm what he says; I've been looking a lot at this sort of thing with Vinum. That doesn't answer the question "why", however. I suspect that there's something funny in buffer management which is reducing performance below what it could be. Vinum has a tool which can be used to measure device queue length, and I've seen widely differing queue lengths when writing to Vinum block devices: they can fluctuate between 100 requests and almost none. I can't explain that by the way Vinum works; it will just malloc and issue requests. About the only place it could block is in malloc, but the actual memory usage fluctuates wildly. I suspect that this is a bug rather than a feature; the question is, is it worth following? Greg -- 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 cvs-all" in the body of the message