I was thinking about the mean ping times that are used for handling node 
load as I understood it, and had the idea to use a median instead.

Using an average means one single node can artificially push the avg 
ping very high, unless you have more than 13 other active peers (the 
influence from a 30s ping (is this the max, btw?) with 13 peers is 
2000ms, so even with ping=0 for the other 13 peers, the mean ping will 
be 2000ms. This could be a very easy way to DoS the network, no? Just 
create a very popular node (read: SkarX) and then answer pings/packets 
very slowly.

A median suppresses outliers, and outliers in a latency calculation will 
mostly be, I suspect, those with high latency due to DoS:ing or just 
having very bad connections (or absurd overutilization). Another form of 
latency outliers is having local nodes, which could have very low 
latency not affected by internet connection load.

Anyway, attached is a patch to print the median aswell. I had guessed 
that a few nodes would have "insanely" high ping and be one reason for 
overloads, and that seems to be the case atleast on my darknet node, 
which has more active connections. The difference isnt major or anythng 
though: mean is 353ms, and median is 311ms, caused mainly by one node 
with a latency of about 3000ms. I will try to graph these two aswell for 
some extended period of time for my node.

---
John B?ckstrand
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: median.patch
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20060411/f6d3f0a8/attachment.ksh>

Reply via email to