diff --git a/history.txt b/history.txt index 5e72be9848..28e11fa160 100644 --- a/history.txt +++ b/history.txt @@ -1,4 +1,9 @@ -$Id: history.txt,v 1.474 2006/05/13 23:52:44 complication Exp $ +$Id: history.txt,v 1.475 2006/05/15 12:33:02 jrandom Exp $ + +2006-05-16 jrandom + * Further shitlist randomizations + * Adjust the stats monitored for detecting cpu overload when dropping new + tunnel requests 2006-05-15 jrandom * Add a load dependent throttle on the pending inbound tunnel request diff --git a/router/java/src/net/i2p/router/RouterThrottleImpl.java b/router/java/src/net/i2p/router/RouterThrottleImpl.java index 4e10e351f0..f0434e7db1 100644 --- a/router/java/src/net/i2p/router/RouterThrottleImpl.java +++ b/router/java/src/net/i2p/router/RouterThrottleImpl.java @@ -283,10 +283,14 @@ class RouterThrottleImpl implements RouterThrottle { double probReject = Math.pow(pctFull, 16); // steep curve double rand = _context.random().nextFloat(); boolean reject = (availBps < MIN_AVAILABLE_BPS) || (rand <= probReject); - if (_log.shouldLog(Log.WARN)) + if (reject && _log.shouldLog(Log.WARN)) _log.warn("reject = " + reject + " avail/maxK/used " + availBps + "/" + maxKBps + "/" + used + " pReject = " + probReject + " pFull = " + pctFull + " numTunnels = " + numTunnels + "rand = " + rand + " est = " + bytesAllocated + " share = " + (float)share); + else if (_log.shouldLog(Log.DEBUG)) + _log.debug("reject = " + reject + " avail/maxK/used " + availBps + "/" + maxKBps + "/" + + used + " pReject = " + probReject + " pFull = " + pctFull + " numTunnels = " + numTunnels + + "rand = " + rand + " est = " + bytesAllocated + " share = " + (float)share); if (reject) { return false; } else { diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 6c1692c67f..40d45bc39f 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -15,9 +15,9 @@ import net.i2p.CoreVersion; * */ public class RouterVersion { - public final static String ID = "$Revision: 1.414 $ $Date: 2006/05/14 00:11:36 $"; + public final static String ID = "$Revision: 1.415 $ $Date: 2006/05/15 12:33:05 $"; public final static String VERSION = "0.6.1.18"; - public final static long BUILD = 3; + public final static long BUILD = 4; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); diff --git a/router/java/src/net/i2p/router/Shitlist.java b/router/java/src/net/i2p/router/Shitlist.java index b230ab8a55..e46b545a89 100644 --- a/router/java/src/net/i2p/router/Shitlist.java +++ b/router/java/src/net/i2p/router/Shitlist.java @@ -65,8 +65,10 @@ public class Shitlist { long period = SHITLIST_DURATION_MS + _context.random().nextLong(SHITLIST_DURATION_MS); PeerProfile prof = _context.profileOrganizer().getProfile(peer); - if (prof != null) + if (prof != null) { period = SHITLIST_DURATION_MS << prof.incrementShitlists(); + period += _context.random().nextLong(period); + } if (period > 60*60*1000) period = 60*60*1000; diff --git a/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java b/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java index 26f5c5245d..25d849de77 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java +++ b/router/java/src/net/i2p/router/tunnel/pool/BuildHandler.java @@ -642,7 +642,7 @@ class BuildHandler { private int estimateQueueTime(int numPendingMessages) { int decryptTime = 200; - RateStat rs = _context.statManager().getRate("crypto.elGamal.decrypt"); + RateStat rs = _context.statManager().getRate("tunnel.decryptRequestTime"); if (rs != null) { Rate r = rs.getRate(60*1000); double avg = 0;