From: Charles Kerr Date: Thu, 1 May 2008 19:31:58 +0000 (+0000) Subject: experimental speed tweaks: X-Git-Tag: 1.20~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c20b9a6df415e929bb1b3f52473a0b6d641e438b;p=transmission experimental speed tweaks: (1) increase the per-peer read buffer to the size of a block message (2) pulse the peers more often (3) reduce the tracker delay on startup --- diff --git a/libtransmission/peer-io.c b/libtransmission/peer-io.c index 716ce3d56..055ea55ab 100644 --- a/libtransmission/peer-io.c +++ b/libtransmission/peer-io.c @@ -34,8 +34,8 @@ #define IO_TIMEOUT_SECS 8 -/* arbitrary */ -#define TR_RDBUF (1024*8) +/* the size of a typical request message */ +#define TR_RDBUF ((1024*16) + 13) /** *** diff --git a/libtransmission/peer-msgs.c b/libtransmission/peer-msgs.c index ee7d66ed4..092c2471d 100644 --- a/libtransmission/peer-msgs.c +++ b/libtransmission/peer-msgs.c @@ -67,7 +67,7 @@ enum KEEPALIVE_INTERVAL_SECS = 90, PEX_INTERVAL = (90 * 1000), /* msec between sendPex() calls */ - PEER_PULSE_INTERVAL = (100), /* msec between pulse() calls */ + PEER_PULSE_INTERVAL = (50), /* msec between pulse() calls */ RATE_PULSE_INTERVAL = (250), /* msec between ratePulse() calls */ MAX_QUEUE_SIZE = (100), @@ -1287,7 +1287,6 @@ readBtMessage( tr_peermsgs * msgs, struct evbuffer * inbuf, size_t inlen ) updatePeerProgress( msgs ); maybeSendFastAllowedSet( msgs ); peerIsSeed = msgs->info->progress >= 1.0; - tr_peerMsgsSetChoke( msgs, clientIsSeed && peerIsSeed ); fireNeedReq( msgs ); break; } diff --git a/libtransmission/tracker.c b/libtransmission/tracker.c index aa925f295..9d99784f0 100644 --- a/libtransmission/tracker.c +++ b/libtransmission/tracker.c @@ -878,7 +878,7 @@ tr_trackerNew( const tr_torrent * torrent ) t->lastScrapeResponse = -1; t->manualAnnounceAllowedAt = ~(time_t)0; t->name = tr_strdup( info->name ); - t->randOffset = tr_rand( 120 ); + t->randOffset = tr_rand( 30 ); memcpy( t->hash, info->hash, SHA_DIGEST_LENGTH ); escape( t->escaped, info->hash, SHA_DIGEST_LENGTH ); generateKeyParam( t->key_param, KEYLEN );