From owner-freebsd-arch Fri Jul 7 9: 0:18 2000 Delivered-To: freebsd-arch@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by hub.freebsd.org (Postfix) with ESMTP id 8B0AB37BF7D for ; Fri, 7 Jul 2000 09:00:04 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id JAA00696; Fri, 7 Jul 2000 09:00:01 -0700 (PDT) (envelope-from dillon) Date: Fri, 7 Jul 2000 09:00:01 -0700 (PDT) From: Matthew Dillon Message-Id: <200007071600.JAA00696@apollo.backplane.com> To: Chris Richards Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Alterations to vops References: <200007070143.SAA96248@apollo.backplane.com> <20000706184859.C25571@fw.wintelcom.net> <20000706223150.A24949@klapaucius.zer0.org> <20000707080934.I25571@fw.wintelcom.net> <20000707114411.A31035@wso.williams.edu> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :On Fri, Jul 07, 2000 at 08:09:34AM -0700, Alfred Perlstein wrote: : :> The only problem is that for the "average case" you waste nearly :> 3.5k per directory cached, so it's only really a win on systems :> with large amounts of ram. : :In your estimation, how large is "large"? Of course each site should :test to see what best suits its needs, but I'm looking for a rough :idea. : :-chris The number is also not correct. Sure, on a directory by directory basis the wastage can be 3.5K. But if the page is cached in the VM Page cache it will fall under the center-weighted LRU algorithm which means that idle directory cache pages will be reused by the system fairly quickly. In contrast, (512 byte) directory blocks sitting the buffer cache's MALLOC space are not governed by standard cache reuse mechanisms and are not as reusable. My personal feeling is that the simple fact that the pages become governed by standard reuse algorithms when in the VM Page cache more then compensates for the 'wasted' memory. And what does 'memory waste' mean anyway? If the system performs better then we shouldn't really care that 3.5K out of 4K is wasted for a few seconds, verses 512 bytes 'not wasted' but also held in the malloc cache 'forever' (except when the malloc cache gets saturated, in which case you reuse the blocks but are screwed anyway because the malloc cache is too small). -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message