And finally, you were right of course. The problem wasn't the rate
limiting code, but a configuration problem on my node. The node connects
by default to all interfaces (0.0.0.0), which apparently caused problems
- the log was filled with messages of receiving packets twice. This
caused heavy load occasionally to the node. Limiting to only one
interface fixed the problem.

The node is currently running using minpingtime as well, just to test
its effects. There still are nodes with very high ping times in my lists
that push the average pings times higher than they should be, but it is
not really a problem (yet).

-- 
Malkus Lindroos


Malkus Lindroos wrote:
> Matthew Toseland wrote:
>> Is this in fact the problem? Or is it something more serious such as
>> high CPU
>> caused by memory overload? Either way we need to know.
> 
> The following changes to NodePinger.java seemed to fix the load limiting
> for my node:
> 
>         double calculateMedianPing(PeerNode[] peers) {
> 
>                 double[] allPeers = new double[peers.length];
> 
>                 /** Not backed off peers' ping times */
>                 double[] nbPeers = new double[peers.length];
> 
>                 /** Number of not backed off peers */
>                 int nbCount = 0;
>                 double minPingTime = CRAZY_MAX_PING_TIME;
>                 for(int i=0;i<peers.length;i++) {
>                         PeerNode peer = peers[i];
>                         double pingTime = peer.averagePingTime();
> /** Find the minimum ping time */
>                 if(pingTime<minPingTime) {
>                                 minPingTime=pingTime;
>                         }
>                 }
> /** Fill tables with the minimum ping time*/
>                 for(int j=0;j<peers.length;j++) {
>                         PeerNode peer = peers[j];
>                         if(!peer.isRoutingBackedOff()) {
>                                 nbPeers[nbCount++] = minPingTime;
>                         }
>                         allPeers[j] = minPingTime;
>                 }
> 
> So based on this, I'd say that the problem is the load limiting
> mechanism. The averagepingtime load limiting effectively uses a a whole
> network segment as a load limiting mechanism while minpingtime uses a
> single node.
> 
> I also tend to disagree with NextGen with misrouting - Freenet uses
> cache to have popular content available at several locations. To take
> advantage of this, the load limiting should allow those nodes that do
> have the capacity to share their cached keys effectively despite of many
> of their peers being heavily loaded (as long as there are peers that
> aren't). Peer that cannot be used for routing should be backed off.
> 
> 



Reply via email to