My node was dying repeatedly because of running out of file descriptors.
It turned out to be down to NativeFSDir having too many files open. In
the grand Freenet tradition of treating the symptoms, I have implemented
a pooled RandomAccessFile system, so that we only have the LRU <n> files
open at any given time, the others are opened when needed. Linux and
most unixes have a default maximum FDs including sockets of 1024, so I
will set the default to 256. But what should it be set to for various
forms of Windoze? Win95 has a 50 socket limit and Win98 has a 100 socket
limit IIRC, but I don't know whether that includes file handles too...
Windows NT/2K/XP apparently have no limit by default, so I can set it to
infinite. According to some win32 api docs I read ages ago. More recent
information:
"Since stdio level functions, such as fopen, are built on top of the
lowio functions, the maximum of 2,048 is a hard upper limit for the
number of simultaneously open files accessed through the C run-time
library."
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt__setmaxstdio.asp

So I will set a limit of 1024 for unrecognized Windowses.

MacOS/X has a 256 fd limit per user by default, we set
maxNodeConnections by default to 128, so I will set maxNodeFilesOpen to
64.
-- 
Matthew J Toseland - [EMAIL PROTECTED]
Freenet Project Official Codemonkey - http://freenetproject.org/
ICTHUS - Nothing is impossible. Our Boss says so.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to