Changeset 7597


Ignore:
Timestamp:
Jan 3, 2009, 7:23:26 AM (12 years ago)
Author:
charles
Message:

(trunk libT) experimental code to get more peers faster

Location:
trunk/libtransmission
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/peer-mgr.c

    r7591 r7597  
    6262
    6363    /* max # of peers to ask fer per torrent per reconnect pulse */
    64     MAX_RECONNECTIONS_PER_PULSE = 4,
     64    MAX_RECONNECTIONS_PER_PULSE = 16,
    6565
    6666    /* max number of peers to ask for per second overall.
    6767    * this throttle is to avoid overloading the router */
    68     MAX_CONNECTIONS_PER_SECOND = 8,
     68    MAX_CONNECTIONS_PER_SECOND = 32,
    6969
    7070    /* number of unchoked peers per torrent.
     
    11761176getPeerCount( const Torrent * t )
    11771177{
    1178     return tr_ptrArraySize( &t->peers ) + tr_ptrArraySize( &t->outgoingHandshakes );
     1178    return tr_ptrArraySize( &t->peers );// + tr_ptrArraySize( &t->outgoingHandshakes );
    11791179}
    11801180
     
    22752275        struct tr_peer ** connections = getPeersToClose( t, &nBad );
    22762276
    2277         if( nBad || nCandidates )
     2277        //if( nBad || nCandidates )
    22782278            tordbg( t, "reconnect pulse for [%s]: %d bad connections, "
    22792279                    "%d connection candidates, %d atoms, max per pulse is %d",
     
    22972297        }
    22982298
     2299tordbg( t, "nCandidates is %d, MAX_RECONNECTIONS_PER_PULSE is %d, getPeerCount(t) is %d, getMaxPeerCount(t) is %d, newConnectionsThisSecond is %d, MAX_CONNECTIONS_PER_SECOND is %d",
     2300        (int)nCandidates, (int)MAX_RECONNECTIONS_PER_PULSE, (int)getPeerCount( t ), (int)getMaxPeerCount( t->tor ), (int)newConnectionsThisSecond, (int)MAX_CONNECTIONS_PER_SECOND );
     2301
    22992302        /* add some new ones */
    23002303        for( i = 0;    ( i < nCandidates )
  • trunk/libtransmission/tracker.c

    r7578 r7597  
    6060
    6161    /* the value of the 'numwant' argument passed in tracker requests. */
    62     NUMWANT = 80,
     62    NUMWANT = 200,
    6363
    6464    /* the length of the 'key' argument passed in tracker requests */
Note: See TracChangeset for help on using the changeset viewer.