Discussion:
[Libtorrent-devel] downloads with rtorrent are slow
Mr.SpOOn
2008-11-19 13:45:50 UTC
Permalink
Hi,
I installed rtorrent on my Ubuntu 8.04 and I find this to be a really
great program. The only problem I am having is that the download speed
is really slow compared to that I reached with Deluge.

For torrent with a lot of seeders Deluge reached 500kb in a few, while
with same files, in rtorrent, never go over 100kb, and usually it is
stable around 60kb. I don't have any particular setting in a Deluge
neither I am behind a router or a firewall. And even if I was, I
didn't open any port for Deluge, so the situation is the same for both
of them.

Is there any setting I have to change from the default settings? Is
anything I can check?

Thanks,
bye
Dan Pritts
2008-11-19 16:51:24 UTC
Permalink
First, I assume you've configured the bandwidth throttle appropriately.

main screen bottom:
[Throttle off/off KB] [Rate 0.0/ 0.0 KB]

as you can i've disabled mine, you will have different values. adjust
with a/z s/x d/c and A/Z S/X D/C and/or in .rtorrent.rc.

what's rtorrent say for the maximum number of peers it's allowing?

select a torrent and find this line:
Peers: 0(0) Min/Max: 5/40 Uploads: 2 U/I/C/A: 0/0/0/0 Failed: 0

Min/Max: 5/40

Max is the maximum number of peers you'll connect to. You can
adjust with 5 & 6 keys and/or in .rtorrent.rc
Post by Mr.SpOOn
Hi,
I installed rtorrent on my Ubuntu 8.04 and I find this to be a really
great program. The only problem I am having is that the download speed
is really slow compared to that I reached with Deluge.
For torrent with a lot of seeders Deluge reached 500kb in a few, while
with same files, in rtorrent, never go over 100kb, and usually it is
stable around 60kb. I don't have any particular setting in a Deluge
neither I am behind a router or a firewall. And even if I was, I
didn't open any port for Deluge, so the situation is the same for both
of them.
Is there any setting I have to change from the default settings? Is
anything I can check?
Thanks,
bye
_______________________________________________
Libtorrent-devel mailing list
http://rakshasa.no/mailman/listinfo/libtorrent-devel
danno
--
dan pritts
***@umich.edu
734-929-9770
Mr.SpOOn
2008-11-19 18:11:06 UTC
Permalink
Post by Dan Pritts
First, I assume you've configured the bandwidth throttle appropriately.
[Throttle off/off KB] [Rate 0.0/ 0.0 KB]
as you can i've disabled mine, you will have different values. adjust
with a/z s/x d/c and A/Z S/X D/C and/or in .rtorrent.rc.
Yes, I knew about this. I keep this off too.
Post by Dan Pritts
what's rtorrent say for the maximum number of peers it's allowing?
Peers: 0(0) Min/Max: 5/40 Uploads: 2 U/I/C/A: 0/0/0/0 Failed: 0
Min/Max: 5/40
Max is the maximum number of peers you'll connect to. You can
adjust with 5 & 6 keys and/or in .rtorrent.rc
Well, it seems the problem was here. I augmented the minimum peers and
now it reaches a good speed.

Is there a suggested value for this setting?
I'm not sure how the bittorrent protocol works, so I wonder if setting
the min value too high is a bad thing.

Thanks.
Charles Clark
2008-11-19 18:15:09 UTC
Permalink
| From: Mr.SpOOn <***@gmail.com>

| Is there any setting I have to change from the default settings? Is
| anything I can check?

I've never had any problem using most of my theoretical
bandwidth with rtorrent. I think there must be some setting that
would matter.

Make sure you aren't running your other torrent client at the
same time as rtorrent, or they will be fighting for bandwidth.

Make sure rtorrent is throttling; the bottom left of the status
line shows current throttle setting. It should be 0/0 or
something near your theoretical max. If it is 0/0 you may need
to set a throttle on your upload at least in order to get best
performance. It displays in KB (kilo BYTES); connection speeds
quoted by isps are typically in kb (kiloBITS). IE a nice DSL
connection may have a max download speed of 1536 kb, but you
won't be able to get much more than 160 or 170 KB probably
(theoretical max of 192KB). I don't know what the current
typical cable speeds are, more like 400KB down or higher.
However most people seem to believe that you need to throttle
your UPload speed with cable to something like 80 or 90 percent
theoretical max or you will hurt your cable modem's ability to
use all its download bandwidth. Your cable theoretical max
upstream may be as low as 32KB. Try throttling your upload to
something like 25KB and see if that helps your downstream
thruput; if so you need to figure your quoted max up (if in kb
instead of KB take the kb number and divide by 8 to get KB) and
set a throttle to about 80% of that. Some of the fancier clients
will by default try to figure a good value and set some
throttling and rtorrent does not do that.

You can change throttling on the fly using asd/zxc and ASD/ZXC
keys; check man page or online web help. You can also set the
default throttles in an rtorrent.rc file.

You should not use the default port/port range. The default port
is something many (most) other clients will refuse to connect
to. Pick a small range (say 10 or 100 numbers) that are between
20000 and 60000 and use it in ~/.rtorrent.rc with some lines
like this:

port_range = xx500-xx599
port_random = yes

As long as you are making a .rtorrent.rc you'll want to check
the man page or website help and specify a session directory
something like this

session = ~/rtorrent/session

and maybe a default directory where the files you are torrenting
will live regardless what directory you are in when you start it
up like

directory = ~/rtorrent/downloads

There is probably a file somewhere on your system you can copy
to ~/.rtorrent.rc and modify; try "locate rtorrent.rc" to find
it. It probably lives in /usr/share/examples or
/usr/local/share/examples, something like that.

Finally you may need to enable protocol encryption to get best
speeds; "allowing" it will let you connect or receive
connections from other peers that are set to "require" it and
that could be a significant percentage of possible peers at this
point. Requiring it may be needed if your provider is doing
QoS shaping or worse on identifiable bittorrent connections. You
configure this in the rc file too.

Allow example:

encryption = allow_incoming,enable_retry,prefer_plaintext

Some recent list posts gave the syntax for requiring it. It was
something like:

encryption = require, require_RC4
--
Charles Clark | ***@stegosaur.us
Charles Clark
2008-11-19 21:31:13 UTC
Permalink
| From: Mr.SpOOn <***@gmail.com>

| Is there a suggested value for this setting?
| I'm not sure how the bittorrent protocol works, so I wonder if setting
| the min value too high is a bad thing.

I believe the default min is 40, which has been good enough for
me but with a higher bandwidth connection maybe isn't good
enough. The default max is 100, which you should probably raise
if you need more than 40 peers to guarantee using all your
bandwidth.

One of the developers can correct me if I'm wrong, but:

The "min" value means that when your rtorrent joins a swarm, it
will try to connect to other peers until it has at least "min"
peers or it has run thru the list of peers given to it from the
tracker, and then it won't try any more (until the next time it
updates with the tracker). However, it will continue to accept
incoming peers connections if you are "connectable". If you drop
below the min rtorrent won't necessarily do anything about it
until the next time it communicates with the tracker, so you
don't want the min to be way way low. The "max" value means that
once you have max peers, you won't accept any further incoming
connections.

You will have more "protocol overhead", ie more bandwidth and
cpu used by your torrent software updating and receiving updates
from all the peers it is connected to, when you are connected to
more peers than you need in order to use all your bandwidth. So
use the lowest number that works for you consistently. When you
find a good number, you can set that as the default in your
rtorrent.rc file.
--
Charles Clark | ***@stegosaur.us
Loading...