default file descriptor limit ?

Slawa Olhovchenkov slw at zxy.spb.ru
Mon Apr 13 08:52:35 UTC 2015


On Mon, Apr 13, 2015 at 08:39:39AM +0000, Poul-Henning Kamp wrote:

> --------
> In message <20150413083159.GN1394 at zxy.spb.ru>, Slawa Olhovchenkov writes:
> 
> >> >This wastes tons of pointless close system calls in programs which
> >> >use the suboptimal but best practice:
> >> >
> >> >	for (i = 3; i < sysconf(_SC_OPEN_MAX); i++)
> >> >		close(i);
> >> >
> >> >For reference Linux seems to default to 1024, leaving it up to
> >> >massive server processes to increase the limit for themselves.
> >
> >This is typical only on startup, I think?
> 
> No.  This is mandatory whenever you spawn an sub process with less privilege.

Hmm.
1. Whats [linux] application do this?
2. For case of reduce this limit -- how spawned application can
increase this limit, if need? I am not sure, this is posible?

> >May be now time to introduce new login class, for desktop users, [...]
> 
> How about "now is the time to realize that very few processes need more
> than a few tens of filedescriptors" ?
> 
> If Linux can manage with a hardcoded default of 1024, so can we...

And have many FAQs "how to overcome this restriction". Including "libc
recompile"



More information about the freebsd-arch mailing list