Changeset 3cc0122


Ignore:
Timestamp:
Mar 29, 2017 12:32:36 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b810b79
Parents:
48fb12e
Message:

Throttle: Reduce threshold for probabalistic throttling on slow platforms (ticket #1964)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/RouterThrottleImpl.java

    r48fb12e r3cc0122  
    99import net.i2p.util.Log;
    1010import net.i2p.util.SimpleTimer;
     11import net.i2p.util.SystemVersion;
    1112
    1213/**
     
    3435    private static final long DEFAULT_REJECT_STARTUP_TIME = 10*60*1000;
    3536    private static final String PROP_REJECT_STARTUP_TIME = "router.rejectStartupTime";
     37    private static final int DEFAULT_MIN_THROTTLE_TUNNELS = SystemVersion.isAndroid() ? 100 :
     38                                                            SystemVersion.isARM() ? 500 : 1000;
    3639
    3740    /**
     
    201204         * Throttle if we go above a minimum level of tunnels AND the maximum participating
    202205         * tunnels is default or lower.
     206         *
     207         * Lag based statistics use a moving average window (of for example 10 minutes), they are therefore
     208         * sensitive to sudden rapid growth of load, which are not instantly detected by these metrics.
     209         * Reduce tunnel growth if we are growing faster than the lag based metrics can detect reliably.
    203210         */
    204211        if ((numTunnels > getMinThrottleTunnels()) && (DEFAULT_MAX_TUNNELS >= maxTunnels)) {
     
    462469    /** dont ever probabalistically throttle tunnels if we have less than this many */
    463470    private int getMinThrottleTunnels() {
    464         return _context.getProperty("router.minThrottleTunnels", 1000);
     471        return _context.getProperty("router.minThrottleTunnels", DEFAULT_MIN_THROTTLE_TUNNELS);
    465472    }
    466473   
Note: See TracChangeset for help on using the changeset viewer.