2006-06-10 jrandom
* Further reduction in proactive rejections
This commit is contained in:
@ -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
|
2006-06-09 jrandom
|
||||||
* Don't let the pending tunnel request queue grow beyond reason
|
* Don't let the pending tunnel request queue grow beyond reason
|
||||||
|
@ -227,8 +227,8 @@ class RouterThrottleImpl implements RouterThrottle {
|
|||||||
else
|
else
|
||||||
timePerRequest = (int)rs.getLifetimeAverageValue();
|
timePerRequest = (int)rs.getLifetimeAverageValue();
|
||||||
}
|
}
|
||||||
float pctFull = (queuedRequests * timePerRequest) / (2*1000f);
|
float pctFull = (queuedRequests * timePerRequest) / (4*1000f);
|
||||||
float pReject = pctFull * pctFull; //1 - ((1-pctFull) * (1-pctFull));
|
double pReject = Math.pow(pctFull, 16); //1 - ((1-pctFull) * (1-pctFull));
|
||||||
if ( (pctFull >= 1) || (pReject >= _context.random().nextFloat()) ) {
|
if ( (pctFull >= 1) || (pReject >= _context.random().nextFloat()) ) {
|
||||||
if (_log.shouldLog(Log.WARN))
|
if (_log.shouldLog(Log.WARN))
|
||||||
_log.warn("Rejecting a new tunnel request because we have too many pending requests (" + queuedRequests
|
_log.warn("Rejecting a new tunnel request because we have too many pending requests (" + queuedRequests
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
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 String VERSION = "0.6.1.20";
|
||||||
public final static long BUILD = 3;
|
public final static long BUILD = 4;
|
||||||
public static void main(String args[]) {
|
public static void main(String args[]) {
|
||||||
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
System.out.println("I2P Router version: " + VERSION + "-" + BUILD);
|
||||||
System.out.println("Router ID: " + RouterVersion.ID);
|
System.out.println("Router ID: " + RouterVersion.ID);
|
||||||
|
Reference in New Issue
Block a user