Changeset ea9c4a19 for router


Ignore:
Timestamp:
Dec 11, 2015 3:40:11 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
00d6a49
Parents:
7680ecb
Message:

Router, naming, I2CP: Increase lookup cache max sizes (except on Android),
reduce max lookup depth, and increase non-floodfill profile bonus
to attempt to reduce load on floodfills

Location:
router/java/src/net/i2p/router
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/networkdb/kademlia/IterativeSearchJob.java

    r7680ecb rea9c4a19  
    7575    private static final int MAX_NON_FF = 3;
    7676    /** Max number of peers to query */
    77     private static final int TOTAL_SEARCH_LIMIT = 6;
     77    private static final int TOTAL_SEARCH_LIMIT = 5;
    7878    /** Max number of peers to query if we are ff */
    7979    private static final int TOTAL_SEARCH_LIMIT_WHEN_FF = 3;
     
    540540        }
    541541        // blame the unheard-from (others already blamed in failed() above)
    542         for (Hash h : unheard)
     542        for (Hash h : unheard) {
    543543            getContext().profileManager().dbLookupFailed(h);
     544        }
    544545        long time = System.currentTimeMillis() - _created;
    545546        if (_log.shouldLog(Log.INFO)) {
     
    548549                      ", peers queried: " + tries);
    549550        }
    550         getContext().statManager().addRateData("netDb.failedTime", time);
    551         getContext().statManager().addRateData("netDb.failedRetries", Math.max(0, tries - 1));
     551        if (tries > 0) {
     552            // don't bias the stats with immediate fails
     553            getContext().statManager().addRateData("netDb.failedTime", time);
     554            getContext().statManager().addRateData("netDb.failedRetries", tries - 1);
     555        }
    552556        for (Job j : _onFailed) {
    553557            getContext().jobQueue().addJob(j);
  • router/java/src/net/i2p/router/peermanager/CapacityCalculator.java

    r7680ecb rea9c4a19  
    3030    // we make this a bonus for non-ff, not a penalty for ff, so we
    3131    // don't drive the ffs below the default
    32     private static final double BONUS_NON_FLOODFILL = 0.5;
     32    private static final double BONUS_NON_FLOODFILL = 1.0;
    3333   
    3434    public static double calc(PeerProfile profile) {
Note: See TracChangeset for help on using the changeset viewer.