*BSD News Article 51298


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!solaris.cc.vt.edu!news.seanet.com!news.seanet.com!michaelv
From: michaelv@MindBender.HeadCandy.com (Michael L. VanLoon)
Newsgroups: comp.unix.bsd.netbsd.misc
Subject: Re: Number of max available file descriptors?
Date: 18 Sep 1995 23:31:06 GMT
Organization: HeadCandy Associates... Sweets for the lobes.
Lines: 34
Message-ID: <MICHAELV.95Sep18163106@MindBender.HeadCandy.com>
References: <43kj47$2q8@nntp.Stanford.EDU>
NNTP-Posting-Host: mindbender.seanet.com
In-reply-to: fangchin@jessica.Stanford.EDU's message of 18 Sep 1995 20:00:07 GMT

In article <43kj47$2q8@nntp.Stanford.EDU> fangchin@jessica.Stanford.EDU (Chin Fang) writes:

   One of our heavily used SS2 running SunOS 4.1.3U1B kept running out
   file descriptors when certain jobs were running.  We fixed it for the
   time being by hacking the code and adding in a setrlimit() to get
   the max from SunOS everytime these jobs are run.  

That is one correct way to fix it.

   I wonder whether NetBSD has higher file descriptor upper limit (Solaris
   has 1024, Irix has 2048)?  If so, perhaps we can migrate to it and get
   a more comfortable room?

The default is still low (and should be).  My NetBSD-current/i386
system shows me a default of 64 fd's.  If I "unlimit descriptors"
(tcsh; other shells have slightly different syntax for the same
thing), I can get 3404 (not sure where that limit is set).

You could also, instead of modifying code, make the command you want
to run a shell script which simply unlimits your file descriptors and
then runs the real program.

The default number should be kept low, however, because it keeps
errant programs from killing your system by opening a huge number of
files.

--
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  Michael L. VanLoon                                 michaelv@HeadCandy.com
       --<  Free your mind and your machine -- NetBSD free un*x  >--
     NetBSD working ports: 386+PC, Mac 68k, Amiga, HP300, Sun3, Sun4,
                           DEC PMAX (MIPS), DEC Alpha, PC532
     NetBSD ports in progress: VAX, Atari 68k, others...
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -