Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jun 2003 01:27:13 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Mike Silbersack <silby@FreeBSD.ORG>
Cc:        cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern kern_descrip.c
Message-ID:  <20030619082713.GC79448@HAL9000.homeunix.com>
In-Reply-To: <200306181857.h5IIvwfY075070@repoman.freebsd.org>
References:  <200306181857.h5IIvwfY075070@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 18, 2003, Mike Silbersack wrote:
> silby       2003/06/18 11:57:58 PDT
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/kern             kern_descrip.c 
>   Log:
>   Reserve the last 5% of file descriptors for root use.  This should allow
>   systems to fail more gracefully when a file descriptor exhaustion situation
>   occurs.
>   
>   Original patch by:      David G. Andersen <dga@lcs.mit.edu>
>   PR:                     45353  http://www.FreeBSD.org/cgi/query-pr.cgi?pr=45353

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.

I'm glad to see that you made the keen observation that it's
important to check the real UID for rootness rather than the
effective UID.  And thanks for subsequently adding the
rate-limited ``file table full'' diagnostics.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030619082713.GC79448>