From owner-freebsd-fs Thu Oct 3 06:20:43 1996 Return-Path: owner-fs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id GAA25742 for fs-outgoing; Thu, 3 Oct 1996 06:20:43 -0700 (PDT) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA25737; Thu, 3 Oct 1996 06:20:39 -0700 (PDT) Received: (from root@localhost) by dyson.iquest.net (8.7.5/8.6.9) id IAA00624; Thu, 3 Oct 1996 08:20:17 -0500 (EST) From: "John S. Dyson" Message-Id: <199610031320.IAA00624@dyson.iquest.net> Subject: Re: nbuf in buffer cache To: karpen@ocean.campus.luth.se (Mikael Karpberg) Date: Thu, 3 Oct 1996 08:20:17 -0500 (EST) Cc: dyson@FreeBSD.org, bde@zeta.org.au, heo@cslsun10.sogang.ac.kr, freebsd-fs@FreeBSD.org In-Reply-To: <199610030805.KAA25133@ocean.campus.luth.se> from "Mikael Karpberg" at Oct 3, 96 10:05:45 am Reply-To: dyson@FreeBSD.org 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-fs@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > Umm... hold on a second, here... :-) > I always thought Linux etc used all free memory for disk caching, and > that the BSD's used a formula (basically something like some percentage of > the available memory) to determine the size of a static buffer, used as > disk cache. Now... it makes sense if this changes when you use a merged > disk cache and VM system. Someone let me in on how things work? :-) > FreeBSD uses all of available memory for disk cache (it has actually had a true merged VM/buffer cache longer than Linux.) Linux has used a dynamic buffer cache for a long time though (which is technically different.) The only type of data that must be in a buffer is directory info. I am about ready to consider 2x-3x the number of buffers and changing a few tunables so that the cache will not take any more space. Since buffers only take 200 or so bytes apiece, it will not hurt (much) to increase the number of buffers even on a small system. The perf won't go down as long as I change the formula so that the memory limit isn't 8K * nbuf, but is 2-3K * nbuf. John