Changeset 91f1ece


Ignore:
Timestamp:
Dec 19, 2010 3:13:54 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
63c6613, afe5751
Parents:
7c8e5c6
Message:

adjust runner count based on max mem

File:
1 edited

Legend:

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

    r7c8e5c6 r91f1ece  
    5959   
    6060    /** how many when we go parallel */
    61     private static final int RUNNERS = 4;
     61    private static final int RUNNERS;
     62    static {
     63        long maxMemory = Runtime.getRuntime().maxMemory();
     64        if (maxMemory < 64*1024*1024)
     65            RUNNERS = 3;
     66        else if (maxMemory < 256*1024*1024)
     67            RUNNERS = 4;
     68        else
     69            RUNNERS = 5;
     70    }
    6271
    6372    /** default max # job queue runners operating */
Note: See TracChangeset for help on using the changeset viewer.