From b754e5391a7e73c38b8751f7eb34ef5cab537037 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 18 Sep 2013 06:50:49 +0000 Subject: [PATCH] merge max allowed outstanding piece requests from peers from RC_0_16 --- ChangeLog | 1 + src/session.cpp | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c05a49957..f965c6d70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ * fix uTP edge case where udp socket buffer fills up * fix nagle implementation in uTP + * increase max allowed outstanding piece requests from peers * uTP performance improvement. only fast retransmit one packet at a time * improve error message for 'file too short' * fix piece-picker stat bug when only selecting some files for download diff --git a/src/session.cpp b/src/session.cpp index 8d5c5fd4d..fd7ecf3ca 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -98,6 +98,8 @@ namespace libtorrent set.alert_queue_size = 100; + set.max_allowed_in_request_queue = 100; + // setting this to a low limit, means more // peers are more likely to request from the // same piece. Which means fewer partial @@ -186,6 +188,9 @@ namespace libtorrent // plenty of bandwidth set.mixed_mode_algorithm = session_settings::prefer_tcp; + set.max_allowed_in_request_queue = 2000; + set.max_out_request_queue = 1000; + // we will probably see a high rate of alerts, make it less // likely to loose alerts set.alert_queue_size = 50000; @@ -1179,8 +1184,8 @@ namespace libtorrent , piece_timeout(20) , request_timeout(50) , request_queue_time(3) - , max_allowed_in_request_queue(250) - , max_out_request_queue(200) + , max_allowed_in_request_queue(500) + , max_out_request_queue(500) , whole_pieces_threshold(20) , peer_timeout(120) , urlseed_timeout(20)