2006-06-10 jrandom

* Further reduction in proactive rejections
This commit is contained in:
jrandom
2006-06-10 20:14:57 +00:00
committed by zzz
parent f3de85c4de
commit 23f30ba576
3 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,7 @@
$Id: history.txt,v 1.483 2006-06-08 20:02:40 jrandom Exp $
$Id: history.txt,v 1.484 2006-06-09 19:34:44 jrandom Exp $
2006-06-10 jrandom
* Further reduction in proactive rejections
2006-06-09 jrandom
* Don't let the pending tunnel request queue grow beyond reason

View File

@ -227,8 +227,8 @@ class RouterThrottleImpl implements RouterThrottle {
else
timePerRequest = (int)rs.getLifetimeAverageValue();
}
float pctFull = (queuedRequests * timePerRequest) / (2*1000f);
float pReject = pctFull * pctFull; //1 - ((1-pctFull) * (1-pctFull));
float pctFull = (queuedRequests * timePerRequest) / (4*1000f);
double pReject = Math.pow(pctFull, 16); //1 - ((1-pctFull) * (1-pctFull));
if ( (pctFull >= 1) || (pReject >= _context.random().nextFloat()) ) {
if (_log.shouldLog(Log.WARN))
_log.warn("Rejecting a new tunnel request because we have too many pending requests (" + queuedRequests

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.423 $ $Date: 2006-06-08 20:02:43 $";
public final static String ID = "$Revision: 1.424 $ $Date: 2006-06-09 19:34:51 $";
public final static String VERSION = "0.6.1.20";
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);