Author: toad
Date: 2007-04-13 20:39:23 +0000 (Fri, 13 Apr 2007)
New Revision: 12661
Modified:
trunk/freenet/src/freenet/node/NodeStats.java
Log:
Take fudge factor into account when estimating bandwidth liability
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2007-04-13 20:34:08 UTC
(rev 12660)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2007-04-13 20:39:23 UTC
(rev 12661)
@@ -402,6 +402,7 @@
bandwidthLiabilityOutput += getSuccessfulBytes(isSSK, isInsert,
false).currentValue();
double bandwidthAvailableOutput =
node.getOutputBandwidthLimit() * 90; // 90 seconds at
full power; we have to leave some time for the search as well
+ bandwidthAvailableOutput *=
NodeStats.FRACTION_OF_BANDWIDTH_USED_BY_REQUESTS;
if(bandwidthLiabilityOutput > bandwidthAvailableOutput) {
preemptiveRejectReasons.inc("Output bandwidth
liability");
return "Output bandwidth liability";