From owner-freebsd-hackers Sat Sep 22 14:39:49 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id DF82637B414 for ; Sat, 22 Sep 2001 14:39:44 -0700 (PDT) Received: (from dg@localhost) by root.com (8.11.2/8.11.2) id f8MLJZ730278; Sat, 22 Sep 2001 14:19:35 -0700 (PDT) (envelope-from dg) Date: Sat, 22 Sep 2001 14:19:34 -0700 From: David Greenman To: Matt Dillon Cc: Poul-Henning Kamp , Seigo Tanimura , bright@wintelcom.net, hackers@freebsd.org Subject: Re: More on the cache_purgeleafdirs() routine Message-ID: <20010922141934.C28469@nexus.root.com> References: <88901.1001191415@critter> <200109222121.f8MLLHe82202@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200109222121.f8MLLHe82202@earth.backplane.com>; from dillon@earth.backplane.com on Sat, Sep 22, 2001 at 02:21:17PM -0700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Well, wait a sec... all I do is zap the namei cache for the vnode. The > check to see if the vnode's object still has resident pages is still in > there so I don't quite understand how I turned things around. In my > tests it appears to cache vnodes as long as there are resident pages > associated with them. Sounds like a very good first step. I would like to point out that the problem may still occur on large memory systems with a few hundred thousand tiny files (that consume just one page of memory). There really needs to be a hard limit as well - something low enough so that the FFS node KVM malloc limit isn't reached, but still large enough to not significantly pessimize the use of otherwise free physical memory for file caching. Considering that a 4GB machine has about 1 million pages and that the malloc limit hits at about 250,000 vnodes, this is an impossible goal to acheive in that case without increasing the malloc limit by at least 4X. Of course this many 1 page files is extremely rare, however, and I don't think we should optimize for it. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message