rtcontrib - setting maximum number of open files on OSX 10.6.8

Hi Michael,

Not sure if this will help or not as this is a linux thing, but perhaps there is something similar in OSX. Under linux there is "limits.conf" which enables configuration of limits in a number of different ways including by username.

-Jack

···

--
# Jack de Valpine
# president
#
# visarc incorporated
# http://www.visarc.com
#
# channeling technology for superior design and construction

On 7/20/2011 3: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=4096

and 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 4096*

Which 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) unlimited

Which 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

Hi Michael,
I had some problem on OSX 10.5.8 but I think this should work on OSX 10.6.8
too.
I guess that by "ulimit -S -n 4096" you don't set it permanently.

Go to .bash_profile or create it in your home folder if you don't have it
there and just insert following

ulimit -n 2306

or higher number of open files if you need.

Hope it will help
David

···

On 20 July 2011 12:01, Michael Martinez <[email protected]> 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=4096

and 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 4096*

Which 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) unlimited

Which 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