🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #40446

Re: INN2.2: Too many open files

#40446
From: Russ Allbery
Date: Mon, 04 Oct 1999 00:00
44 lines
2636 bytes
(Copied to the maintainer of the page mentioned below.)

jan <jan@online.be> writes:

> extra information on all kinda "solaris tunig"can be found at:

> http://www.rvs.uni-hannover.de/people/voeckler/tune/EN/tune.html

This page has one of the common old recommendations about soft file
descriptor limits:

| With respect to the standard IO library, you should not raise the soft
| limit above 256. Stdio can only use <= 256 FDs.

While the second statement is true, at lesat with Solaris 2.6 (Solaris 7
changed a bunch of this stuff), the first statement isn't necessarily.
This will only be a problem if your stdio-using program opens more than
256 files or if you're using fdopen() to turn file descriptors over 256
into stdio FILEs.

My experience is that most applications that use lots of open files either
use strictly raw file descriptors or strictly stdio and that the mixing
doesn't end up being much of a problem.  Furthermore, note that if you've
got a file descriptor valued over 256, under normal circumstances (ie, in
the absence of intentionally relocating file descriptors, which is
something INN does a bit of) your program would have failed *anyway* with
a limit of 256.  Failing by hitting a file descriptor limit may fail more
cleanly than failing by hitting stdio errors, but I don't think that's
enough to warrant the recommendation against doing this.

For dedicated INN server systems, I still recommend increasing the soft
limit to 1024 and then forgetting about it.  INN uses stdio as little as
possible, and basically not at all in the processes that have to open lots
of files.

This page also recommends increasing the hard limit over 1024, which is
something that you absolutely do not want to do for INN as it may break
select().  (The text does point out the problems with this.)  The text
there seems mostly aimed at tuning Squid systems.

-- 
Russ Allbery (rra@stanford.edu)         <URL:http://www.eyrie.org/~eagle/>

Technical Details
Message-ID: <ylg0zrgqpy.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <7t9j09$5tu$1@oak.fernuni-hagen.de> <ylln9ji95m.fsf@windlord.stanford.edu> <37F8AA6D.7F31CCE2@online.be>

Show Full Headers
Complete Article Headers
Message-ID: <ylg0zrgqpy.fsf@windlord.stanford.edu>
Subject: Re: INN2.2: Too many open files
Date: Mon, 04 Oct 1999 00:00:00 +0000
From: Russ Allbery <rra@stanford.edu>
References: <7t9j09$5tu$1@oak.fernuni-hagen.de> <ylln9ji95m.fsf@windlord.stanford.edu> <37F8AA6D.7F31CCE2@online.be>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 532657920
To: voeckler@rvs.uni-hannover.de
Organization: The Eyrie
Newsgroups: news.software.nntp