From owner-freebsd-hackers Mon Mar 4 04:24:14 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA26676 for hackers-outgoing; Mon, 4 Mar 1996 04:24:14 -0800 (PST) Received: from dyson.iquest.net ([198.70.144.127]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA26671 for ; Mon, 4 Mar 1996 04:24:11 -0800 (PST) Received: (from root@localhost) by dyson.iquest.net (8.6.11/8.6.9) id HAA01155; Mon, 4 Mar 1996 07:19:31 GMT From: "John S. Dyson" Message-Id: <199603040719.HAA01155@dyson.iquest.net> Subject: Re: pwd_mkdb - really slow :( To: bde@zeta.org.au (Bruce Evans) Date: Mon, 4 Mar 1996 07:19:30 +0000 () Cc: julian@ref.tfs.com, rashid@rk.ios.com, hackers@FreeBSD.ORG In-Reply-To: <199603041002.VAA05866@godzilla.zeta.org.au> from "Bruce Evans" at Mar 4, 96 09:02:38 pm X-Mailer: ELM [version 2.4 PL24 ME8] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > same block is written many times. db often does this. I think it can > be programmed to do more buffering in memory, but often isn't. kvm_mkdb > was speeded up by a factor of about 5 by rewriting it to use mmap and > more buffering; now it is only about twice as slow as the old version > would be with a working disk cache ;-). > > >it might also be quicker to build the entire databse in ram > >and bang it out to disk as a single write.. :) > > Not much, if write() is suitably buffered. > Ahh... Come on, you know that the disk cache works, it simply does not write-behind as much as you would like. It read-caches very nicely. John