Article View: news.software.nntp
Article #40671Re: INN2.2: Too many open files
From: Russ Allbery
Date: Fri, 08 Oct 1999 00:00
Date: Fri, 08 Oct 1999 00:00
70 lines
3919 bytes
3919 bytes
[ Posted and mailed, in case you don't read this newsgroup. ] Jens-S Voeckler <voeckler@rvs.uni-hannover.de> writes: > The quote should continue with the complete paragraph: > ]| You can either use AT&T's sfio library, or wait for Solaris 7 > ]| which is said to have fixed this weakness. RPC prior to 2.6 may > ]| break, if more than 1024 FDs are available to it. > RPC might even break, if there are more than 256 FDs available to it... Sorry, I was quoting only the portions relevant to INN (which doesn't use RPC). I'm not disagreeing with your conclusions within a context broader than just INN servers. I should have made that more clear. > But we were talking about the soft limit. Any software needing more can > use the [gs]etrlimit calls to increase their soft limit, or log an > error, if the hard limit was set too low. And INN does do this already in some places, but people keep getting bit by other places that end up needing it when they hadn't in the past. It's arguably a bug in INN that all of the separate programs don't try to increase their file descriptor limits when they need to, but for a very long time on a dedicated news server box it's been a better idea to just globally increase the limits. > Historically, I recommeded more than 256 FDs as soft limit. You would > not believe, how many people (me included) just scan the tuning tips and > use the suggested values without bothering to think about what they are > doing. And if you raised your FD soft limit above 256 (up to and > including S2.6), and you use the SUN workshop compilers, do not complain > to me (or SUN) that the license manager fails to connect via RPC, thus > you license is not found and thus your compiler does not work... Hm. Yes, that's a good point. Thanks. > I would recommed to include code into INN that does FD checks like squid > during start-up, e.g. have a look about the amount of FDs available > (hard limit), and increase the soft limit as necessary, or complain, if > the hard limit is too low. innd and innfeed do do this (via a setuid program, in fact, so they'll even raise hard limits if necessary). The problem with INN that's different than Squid is that INN is a large collection of separate programs rather than one daemon. > Though getrlimit() and setrlimit() are not part of POSIX (according to > Stevens APUE), both SVR4 and 4.3+BSD provide them. The only catch is to > look out for RLIMIT_NOFILE (SVR4) versus RLIMIT_OFILE (BSD) - nothing a > small #if #define #endif couldn't catch... Hm. Not sure if we're accounting for that currently; I should go check. Thanks. > But then, if it is not strictly POSIX, it might not run on NT ;-) For INN, I really don't care. :) > BTW, recoding from select() to poll() is not very difficult, and it is > said to be even a bit faster on Solaris systems as added sugar besides > having more than 1024 FDs available. Probably worth making a poll() implementation available, but poll() isn't (yet) as portable as select(). -- Russ Allbery (rra@stanford.edu) <URL:http://www.eyrie.org/~eagle/>
Technical Details
Message-ID:
<ylvh8hmbes.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-mailReferences:
<7t9j09$5tu$1@oak.fernuni-hagen.de> <ylln9ji95m.fsf@windlord.stanford.edu> <37F8AA6D.7F31CCE2@online.be> <ylg0zrgqpy.fsf@windlord.stanford.edu> <Pine.SGI.4.05.9910071318390.1017-100000@challenger-lane>Show Full Headers
Complete Article Headers
Message-ID: <ylvh8hmbes.fsf@windlord.stanford.edu> Subject: Re: INN2.2: Too many open files Date: Fri, 08 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> <ylg0zrgqpy.fsf@windlord.stanford.edu> <Pine.SGI.4.05.9910071318390.1017-100000@challenger-lane> 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: 534574635 To: "Jens-S. Voeckler" <voeckler@rvs.uni-hannover.de> Organization: The Eyrie Newsgroups: news.software.nntp