I checked in the new connection management code that
Oskar, Tavin and I discussed on IRC. 

See Oskar's earlier email for the rationale:
http://hawk.freenetproject.org/pipermail/devl/2002-January/009858.html

The connection culling is done by LRU as Oskar suggested.

The node QueryRejects requests whenever the number of active jobs exceeds
2/3 of the maximum thread limit or if the inbound request rate exceeds 50 
requests per minute.  Without the rate limit, the node is too easily overrun 
with requests which later causes inbound connections to be rejected because 
of the thread limit.  Maybe we can come up with a more elegant heuristic.

I also changed Freenet.node.Main to cause the ThreadPool to preallocate and 
hold maxThreads threads at startup time to diminish thread creation 
thrashing.  It seems to help the performance of busy nodes.

I tested the code on my local node with the following parameters:

maxHopsToLive=15
maxNodeConnections=60

and it works well for me.

I'll check these changes into the new_datastore branch tomorrow as Tavin
requested unless I hear otherwise.

--gj


-- 
Freesites
(0.3) freenet:MSK at SSK@enI8YFo3gj8UVh-Au0HpKMftf6QQAgE/homepage//
(0.4) freenet:SSK at npfV5XQijFkF6sXZvuO0o~kG4wEPAgM/homepage//

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to