]> granicus.if.org Git - transmission/commitdiff
experimental speed tweaks:
authorCharles Kerr <charles@transmissionbt.com>
Thu, 1 May 2008 19:31:58 +0000 (19:31 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Thu, 1 May 2008 19:31:58 +0000 (19:31 +0000)
(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

libtransmission/peer-io.c
libtransmission/peer-msgs.c
libtransmission/tracker.c

index 716ce3d565a3371c3c12f88642484f1fe89d6695..055ea55abc524cfdd032858fb6d0647bdde7223c 100644 (file)
@@ -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)
 
 /**
 ***
index ee7d66ed4290047fc2f7e877d3abb6d03b7a0522..092c2471dd57b0b2fe74b912f491cbc721be18a8 100644 (file)
@@ -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;
         }
index aa925f2953b0581d33623b8daa9f1f4f46d44204..9d99784f02369a22ec0735f8317486d4b9ec7b43 100644 (file)
@@ -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 );