Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A fix for 'Too many open files' in bittorrent apps' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A fix for 'Too many open files' in bittorrent apps
Authored by: dotjamie on Oct 07, '04 12:50:15PM

This is horrible advice.

Changing a ulimit in a shell will only affect other processes launched by that shell after the ulimit was put in.

So, if you launch from Finder, your ulimit wont do anything.

This is what you should do.

Edit (or create) /etc/sysctl.conf

In it put:

#
# allow system to run more processes
kern.maxproc=2048
# allow users to run more processes
kern.maxprocperuid=500

.. then reboot.

I still havent figured out the problem tho where the entire system hangs after 256 simultaneous streams are running. Bleah.



[ Reply to This | # ]
A fix for 'Too many open files' in bittorrent apps
Authored by: ParadisePete on Oct 07, '04 05:23:29PM
This is horrible advice.
Horrible?

Changing a ulimit in a shell will only affect other processes launched by that shell after the ulimit was put in.

Well ya know, he already said that. His 'horrible' comment does exactly what he said it does, and nothing more.

[ Reply to This | # ]

A fix for 'Too many open files' in bittorrent apps
Authored by: cewatts on Oct 07, '04 07:49:28PM

This isn't good advice either. kern.maxproc controls the maximum number of running processes, not the maximum number of open files per proc.

The more appropriate sysctls to looks at would be kern.maxfiles and kern.maxfilesperproc, but on my system (1GB ram, probably autoscaled) they default quite high: kern.maxfiles = 12288, kern.maxfilesperproc = 10240.

A system-wide shell limit change (as the other posts suggest) is what is necessary, unless I'm missing something.



[ Reply to This | # ]
A fix for 'Too many open files' in bittorrent apps
Authored by: osxpounder on Oct 11, '04 04:05:09PM

It might seem like a good idea to start a post with a warning like, "This is horrible advice", but it generates some unintended results.

After all, the original poster was trying to help, and didn't intend to give "horrible advice". Calling their advice horrible not only hurts their feelings, but makes you sound arrogant--neither of which contribute to our goals here: sharing advice, reviewing it, improving it. You could make an enemy without even intending to, or knowing you did.

Instead, consider saying, "Here's an alternative that's better, and here's why: ....." That way, you don't say anything negative about the other person's post, but you do get to say all kinds of positives about your own. The advice is the point, not whether you think it's good, bad or stinky.

---
--
osxpounder



[ Reply to This | # ]