On Tue, Jul 15, 2003 at 11:13:52AM +0200, Rainer Kupke wrote: > Toad <[EMAIL PROTECTED]> wrote: > > > Well, on linux it's ulimit -n 1024 (as root) - you could try that. > > That got me looking in the right direction. > > It works with sh (and bash, not tested) and the number of descriptors > can be set as high as 10000+. (no root required) > > With tcsh (default on MacOS X) it is "limit descriptors <number>". > > I wrote a small program to see how many files I could open and found > that i can open +-5000 files before fopen fails with errno=23 (Too many > open files in system). > > I guess that it should be possible to use at least 512 descriptors > without causing trouble. > > Since "start-freenet.sh" gets executed by sh you could add "# ulimit -n > 512" to it and put a little note in the readme (please check the > numbers).
Well, the problem is that if we just put in ulimit -n 1024 > /dev/null 2>&1, it will REDUCE the ulimit if it is higher than that. Also we need to tell the node if it succeeded. Somebody better at shell script should look at this; it's not urgent. > > | Mac OS X: > | Unfortunately a process under Mac OS X can use no more than 256 file > | descriptors. > | This limits the number of parallel connections to other nodes and > | makes your node work less efficient. > | If you want to tweak this (your own decision & your own risk) you can > | uncomment the "#ulimit ..." line inside "start-freenet.sh" and set > | "maxNodeConnections=256" in "freenet.conf" (remember to uncomment the > | line). > | > | There is a limit for the total number of open files in the system. > | allowing a single process to open 512 files (twice the normal amount) > | should be fairly safe. > > > How many descriptors does freenet use for other purposes like splitfile > decoding, fproxy, stdout, stderr, ...? > > Is it really safe to leave only 128 for those in the default > configuration? Probably. -- Matthew J Toseland - [EMAIL PROTECTED] Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so.
pgp00000.pgp
Description: PGP signature