Changeset ec6207fc


Ignore:
Timestamp:
Mar 13, 2015 5:50:32 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7e5bd17, b5bba5e
Parents:
36d47a0b
Message:

Job Queue:

  • Drop garlic message decryption jobs on overload
  • Decrease overload threshold
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • history.txt

    r36d47a0b rec6207fc  
     12015-03-13 zzz
     2 * i2psnark:
     3   - Auto-reduce tunnel quantity based on peer count
     4   - Increase max tunnels
     5 * Job Queue:
     6   - Drop garlic message decryption jobs on overload
     7   - Decrease overload threshold
     8
    192015-03-13 dg
    210 * Router: create router.integratedPeers (floodfills) stat, and
  • router/java/src/net/i2p/router/JobQueue.java

    r36d47a0b rec6207fc  
    2626
    2727import net.i2p.data.DataHelper;
     28import net.i2p.router.message.HandleGarlicMessageJob;
    2829import net.i2p.router.networkdb.kademlia.HandleFloodfillDatabaseLookupMessageJob;
    2930import net.i2p.util.Clock;
     
    113114    /** max ready and waiting jobs before we start dropping 'em */
    114115    private int _maxWaitingJobs = DEFAULT_MAX_WAITING_JOBS;
    115     private final static int DEFAULT_MAX_WAITING_JOBS = 100;
     116    private final static int DEFAULT_MAX_WAITING_JOBS = 50;
     117    private final static long MIN_LAG_TO_DROP = 1000;
     118
    116119    /** @deprecated unimplemented */
    117120    private final static String PROP_MAX_WAITING_JOBS = "router.maxWaitingJobs";
     
    287290            // This is pretty lame, there's actually a ton of different jobs we
    288291            // could drop, but is it worth making a list?
    289             if (cls == HandleFloodfillDatabaseLookupMessageJob.class) {
     292            //
     293            // Garlic added in 0.9.19, floodfills were getting overloaded
     294            // with encrypted lookups
     295            if (cls == HandleFloodfillDatabaseLookupMessageJob.class ||
     296                cls == HandleGarlicMessageJob.class) {
    290297                 JobTiming jt = job.getTiming();
    291298                 if (jt != null) {
    292299                     long lag =  _context.clock().now() - jt.getStartAfter();
    293                      if (lag > 2*1000L)
     300                     if (lag >= MIN_LAG_TO_DROP)
    294301                         return true;
    295302                }
  • router/java/src/net/i2p/router/RouterVersion.java

    r36d47a0b rec6207fc  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 1;
     21    public final static long BUILD = 2;
    2222
    2323    /** for example "-test" */
  • router/java/src/net/i2p/router/message/HandleGarlicMessageJob.java

    r36d47a0b rec6207fc  
    3131 * as InNetMessagePool short circuits tunnel messages,
    3232 * and those garlic messages are handled in InboundMessageDistributor.
     33 *
     34 * Public for JobQueue as these jobs may be dropped.
    3335 */
    34 class HandleGarlicMessageJob extends JobImpl implements GarlicMessageReceiver.CloveReceiver {
     36public class HandleGarlicMessageJob extends JobImpl implements GarlicMessageReceiver.CloveReceiver {
    3537    private final Log _log;
    3638    private final GarlicMessage _message;
Note: See TracChangeset for help on using the changeset viewer.