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

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

i2psnark: Reduce PeerCoordinator CHECK_PERIOD interval

to make the choke/unchoke cycles a little faster
parent 6cef4ccb
No related branches found
No related tags found
No related merge requests found
Pipeline #2168 passed
......@@ -22,7 +22,7 @@ import net.i2p.util.SyntheticREDQueue;
* and current moving averages of up, down, and requested bandwidth.
*
* At the lower layers, simple weighted moving averages of
* three buckets of 40 seconds each (2 minutes total) are used
* three buckets of time PeerCoordinator.CHECK_PERIOD each are used
* for up and down, and requested is delegated here.
*
* The lower layers must report to the next-higher layer.
......
......@@ -78,7 +78,7 @@ public class Peer implements Comparable<Peer>, BandwidthListener
private final long _id;
private final AtomicBoolean _disconnected = new AtomicBoolean();
final static long CHECK_PERIOD = PeerCoordinator.CHECK_PERIOD; // 40 seconds
final static long CHECK_PERIOD = PeerCoordinator.CHECK_PERIOD;
final static int RATE_DEPTH = PeerCoordinator.RATE_DEPTH; // make following arrays RATE_DEPTH long
private final long uploaded_old[] = {-1,-1,-1};
private final long downloaded_old[] = {-1,-1,-1};
......
......@@ -73,7 +73,7 @@ class PeerCoordinator implements PeerListener, BandwidthListener
private final Snark snark;
// package local for access by CheckDownLoadersTask
final static long CHECK_PERIOD = 40*1000; // 40 seconds
final static long CHECK_PERIOD = 30*1000;
final static int MAX_UPLOADERS = 8;
public static final long MAX_INACTIVE = 8*60*1000;
public static final long MAX_SEED_INACTIVE = 2*60*1000;
......
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