Oskar writes:
> 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.
> [...]
> 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)

Here are some measurements from my log file which might help shed light on
the question.  The command I used was the following monstrosity (sorry,
I know awk a lot better than perl):

grep Normal: freenet.log | egrep 'InsertRequest' | sort -t: +5.0 -5.16 | awk 
'/<-/{x=$2;} /->/{print x, "  :  ", $2;}' | awk -F: '{first=$1*3600+$2*60+$3; 
second=$4*3600+$5*60+$6; print second-first;}' | sort -n | uniq -c

I am timing how long it takes me to send an InsertRequest out in response
to receiving an InsertRequest in.  Sometimes that can be very fast,
but more often we have to try several dead nodes, and handshake too,
before we can send it.

The second number in each row is the number of seconds delay; the first
number is how many times we saw that many seconds delay.  For example,
10 times we had 0 second delay (the time of the send was the same as the
time of the receive as shown by the seconds clock).  25 times there was
1 second delay.  8 times there was 2 seconds delay, and so on.

     10 0
     25 1
      8 2
     10 3
      8 4
      7 5
      9 6
      6 7
      7 8
      4 9
      4 10
      2 11
      1 12
      5 13
      5 14
      5 15
      5 16
      2 17
      3 18
      6 19
      7 20
      2 21
      2 22
      3 23
      3 24
      5 25
      6 26
      3 27
      3 28
      1 29
      1 30
      1 31
      1 33
      2 34
      3 35
      1 36
      2 37
      1 38
      3 39
      1 40
      3 41
      1 43
      3 45
      3 46
      1 48
      1 50
      1 52
      1 61
      1 68
      1 74
      1 114
      1 119
      1 129
      1 180
      1 184
      1 188
      1 190
      1 267

The arithmetic average time was 22.5 seconds measured over about 200
samples.  The median was about 12-13 seconds.  Obviously this is not a
normal curve but is heavily skewed.  Standard deviation is maybe about
6 seconds, just eyeballing it.

Based on these measurements I'd suggest increasing time per node to
about 12 seconds and then use Oskar's formula to boost it for the smaller
HTL values.

Hal

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

Reply via email to