Re: ulimit stack information
Re: ulimit stack information
- Subject: Re: ulimit stack information
- From: Michael Smith <email@hidden>
- Date: Sat, 1 Mar 2008 13:41:48 -0800
On Mar 1, 2008, at 11:20 AM, Ken Mankoff wrote:
I'm running out of stack space with an application I need to run. I
have "ulimit -s 64000" in my .bash_profile. The highest value I can
set is 65532. At 65533 it reports, "/usr/bin/ulimit: line 4: ulimit:
stack size: cannot modify limit: Invalid argument"
I read somewhere that the kernel limits it to 64MB. I figure this is
the right place to get a definitive answer and further information.
Is it 64 really the limit? How would I allow multiple processes to
each have 128 or 256MB each? I'm comfortable recompiling a kernel if
need be.
Thanks for any advice,
First suggestion; fix the app so that it uses less than 64MiB of
stack. Hard, but realistically that much stack usage points to a
design/algorithmic flaw (Resource consumption that scales 1:1 with
some aspect of your dataset directly constrains the dataset that you
can manage vs. the availability of the resource in question.)
Second suggestion: you have hit the hard limit; you need to be root to
increase it. You can either run the shell as root, or write a setuid
root wrapper for your application that uses setrlimit(2) to bump both
the hard and soft limits up before starting the application.
= Mike
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden