From owner-freebsd-current Tue Sep 28 5: 3:31 1999 Delivered-To: freebsd-current@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id 9BA8014DE2 for ; Tue, 28 Sep 1999 05:03:28 -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 OAA25753; Tue, 28 Sep 1999 14:02:18 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Ville-Pertti Keinonen Cc: current@FreeBSD.ORG, culverk@culverk.student.umd.edu Subject: Re: just found this In-reply-to: Your message of "28 Sep 1999 14:52:06 +0300." <86670v1cex.fsf@not.demophon.com> Date: Tue, 28 Sep 1999 14:02:18 +0200 Message-ID: <25751.938520138@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <86670v1cex.fsf@not.demophon.com>, Ville-Pertti Keinonen writes: > >Replying to myself... > >> Looking at the code, it would seem that the number of directories is >> what's causing problems (one is created for each link). The directory >> vnodes can't be thrown out because a name cache entry exists in each >> one. All of the name cache entries point to the same vnode, which >> can't be thrown out because it is open. > >My initial guess wasn't correct (I mis-read the program due to the >lack of indentation) - huge amounts of memory actually are consumed by >name cache entries, not just vnodes... > >Balancing the sizes of multiple caches can get quite interesting. I have been mulling over this issue for some time. My current thinking is that pending some more well thought out mechanism, the right thing to do here is to detect the DOS and react to that, not to handicap the caching in general. The easiest way to detect this DOS is probably to keep track of the namecache entries ----------------- live vnodes ratio, and enforce an upper limit on it. -- 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 freebsd-current" in the body of the message