From owner-cvs-all@FreeBSD.ORG Thu Jun 19 08:02:15 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FEFE37B407 for ; Thu, 19 Jun 2003 08:02:15 -0700 (PDT) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 52BDD43FBD for ; Thu, 19 Jun 2003 08:02:13 -0700 (PDT) (envelope-from silby@silby.com) Received: (qmail 33747 invoked from network); 19 Jun 2003 15:02:12 -0000 Received: from niwun.pair.com (HELO localhost) (209.68.2.70) by relay.pair.com with SMTP; 19 Jun 2003 15:02:12 -0000 X-pair-Authenticated: 209.68.2.70 Date: Thu, 19 Jun 2003 12:02:09 -0500 (CDT) From: Mike Silbersack To: David Schultz In-Reply-To: <20030619082713.GC79448@HAL9000.homeunix.com> Message-ID: <20030619115532.A629@odysseus.silby.com> References: <200306181857.h5IIvwfY075070@repoman.freebsd.org> <20030619082713.GC79448@HAL9000.homeunix.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.ORG cc: Mike Silbersack cc: src-committers@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern kern_descrip.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jun 2003 15:02:16 -0000 On Thu, 19 Jun 2003, David Schultz wrote: > Please allow me to re-make the point I believe I made when the > patch was submitted. (Of course, you're welcome to ignore it.) > The reserve should be a tunable constant, not a fixed percentage. > The idea, as I understand, is to allow the administrator to log in > and correct the problem. On a server with 50000 struct files, the > reserve doesn't need to be 2000; a reserve on the order of 100 > open files should be adequate for just about any system. In other > words, the reserve doesn't need to scale with the size of the > system. Your point is good, but not relevant to file descriptors. Why? File descriptors are dynamically allocated. Even if we set maxfiles to 1000000, thereby making the reserve 5 million, we're still not actually wasting anything. Also, the idea of a huge huge reserve isn't necessarily a bad idea; it seems somewhat good that with maxfiles = 50000 that apache / other root daemons can probably run entirely within the reserve, thereby not being susceptible to user interference no matter how many fds are allocated. If we were talking about sockets / procs / anything that used a fixed allocation set at boot time, then I'd agree with you. Oh, btw; while running my fd hog program as root, cron decided to core. Someone should take a look at it and figure out where it doesn't check the return value of something which allocates a fd (or socket?) Mike "Silby" Silbersack