Re: ulimit settings for build & run ?
Re: ulimit settings for build & run ?
- Subject: Re: ulimit settings for build & run ?
- From: "Justin C. Walker" <email@hidden>
- Date: Sat, 23 Dec 2006 11:09:51 -0800
On Dec 23, 2006, at 09:20 , David Carpeneto wrote:
Hi all - Newbie-esque question - I'm opening up a *lot* of file
descriptors in something I'm doing, and quickly bang into the
ulimit (-n
is by default 256).
Is there a simple way to jack up the ulimit for the thing I'm
building ?
Or do I need to wrap the built product in a shell that sets the
ulimit,
then launch my app (which is what I'm used to doing in Java) ?
The system limits the number of open file descriptors, per process.
The default, as you say, is 256. You can check, with sysctl(1) or
(2) to see what the max, system-wide and per-process, is. On my
10.4.8 system, the per-process limit is
kern.maxfilesperproc = 10240
The total number of open files in the system is limited to
kern.maxfiles = 12288
You use setrlimit(2) to modify this value per-process. I've never
dealt with this feature, so I can't say what the programming burden
would be, but you can definitely raise the limit (programmatically).
Doing it via the shell seems fraught with problems.
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
If you're not confused,
You're not paying attention
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden