Nodes are being barraged with so many requests that often they get stuck doing nothing but rejecting requests. Each time my node got into this state, I'd shut it down for an hour (so that the other nodes would throttle back a _lot_ on my now unreachable node) and then start it up again, being barraged by much fewer requests, and actually able to handle some of them.
This afternoon, I came up with an idea to fix this problem. The maxThreads parameter determines how many connections one's node can handle. The node will reject requests automatically once 3/4 of these threads are being used, and will reject requests it would have to forward if 2/3 of the threads are being used. These constants were chosen by GJ to maximize the node's ability to gracefully reject requests. I realized that if I increase these constants, 1) my node will handle more requests before going into an overload state and 2) there'll be a smaller window between being not-overloaded and refusing connections. Because of this smaller window, the node will be sending back fewer QueryRejected messages, and with the same load will refuse more connections. The trick is that since it's sending out fewer QRej's, it doesn't get stuck in a state where it's doing nothing but sending out QRej's. At least that's the experience with my node. Before I changed these constants, I'd see my node able to handle a max of about 700 requests out of 3000 in an hour. But when there were 10K + incoming requests in an hour, my node would be able to handle less than 10 of them, it'd be spending so much time rejecting requests. After changing the constants to 4/5 and 5/6, my node was quickly subjected to 13337 requests in an hour, of which it was able to handle 1356 of them; much better results than before. It'd be great if we could scale back the number of requests made of a node to match the number it actually is able to handle, but if we can get nodes to handle more requests, that can't be a bad thing for the network. To change these constants in your node, you have to edit freenet/src/freenet/node/Node.java and change the 2*blah/3 on line 925 to 4*blah/5 and the 3*blah/4 on line 927 to 5*blah/6. Hopefully I can find out from others that this change works wonders on their node, and can check it into CVS for inclusion into the standard distribution. I'm going to do at least a day or two of testing on my node before I check anything into CVS, but hopefully we'll get fred into shape pretty quickly now that school is winding down for people. Thelema -- E-mail: [EMAIL PROTECTED] Raabu and Piisu GPG 1024D/36352AAB fpr:756D F615 B4F3 BFFC 02C7 84B7 D8D7 6ECE 3635 2AAB _______________________________________________ devl mailing list [EMAIL PROTECTED] http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl
