cvs commit: src/sys/kern kern_descrip.c

David Schultz das at FreeBSD.ORG
Thu Jun 19 01:27:16 PDT 2003


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 at 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.


More information about the cvs-src mailing list