I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit e63a6917 authored by zzz's avatar zzz
Browse files

Transport: set 4 MBps max bw due to bloom filter

parent 711f8ded
No related branches found
No related tags found
No related merge requests found
......@@ -70,6 +70,8 @@ public class FIFOBandwidthRefiller implements Runnable {
public static final int MIN_INBOUND_BANDWIDTH_PEAK = 3;
/** For now, until there is some tuning and safe throttling, we set the floor at a 3KBps during burst */
public static final int MIN_OUTBOUND_BANDWIDTH_PEAK = 3;
/** Max for reasonable bloom filter false positive rate. See util/DecayingBloomFilter and tunnel/BloomFilterIVValidator */
public static final int MAX_OUTBOUND_BANDWIDTH = 4096;
/**
* how often we replenish the queues.
......@@ -199,7 +201,9 @@ public class FIFOBandwidthRefiller implements Runnable {
int out = _context.getProperty(PROP_OUTBOUND_BANDWIDTH, DEFAULT_OUTBOUND_BANDWIDTH);
if (out != _outboundKBytesPerSecond) {
// bandwidth was specified *and* changed
if ( (out <= 0) || (out >= MIN_OUTBOUND_BANDWIDTH) )
if (out >= MAX_OUTBOUND_BANDWIDTH)
_outboundKBytesPerSecond = MAX_OUTBOUND_BANDWIDTH;
else if ( (out <= 0) || (out >= MIN_OUTBOUND_BANDWIDTH) )
_outboundKBytesPerSecond = out;
else
_outboundKBytesPerSecond = MIN_OUTBOUND_BANDWIDTH;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment