It looks like, especially from Hal's logs, that we are seeing a lot of
restarting of chains when it isn't necessary. My experimenting last night did
not seem to produce too much of this (I sent a message for an unexistant key
with htl 100 which TimedOut after about a minute with no such messages), but I
suppose as the number of dead connections in the datastores increase, so does
the time taken for each hop.

The first thought might just be to decide that 3 seconds was too optimistic,
and start using 5 for the default. Another thought is that the problem is
greater for the low HTL towards the end, where the problems of one node is not
balanced out by the fact that for a node that has no problems it should not
take all of 3 seconds - and that one might add a constant term to equation
(3*HTL + 10 or something).

An approach that is probably more rewarding, is to be statistical about it.
Statistics says that with probability 90%,

time < HTL*(expected time per hop) + 1.28 * sqrt(HTL) * (standard deviation of
time per hop)

(given that it is normal distributed, which it won't be - but statistics
always assumes everything is normal distributed in my experience)

If one assumes a expected value of 2 seconds, and a deviation of 4, one gets
something like:

    3*HTL     90% confidence
    3.0000    7.1200
    6.0000   11.2408
    9.0000   14.8681
   12.0000   18.2400
   15.0000   21.4487
   18.0000   24.5414
   21.0000   27.5462
   24.0000   30.4815
   27.0000   33.3600
   30.0000   36.1909
    ...
   60.0000   62.8973
   ...
   120.0000  112.3817
   ...
   300.0000  251.2000

So for a standard request with a HTL of 20 or so, the first node would wait
about as much time as it does now, while the ones towards the end wait quite a
bit longer then they do today.

What do you people think? Is 90% confidence to low? What is a good estimate at
the expected value and variation of the time per hop (without good estimates
here, the confidence means nothing)?

-- 

Oskar Sandberg

md98-osa at nada.kth.se

#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to