2006-06-13 jrandom

* Cut down the proactive rejections due to queue size - if we are
      at the point of having decrypted the request off the queue, might
      as well let it through, rather than waste that decryption
This commit is contained in:
jrandom
2006-06-13 09:38:48 +00:00
committed by zzz
parent 0a3281c279
commit 291a5c9578
3 changed files with 13 additions and 3 deletions

View File

@ -1,4 +1,9 @@
$Id: history.txt,v 1.485 2006-06-10 15:14:57 jrandom Exp $
$Id: history.txt,v 1.486 2006-06-11 14:48:41 jrandom Exp $
2006-06-13 jrandom
* Cut down the proactive rejections due to queue size - if we are
at the point of having decrypted the request off the queue, might
as well let it through, rather than waste that decryption
2006-06-11 Kloug
* Bugfix to the I2PTunnel IRC filter to support multiple concurrent

View File

@ -229,6 +229,10 @@ class RouterThrottleImpl implements RouterThrottle {
}
float pctFull = (queuedRequests * timePerRequest) / (4*1000f);
double pReject = Math.pow(pctFull, 16); //1 - ((1-pctFull) * (1-pctFull));
// let it in because we drop overload- rejecting may be overkill,
// especially since we've done the cpu-heavy lifting to figure out
// whats up
/*
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
@ -236,6 +240,7 @@ class RouterThrottleImpl implements RouterThrottle {
_context.statManager().addRateData("router.throttleTunnelQueueOverload", queuedRequests, timePerRequest);
return TunnelHistory.TUNNEL_REJECT_TRANSIENT_OVERLOAD;
}
*/
// ok, all is well, let 'er in
_context.statManager().addRateData("tunnel.bytesAllocatedAtAccept", (long)bytesAllocated, 60*10*1000);

View File

@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
*
*/
public class RouterVersion {
public final static String ID = "$Revision: 1.425 $ $Date: 2006-06-10 15:15:01 $";
public final static String ID = "$Revision: 1.426 $ $Date: 2006-06-11 14:48:37 $";
public final static String VERSION = "0.6.1.20";
public final static long BUILD = 5;
public final static long BUILD = 6;
public static void main(String args[]) {
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
System.out.println("Router ID: " + RouterVersion.ID);