Changeset 38537de


Ignore:
Timestamp:
Jun 14, 2011 6:29:04 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
09fbc91
Parents:
bb8b4285
Message:
  • NetDB: Increase floodfills and better adjustment based on available memory
Location:
router/java/src/net/i2p/router/networkdb/kademlia
Files:
2 edited

Legend:

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

    rbb8b4285 r38537de  
    2727    private static final long MIN_UPTIME = 2*60*60*1000;
    2828    private static final long MIN_CHANGE_DELAY = 6*60*60*1000;
    29     private static final int MIN_FF = 90;
    30     private static final int MAX_FF = 180;
     29    private static final int MIN_FF = 110;
     30    private static final int MAX_FF = 220;
    3131    private static final String PROP_FLOODFILL_PARTICIPANT = "router.floodfillParticipant";
    3232   
  • router/java/src/net/i2p/router/networkdb/kademlia/FloodfillNetworkDatabaseFacade.java

    rbb8b4285 r38537de  
    368368        if (maxMemory == Long.MAX_VALUE)
    369369            maxMemory = 128*1024*1024l;
    370         if (maxMemory < 64*1024*1024)
    371             MAX_DB_BEFORE_SKIPPING_SEARCH = 600;
    372         else if (maxMemory < 128*1024*1024)
    373             MAX_DB_BEFORE_SKIPPING_SEARCH = 900;
    374         else
    375             MAX_DB_BEFORE_SKIPPING_SEARCH = 1250;
     370        // 250 for every 32 MB, min of 250, max of 1250
     371        MAX_DB_BEFORE_SKIPPING_SEARCH = (int) Math.max(250l, Math.min(1250l, maxMemory / ((32 * 1024 * 1024l) / 250)));
    376372    }
    377373
Note: See TracChangeset for help on using the changeset viewer.