Changeset 2eb154c


Ignore:
Timestamp:
Oct 10, 2008 5:26:44 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0428726
Parents:
4ec82be
Message:
  • Tunnel Tests: Add time for outbound delay, to avoid congestion collapse
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/tunnel/pool/TestJob.java

    r4ec82be r2eb154c  
    213213        // Network average for success is about 1.5s.
    214214        // Another possibility - make configurable via pool options
    215         return 2500 * (_outTunnel.getLength() + _replyTunnel.getLength());
     215        //
     216        // Try to prevent congestion collapse (failing all our tunnels and then clogging our outbound
     217        // with new tunnel build requests) by adding in three times the average outbound delay.
     218        int delay = 3 * (int) getContext().statManager().getRate("transport.sendProcessingTime").getRate(60*1000).getAverageValue();
     219        return delay + (2500 * (_outTunnel.getLength() + _replyTunnel.getLength()));
    216220    }
    217221
Note: See TracChangeset for help on using the changeset viewer.