#2257: Allow setting of active_dht_limit, active_tracker_limit and
active_lsd_limit. Fix bugs.
----------------------+-----------------------------------------------------
 Reporter:  Chionsas  |       Owner:                
     Type:  patch     |      Status:  new           
 Priority:  major     |   Milestone:  1.3.6         
Component:  core      |     Version:  git 1.3-stable
 Keywords:            |  
----------------------+-----------------------------------------------------
 '''Problem:''' Deluge does not send announcements to trackers or dht/lsd
 when default torrent count limits for those nodes in libtorrent are
 reached.

 From [http://www.rasterbar.com/products/libtorrent/manual.html
 libtorrent's API]:

 {{{
 active_limit is a hard limit on the number of active torrents. This
 applies even to slow torrents.

 active_dht_limit is the max number of torrents to announce to the DHT. By
 default this is set to 88,
 which is no more than one DHT announce every 10 seconds.

 active_tracker_limit is the max number of torrents to announce to their
 trackers. By default this is
 360, which is no more than one announce every 5 seconds.

 active_lsd_limit is the max number of torrents to announce to the local
 network over the local
 service discovery protocol. By default this is 80, which is no more than
 one announce every 5
 seconds (assuming the default announce interval of 5 minutes).
 }}}
 {{{
 You can have more torrents active, even though they are not announced to
 the DHT, lsd or their
 tracker. If some peer knows about you for any reason and tries to connect,
 it will still be
 accepted, unless the torrent is paused, which means it won't accept any
 connections.
 }}}

 '''Bug:''' Deluge only allows {{{active_limit}}} to be set. Deluge does
 not provide any means to control those other limits
 ({{{active_dht_limit}}}, {{{active_tracker_limit}}},
 {{{active_lsd_limit}}}). When there are more than, say 1600 torrents using
 trackers, some of them get put in the limbo state described in the last
 paragraph of the quote.

 (Latest libtorrent defaults:
 [http://code.google.com/p/libtorrent/source/browse/src/session.cpp#1178].
 Before 0.16.4 it was less than 1600, according to the changelog.
 It was 360 sometime ago, as per the
 [http://www.rasterbar.com/products/libtorrent/manual.html API].)

 I believe some of the complaints in [http://dev.deluge-
 torrent.org/ticket/1127] are about this and [http://forum.deluge-
 torrent.org/viewtopic.php?f=7&t=42329] forum post is definitely related.

 '''Solution:''' Allow setting of {{{active_dht_limit}}},
 {{{active_tracker_limit}}} and {{{active_lsd_limit}}}, thus overriding
 libtorrent defaults.

 '''Patch:''' The patch attached defaults {{{active_dht_limit}}},
 {{{active_tracker_limit}}} and {{{active_lsd_limit}}} to {{{-1}}}
 (actually, {{{2147483647}}}, as libtorrent does not accept {{{-1}}}.
 {{{2147483647}}} is a max of a 32-bit unsigned {{{int}}} and
 [http://code.google.com/p/libtorrent/source/browse/src/session_impl.cpp#4203
 in accordance with how libtorrent does it]).
 The patch does not allow controling these limits via the GUI. I assume
 controling {{{active_limit}}} is enough for all uses and if not, the
 variables can be altered in the .conf file. Some GUI fields to control
 these variables may be added later.

 '''Testing''': works for me (fixes the problem/bug described above).
 Unsure of any performance drawbacks with frequent lsd/dht announces.
 {{{active_limit}}} controls all the limits now, so the user can always set
 it to lower. Hidden limits that cannot be changed (as with current version
 (1.3.5)) are bad either way.

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2257>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-dev?hl=en.

Reply via email to