From owner-cvs-all Sun Sep 19 10:32:52 1999 Delivered-To: cvs-all@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id C68F414D0A; Sun, 19 Sep 1999 10:32:45 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.2) with ESMTP id TAA16750; Sun, 19 Sep 1999 19:30:52 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Matthew Dillon Cc: dg@root.com, Greg Lehey , 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) In-reply-to: Your message of "Sun, 19 Sep 1999 10:15:47 PDT." <199909191715.KAA72822@apollo.backplane.com> Date: Sun, 19 Sep 1999 19:30:51 +0200 Message-ID: <16748.937762251@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In message <199909191715.KAA72822@apollo.backplane.com>, Matthew Dillon writes: >: >:IFF we want to maintain the block interface, we need to fix the error >:return for the write case, but we also need to do a significant amount >:of work speeding it up. It currently is an order of magnitude slower >:than the char interface (remember to measure consumed CPU time, not >:wall-clock time). > > The buffered block device is not slow, I don't know where you get > that idea from. It is, in fact, just about as fast as you can get and > still cache the data, which is to say somewhat faster then normal file > access would be. The cache is flushed on every open of the device > which may be causing your confusion. There is no overhead beyond the > normal overhead associated with caching a file. 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. Obviously if we retain only the block interface, we wouldn't want to inflict such an overhead on applications which couldn't care less about us caching for them (because they do their own caching). Oracle is a good example. I repeat: IFF we want to retain only the block interface, it will need significant performance improvements. Poul-Henning -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." FreeBSD -- It will take a long time before progress goes too far! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message