Hi Michael,
I don't really know anything about launchd.conf, but I can explain why 'sudo ulimit -n 4096' doesn't work. ulimit applies to the shell instance in which it is called. When you use sudo you are essentially creating a shell with root permissions to execute the command. When the command is finished the shell is terminated. You are effectively changing the properties for a temporary shell, not the one you are trying to use.
Does your user account have admin priveliges? You can give admin privileges in the system preferences. If you have admin privileges than you should be able to use ulimit.
Andy
···
On Jul 20, 2011, at 12:01 PM, Michael Martinez wrote:
My second question is for Radiance users running OSX. I'm having trouble setting the maximum number of open files to more than 1024. I'm running OSX 10.6.8, and there seems to be two ways to change the maximum number of open files - one using ulimit and one using launchctl.
In .bash_profile I have this line:
ulimit -S -n 4096
In etc/launchchd.conf I have this:
limit maxfiles 4096
sysctl -w kern.maxfiles=4096and in etc/sysctl.conf I have:
kern.maxfiles=4096 kern.maxfilesperproc=4096
In a terminal line, when I enter launchctl limit I see this:
cpu unlimited unlimited
filesize unlimited unlimited
data unlimited unlimited
stack 8388608 67104768
core 0 unlimited
rss unlimited unlimited
memlock unlimited unlimited
maxproc 266 532
maxfiles 4096 4096Which is good. 4096 is more than the 2306 files I want rtcontrib to talk to at the same time.
But then, looking at ulimit -a in a terminal, I see this:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 1
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 266
virtual memory (kbytes, -v) unlimitedWhich is bad - 1024 is less than the 2306 files I want rtcontrib to talk to at the same time. Its also surprising given that it should be set to 4096 by .bash_profile.
Then when I try ulimit -n 4096, I get this:
bash: ulimit: open files: cannot modify limit: Operation not permitted
If I use sudo, it takes the command, but when I look at ulimit -a again, the open files limit still says 1024, and despite what launchctl limit says, 1024 is the governing number of maximum open files.
Has anyone out there had success setting this in OSX 10.6 or higher? Or has anyone updated to 10.7 (just released today) and had success?
Many thanks,
Michael_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general