Discussion:
[libtorrent] Share mode download/upload activity stuck
Ardhi Putra Pratama
2016-04-26 14:53:43 UTC
Permalink
Howdy,

I have several torrents that added in share_mode flags. I kept other settings
like share_mode_target or active_downloads in their default value. Let's say
that the number of torrents added is around 20-30.



When the torrents recently added, it just runs. Although all of them very slow
compared to if I download those files manually, one by one without share_mode.
However, in 1 hour or so, all of my torrents just stop responding. It doesn't
do anything (download/upload), but it's still active.



My guess is, maybe it can't upload more because there are no peers that need
the file. Unfortunately, this is not the case. Based on get_peer_info(), some
peers indeed still need some of the data. So why stop uploading?



Any clue on this?



And more question, as share_mode is claimed to not well-tested. What settings
that I have to consider if I work with a large number of torrents (30-50) in
share mode? The idea is to increase my ratio.



Kind regards,

ardhi



[ ![Technische Universiteit Delft - Distributed System lab](https://s3.amazona
ws.com/htmlsig/logos/files/000/000/027/landscape/bluejay.png?1414636193)
](https://htmlsig.com/t/0000001BM6FGS)

Ardhi Putra Pratama Hartono / Msc Candidate in Computer Science
[***@ardhipoetra.web.id](mailto:***@ardhipoetra.web.id) / +31617324665

Technische Universiteit Delft - Distributed System lab
<http://www.ardhipoetra.web.id>

[ ![Twitter](Loading Image...)
](http://twitter.com/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Facebook](https://s3.amazonaws.com/htmlsig-
assets/round/facebook.png) ](https://fb.me/ardhipoetra)
![](Loading Image...) [
![LinkedIn](Loading Image...)
](https://linkedin.com/in/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Skype](https://s3.amazonaws.com/htmlsig-
assets/round/skype.png) ](https://htmlsig.com/t/0000001BSXX0E)
![](https://s3.amazonaws.com/htmlsig-assets/spacer.gif) [
![Flickr](Loading Image...)
](https://flickr.com/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Github](https://s3.amazonaws.com/htmlsig-
assets/round/github.png) ](https://github.com/ardhipoetra)
![](https://s3.amazonaws.com/htmlsig-assets/spacer.gif)
Arvid Norberg
2016-04-26 21:23:58 UTC
Permalink
Post by Ardhi Putra Pratama
Howdy,
I have several torrents that added in share_mode flags. I kept other settings
like share_mode_target or active_downloads in their default value. Let's say
that the number of torrents added is around 20-30.
When the torrents recently added, it just runs. Although all of them very slow
compared to if I download those files manually, one by one without share_mode.
However, in 1 hour or so, all of my torrents just stop responding. It doesn't
do anything (download/upload), but it's still active.
My guess is, maybe it can't upload more because there are no peers that need
the file. Unfortunately, this is not the case. Based on get_peer_info(), some
peers indeed still need some of the data. So why stop uploading?
In general it's the _downloader_ that decides whether to request data or
not. The uploader cannot upload without having a peer that requests data.
In this case, you should look at the number of incoming piece/block
requests (it should be available in the peer_info [1]). If this is zero,
the peer is not requesting anything. You may also want to make sure you
have sufficient upload slots available, and that the peers you're looking
at are in fact unchoked. It's quite possible the downloaders are
downloading from other peers and limits the number of peers they download
from in parallel.

I would expect the natural development of a torrent would be that the
supply/demand increases over time, and eventually you won't be able to get
much "return on investment" in share_mode.
Post by Ardhi Putra Pratama
And more question, as share_mode is claimed to not well-tested. What settings
that I have to consider if I work with a large number of torrents (30-50) in
share mode? The idea is to increase my ratio.
I don't know. Please share your experience and perhaps suggest changes to
the defaults!

[1] upload_queue_length at
http://libtorrent.org/reference-Core.html#peer_info


--
Arvid Norberg
Ardhi Putra Pratama
2016-04-28 13:18:13 UTC
Permalink
Dear Arvid,



Thanks for the reply! Unfortunately I can't found the attribute that you
mentioned. Is it 'incoming' in 'peer_source_flags'? Or do I really need to
call map_file to get those requests?



My upload limit in torrent handle and upload_rate_limit in Settings have 0 as
value, means unlimited. There are incoming request to those torrent
(torrent_handle:has_incoming), but still, no activity. I looked into
max_uploads attribute, in my case, it shows 16777215 (I don't even know why
this is the default value, I expect -1, though), in my settings, it's 8
(unchoke_slots_limit). My question is, what is the precedence between those
two? Does the local setting in torrent handle overwrite the settings in
session?



Regards,

ardhi



Ardhi Putra Pratama Hartono / Msc Candidate in Computer Science
[***@ardhipoetra.web.id](mailto:***@ardhipoetra.web.id) / +31617324665

Technische Universiteit Delft - Distributed System lab
<http://www.ardhipoetra.web.id>

[ ![Twitter](https://s3.amazonaws.com/htmlsig-assets/round/twitter.png)
](http://twitter.com/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Facebook](https://s3.amazonaws.com/htmlsig-
assets/round/facebook.png) ](https://fb.me/ardhipoetra)
![](https://s3.amazonaws.com/htmlsig-assets/spacer.gif) [
![LinkedIn](https://s3.amazonaws.com/htmlsig-assets/round/linkedin.png)
](https://linkedin.com/in/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Skype](https://s3.amazonaws.com/htmlsig-
assets/round/skype.png) ](https://htmlsig.com/t/0000001BSXX0E)
![](https://s3.amazonaws.com/htmlsig-assets/spacer.gif) [
![Flickr](https://s3.amazonaws.com/htmlsig-assets/round/flickr.png)
](https://flickr.com/ardhipoetra) ![](https://s3.amazonaws.com/htmlsig-
assets/spacer.gif) [ ![Github](https://s3.amazonaws.com/htmlsig-
assets/round/github.png) ](https://github.com/ardhipoetra)
![](https://s3.amazonaws.com/htmlsig-assets/spacer.gif)
On Tue, Apr 26, 2016 at 10:53 AM, Ardhi Putra Pratama
&lt;***@gmail.com&gt;
wrote:
&gt;
&gt; Howdy,
&gt;
&gt; I have several torrents that added in share_mode flags. I kept other
settings
&gt; like share_mode_target or active_downloads in their default value. Let's
say
&gt; that the number of torrents added is around 20-30.
&gt;
&gt; When the torrents recently added, it just runs. Although all of them very
slow
&gt; compared to if I download those files manually, one by one without
share_mode.
&gt; However, in 1 hour or so, all of my torrents just stop responding. It
doesn't
&gt; do anything (download/upload), but it's still active.
&gt;
&gt; My guess is, maybe it can't upload more because there are no peers that
need
&gt; the file. Unfortunately, this is not the case. Based on get_peer_info(),
some
&gt; peers indeed still need some of the data. So why stop uploading?
In general it's the _downloader_ that decides whether to request data or
not. The uploader cannot upload without having a peer that requests data.
In this case, you should look at the number of incoming piece/block
requests (it should be available in the peer_info [1]). If this is zero,
the peer is not requesting anything. You may also want to make sure you
have sufficient upload slots available, and that the peers you're looking
at are in fact unchoked. It's quite possible the downloaders are
downloading from other peers and limits the number of peers they download
from in parallel.
I would expect the natural development of a torrent would be that the
supply/demand increases over time, and eventually you won't be able to get
much "return on investment" in share_mode.
&gt; And more question, as share_mode is claimed to not well-tested. What
settings
&gt; that I have to consider if I work with a large number of torrents (30-50)
in
&gt; share mode? The idea is to increase my ratio.
I don't know. Please share your experience and perhaps suggest changes to
the defaults!
[1] upload_queue_length at
<http://libtorrent.org/reference-Core.html#peer_info>
\--
Arvid Norberg
\-----------------------------------------------------------------------------
-
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Libtorrent-discuss mailing list
Libtorrent-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libtorrent-discuss
Arvid Norberg
2016-04-28 22:50:57 UTC
Permalink
Post by Ardhi Putra Pratama
Dear Arvid,
Thanks for the reply! Unfortunately I can't found the attribute that you
mentioned. Is it 'incoming' in 'peer_source_flags'? Or do I really need to
call map_file to get those requests?
it's upload_queue_length at
http://libtorrent.org/reference-Core.html#peer_info

you call get_peer_info() on the torrent to get information about the peers.
Post by Ardhi Putra Pratama
My upload limit in torrent handle and upload_rate_limit in Settings have 0 as
value, means unlimited. There are incoming request to those torrent
Post by Ardhi Putra Pratama
(torrent_handle:has_incoming),
That's not an indication of incoming requests, it's for incoming
*connections*.
Post by Ardhi Putra Pratama
but still, no activity. I looked into
max_uploads attribute, in my case, it shows 16777215 (I don't even know why
this is the default value, I expect -1, though), in my settings, it's 8
(unchoke_slots_limit). My question is, what is the precedence between those
two? Does the local setting in torrent handle overwrite the settings in
session?
They are independent. both always apply, so whichever has the more
restrictive setting.
--
Arvid Norberg
Loading...