find it. Can you tell me the commit you removed it? Or perhaps the
last version that still have the priority function.
Post by Arvid NorbergYeah, even the previous priority implementation wouldn't quite do what you
want unfortunately.
The rate limiter is due for a rewrite, it's not very performant and a
little bit unusual. The way it works is that peers (individually) request
bytes from the bandwidth manager, and they declare membership of certain
"channels" (global rate limit, per torrent rate limit for instance, but
with peer classes it's more generic). Each channel periodically (every 100
ms or so) has quota replenished at a certain rate. This quota is
distributed evenly among the outstanding requests against it at the time
(and a peer gets the minimum quota of all its channels).
The way priority works is that it multiplies the size of the request, thus
gets a larger share of the quota being handed out. The problem still
remains that since it's still distributed per peer, being greatly
outnumbered may still limit the amount of quota you get.
The unchoking is done similarly, by peer. Unchoke slots are not distributed
evenly across torrents, all peers are considered and the download rate from
them is the primary factor. So the unchoker optimizes *total* download
rate, not download rate for any particular torrent or even attempts to make
it even.
(patches are welcome!) :)
Post by Ardhi Putra PratamaI see. I know I can limit the bandwidth to a specific peer using
peer_class. The issue is, I want to split my own bandwidth usage to a
particular torrent. set_priority describe this function well as it
should give higher chance to unchoke one with higher priority (from
what I read). Assuming user don't specify his bandwidth (mark it as
'unlimited'), I'm looking for workaround to keep this feature without
using set_priority.
--
Ardhi Putra Pratama
@ardhipoetra
Delft University of Technology
Post by Arvid Norbergyou can use the peer_class feature. each torrent has a class that it
assigns to its peers. looking at this, it doesn't look like you have
direct
Post by Arvid Norbergaccess to the peer class for a torrent, you may be able to enumerate them
for the session or get at it some other way, and update the priority. it
also appears as if it's only created for a torrent by setting a rate
limit.
Post by Arvid NorbergIf you just want to set specific bandwidth limits, you can use the member
functions on torrent_handle to do so (which will create the peer class
under the hood if it doesn't already have one).
Perhaps it would make sense to add a member function to torrents to ask
or
Post by Arvid Norbergits peer_class, which could create one if it doesn't have one already.
On Sun, Sep 18, 2016 at 9:12 AM, Ardhi Putra Pratama <
Post by Ardhi Putra PratamaIs there any way to define the priority based on bandwidth then?
Or, how do we scale the bandwidth quota?
--
Ardhi Putra Pratama
@ardhipoetra
Delft University of Technology
On Fri, Aug 26, 2016 at 12:59 AM, Arvid Norberg <
Post by Arvid NorbergFrom my observation and understanding of the source code - torrent
priority is not
implemented anymore. Is that intentionally or a bug (or my misunderstanding)?
I thought torrent priority had deliberately been removed (but as you
point
Post by Arvid Norbergout, there's cruft left).
It's utility and implementation was questionable, it did not have a
well
Post by Arvid NorbergPost by Ardhi Putra PratamaPost by Arvid Norbergdefined behavior nor any tests. All it did (iirc) was to scale the
bandwidth quota assigned to peers based on the priority of the torrent
they
Post by Arvid Norbergbelonged to. Keeping it seemed to cause more harm than benefit, since
it
Post by Arvid NorbergPost by Ardhi Putra PratamaPost by Arvid Norbergmade the code more complex.
There is still set_priority()/priority()/m_priority but it seems
they
Post by Arvid NorbergPost by Ardhi Putra Pratamaget
Post by Arvid Norbergused nowhere.
I'll mark these as deprecated and remove the state.
--
Arvid Norberg
------------------------------------------------------------
------------------
Post by Arvid Norberg_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
------------------------------------------------------------
------------------
Post by Arvid Norberg_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
------------------------------------------------------------
------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
--
Arvid Norberg
------------------------------------------------------------------------------
_______________________________________________
Libtorrent-discuss mailing list
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss