2006-05-16 jrandom
* Further shitlist randomizations * Adjust the stats monitored for detecting cpu overload when dropping new tunnel requests
This commit is contained in:
@ -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
|
2006-05-15 jrandom
|
||||||
* Add a load dependent throttle on the pending inbound tunnel request
|
* Add a load dependent throttle on the pending inbound tunnel request
|
||||||
|
@ -283,10 +283,14 @@ class RouterThrottleImpl implements RouterThrottle {
|
|||||||
double probReject = Math.pow(pctFull, 16); // steep curve
|
double probReject = Math.pow(pctFull, 16); // steep curve
|
||||||
double rand = _context.random().nextFloat();
|
double rand = _context.random().nextFloat();
|
||||||
boolean reject = (availBps < MIN_AVAILABLE_BPS) || (rand <= probReject);
|
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 + "/"
|
_log.warn("reject = " + reject + " avail/maxK/used " + availBps + "/" + maxKBps + "/"
|
||||||
+ used + " pReject = " + probReject + " pFull = " + pctFull + " numTunnels = " + numTunnels
|
+ used + " pReject = " + probReject + " pFull = " + pctFull + " numTunnels = " + numTunnels
|
||||||
+ "rand = " + rand + " est = " + bytesAllocated + " share = " + (float)share);
|
+ "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) {
|
if (reject) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
@ -15,9 +15,9 @@ import net.i2p.CoreVersion;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class RouterVersion {
|
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 String VERSION = "0.6.1.18";
|
||||||
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);
|
||||||
|
@ -65,8 +65,10 @@ public class Shitlist {
|
|||||||
|
|
||||||
long period = SHITLIST_DURATION_MS + _context.random().nextLong(SHITLIST_DURATION_MS);
|
long period = SHITLIST_DURATION_MS + _context.random().nextLong(SHITLIST_DURATION_MS);
|
||||||
PeerProfile prof = _context.profileOrganizer().getProfile(peer);
|
PeerProfile prof = _context.profileOrganizer().getProfile(peer);
|
||||||
if (prof != null)
|
if (prof != null) {
|
||||||
period = SHITLIST_DURATION_MS << prof.incrementShitlists();
|
period = SHITLIST_DURATION_MS << prof.incrementShitlists();
|
||||||
|
period += _context.random().nextLong(period);
|
||||||
|
}
|
||||||
|
|
||||||
if (period > 60*60*1000)
|
if (period > 60*60*1000)
|
||||||
period = 60*60*1000;
|
period = 60*60*1000;
|
||||||
|
@ -642,7 +642,7 @@ class BuildHandler {
|
|||||||
|
|
||||||
private int estimateQueueTime(int numPendingMessages) {
|
private int estimateQueueTime(int numPendingMessages) {
|
||||||
int decryptTime = 200;
|
int decryptTime = 200;
|
||||||
RateStat rs = _context.statManager().getRate("crypto.elGamal.decrypt");
|
RateStat rs = _context.statManager().getRate("tunnel.decryptRequestTime");
|
||||||
if (rs != null) {
|
if (rs != null) {
|
||||||
Rate r = rs.getRate(60*1000);
|
Rate r = rs.getRate(60*1000);
|
||||||
double avg = 0;
|
double avg = 0;
|
||||||
|
Reference in New Issue
Block a user