[Deluge] #2257: Allow setting of active_dht_limit, active_tracker_limit and active_lsd_limit. Fix bugs.

66 views
Skip to first unread message

Deluge

unread,
Jan 15, 2013, 10:13:39 AM1/15/13
to delug...@googlegroups.com
#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

Deluge

unread,
Jan 16, 2013, 4:43:00 PM1/16/13
to delug...@googlegroups.com
#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: |
----------------------+-----------------------------------------------------

Comment(by Chionsas):

It seems that {{{active_dht_limit}}}, {{{active_tracker_limit}}} and
{{{active_lsd_limit}}} are new features of libtorrent 0.16. Prior to this
version (0.15 and below), only active_limit existed. Thereore, it's not a
bug of deluge per se, as deluge oficially only supports libtorrent 0.14
and 0.15.

Furthermore, it's now clear that libtorrent 0.16.0 to 0.16.3 has an
{{{active_tracker_limit}}} of 360 and in versions 0.16.4 to 0.16.6 it's
increased to 1600.

The patch attached (default values of -1) effectively removes these new
limits, making libtorrent function as it was with before with only
active_limit. It is not clear if this has any performance implications.
Running it on my own box with 1000+ torrents, no performance issues were
observed.

It was talked about in IRC that new code that ''gazpachoking'' is working
on should expose these new variables to the GUI. So we could use sane
values for defaults instead of -1, as the user will be able to change them
easily, along with {{{active_limit}}}.

I'm now attaching a patch for the '''master branch'''. The only difference
between patches is that the Python code in master does not require to
explicitly call {{{register_set_function()}}} parameter setters. It's all
done automatically in {{{do_config_set_func}}}, which is a good thing :)

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2257#comment:1>

Deluge

unread,
Jan 24, 2013, 10:36:41 AM1/24/13
to delug...@googlegroups.com
#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.4.0
Component: core | Version: git 1.3-stable
Keywords: |
----------------------+-----------------------------------------------------
Changes (by Cas):

* milestone: 1.3.6 => 1.4.0


--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2257#comment:2>

Deluge

unread,
Feb 11, 2014, 2:43:46 PM2/11/14
to delug...@googlegroups.com
#2257: [lt.sess_set.active_*] 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.4.0
Component: Core | Version: 1.3-stable (git)
Resolution: | Keywords:
-----------------------+------------------------------

Comment (by Cas):

You can use the [http://forum.deluge-torrent.org/viewtopic.php?f=9&t=42887
lt config plugin] to change this setting in meantime.

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2257#comment:3>

Deluge

unread,
Apr 23, 2014, 4:40:10 AM4/23/14
to delug...@googlegroups.com
#2257: [lt.sess_set.active_*] 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.4.0
Component: Core | Version: 1.3-stable (git)
Resolution: | Keywords:
-----------------------+------------------------------

Comment (by keretamalam):

I am about to leave and cannot look into this further right now, but I do
want to mention that relying on pkg-config itself is not a problem (as you
said, we also use it later), the problem is that on some systems, the .pc
file for pkg-config is supplying wrong information (whereas on yours, it's
botan-config that is wrong), so that's why I'm trying to make it work with
both (while one of them is bad).
[http://maskodoq.blogspot.com/2014/03/unit-link-terbaik-di-indonesia.html
Unit Link Terbaik di Indonesia Commonwealth Life Investra Link]
[http://maskodoq.blogspot.com/2013/07/CiptoJunaedy.html Cipto Junaedy]
[http://etnisjawa.blogspot.com/2013/08/apakah-cipto-junaedy-bohong.html
Cipto Junaedy]

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2257#comment:4>

Deluge

unread,
Dec 22, 2018, 7:28:50 AM12/22/18
to delug...@googlegroups.com
#2257: [lt.sess_set.active_*] 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: 2.x

Component: Core | Version: 1.3-stable (git)
Resolution: | Keywords:
-----------------------+------------------------------
Changes (by DoYouWantKarate):

* cc: mvseqt2twu@… (added)


--
Ticket URL: <https://dev.deluge-torrent.org/ticket/2257#comment:5>
Deluge <http://deluge-torrent.org/>
Deluge Project

Reply all
Reply to author
Forward
0 new messages