Changeset 3280


Ignore:
Timestamp:
Oct 3, 2007, 7:00:51 PM (15 years ago)
Author:
charles
Message:

speed improvements... this is getting me 700 KiB/s (which is near to my speed cap) in the ubuntu torrent test

Location:
trunk/libtransmission
Files:
2 edited

Legend:

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

    r3279 r3280  
    4646
    4747    /* how frequently to refill peers' request lists */
    48     REFILL_PERIOD_MSEC = 2000,
    49 
    50     /* how many peers to unchoke per-torrent. */
    51     /* FIXME: make this user-configurable? */
    52     NUM_UNCHOKED_PEERS_PER_TORRENT = 8,
     48    REFILL_PERIOD_MSEC = 1500,
    5349
    5450    /* don't change a peer's choke status more often than this */
     
    6258     * with a better idea for managing the connection limits */
    6359    MAX_CONNECTED_PEERS_PER_TORRENT = 60,
     60
     61    /* how many peers to unchoke per-torrent. */
     62    /* FIXME: make this user-configurable? */
     63    NUM_UNCHOKED_PEERS_PER_TORRENT = 16, /* arbitrary */
    6464
    6565    /* another arbitrary number */
     
    15591559        /* add some new ones */
    15601560        nAdd = MAX_CONNECTED_PEERS_PER_TORRENT - peerCount;
    1561         for( i=0; i<nAdd && i<nCandidates && i<MAX_RECONNECTIONS_PER_PULSE; ++i )
     1561        for( i=0; i<nAdd && i<nCandidates; ++i )
    15621562        {
    15631563            tr_peerMgr * mgr = t->manager;
  • trunk/libtransmission/peer-msgs.c

    r3279 r3280  
    496496        return TR_ADDREQ_MISSING;
    497497
    498     maxSize = MIN( 3 + (int)(tr_rcRate(msgs->info->rateToClient)/10), 100 );
     498    maxSize = MIN( 3 + (int)(tr_rcRate(msgs->info->rateToClient)/5), 100 );
    499499    if( tr_list_size( msgs->clientAskedFor) >= maxSize )
    500500        return TR_ADDREQ_FULL;
Note: See TracChangeset for help on using the changeset viewer.