I've been watching my node (usually the very latest build) and I see two things I don't like and am about to fix.
(1) The local mean traffic (queries per hour) number is very volatile. I see that it is calculated from the time it took to receive the last 100 requests. The 100 is hard coded as a constant repeated in 3 separate places. I believe I've found all instances of the 100, and in my copy I changed them to a named constant (private final int ratioSamples), and I'm going to try making it 1000. This also affects calculation of the "Current proportion of requests being accepted" number and the "Current advertise probability" (I'm pretty sure that's the probability of resetting the data source to this node when returning a result). (2) The automatic load control uses the "on / off" method (like an air conditioner -- the compressor is either running or it isn't) rather than the proportional method (like a high precision temperature controller, which adjusts the supply voltage of heater controls and/or the flow rate of cooling water continuously). So I'm going to replace the queryreject decision with a probabilistic decision. I calculate a probability of accepting the request as the product of four probability terms: accept due to number of threads low accept due to number of outbound requests low accept due to routing time low accept due to key in datastore or failure table Since each term can only reduce the probability of accepting a request, I can avoid computing the later terms by drawing the random number first and stopping as soon as I know the request will be rejected. With proper tweaking of the four terms, this should damp out the oscillations in accepting requests. It may also be necessary to make these terms decay (upward toward acceptance) slowly while allowing instant motion downward. The result should be that a node will frequently reject some requests (selected randomly), but will rarely be rejecting all of them. This should help it gain specialization. -- Edward J. Huff <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Devl mailing list [EMAIL PROTECTED] http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/devl
