Instability with rtorrent on Debian Lenny on NSLU2

16 views
Skip to first unread message

uncle...@gmail.com

unread,
Jan 26, 2009, 7:04:47 AM1/26/09
to NSLU2-rtorrent
Hi there since I've moved from Debian Etch to Lenny, I have noticed
that rtorrent (a number of different versions) don't work so well and
are sometimes unstable on my machine.

My system uses a 4GB flash stick for the root directory but it uses a
swap partition on a normal harddrive which is attached by USB. The
swap is quite large (1GB) and shouldn't cause any out of memory
problems. After long periods of using rtorrent, the system seems to
become unstable and prevents me from logging in via ssh. After that
Samba shares also go off and the server is unusable until a power
cycle.

I was wondering if anyone else had a similar setup and has encountered
such problems? And whether anyone has any solutions to try?

This is the only problem I have with the NSLU and if I don't solve it
I'll be forced to flash it back to etch. What are the disadvantages of
this by the way? apart from not-so-new program support?

Martin Manscher

unread,
Jan 26, 2009, 7:21:28 AM1/26/09
to NSLU2-r...@googlegroups.com
I don't know what errors you are getting from rtorrent, but memory can be a problem even with 1 Gb memory if you have many upload slots and many open torrents. From http://libtorrent.rakshasa.no/ticket/1198:
 
You need one chunk size's worth of memory for each upload slot, and one for each entry in the transfer list. When downloading a torrent with large (1+ MB) chunks, this means you either need to reduce upload slots (transfer slots cannot be directly limited), or increase max_memory_usage until it's enough. The memory is only files mapped into rtorrent's process space, i.e. shared memory and not core memory, hence max_memory_usage is not limited by your physical memory.
Martin

2009/1/26 <uncle...@gmail.com>

uncle...@gmail.com

unread,
Jan 27, 2009, 9:16:03 AM1/27/09
to NSLU2-rtorrent
Hi Martin,

The errors in my log files says something about page write failed... I
don't know if it's caused by rtorrent but it definitely only happens
when rtorrent is running and normally when it is downloading large (1GB
+) files.

Did you manage to find a setting that works for you?

How much swap space do you have on yours? I thought 1GB was enough but
may have to resize it to something larger...

Martin Manscher

unread,
Jan 28, 2009, 2:57:00 AM1/28/09
to NSLU2-r...@googlegroups.com
Large torrents usually have a chunk size of 4 MB. Thus you will fill up 1 GB with 250 peers (up+down total), if I understand this correct. Also, I suspect (although I'm not sure) that if rtorrent is using large amounts of swap space, it _may_ cripple your NSLU2 (remember that it's only a 266 MHz processor). Finally, if rtorrent uses all your bandwidth, the NSLU2 may become unresponsive, simply because the ssh connection "drowns in" (times out because of) the large traffic load.
 
I've settled for settings with up/down rates 20% below the maximum (about 1 MB/s down in my case), and limited the number of peers:
 
max_uploads_global=20
max_downloads_global=1
My settings work reasonably well, although I have been able to crash rtorrent when downloading many large torrents at once. As long as I stick to a few torrents at a time, I have no problems.
 
Examining my memory usage, I get this from top:

Mem:     29988k total,    28836k used,     1152k free,     1400k buffers
Swap:    96348k total,    32472k used,    63876k free,    11112k cached
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
18435 manscher  15   0 29316 6752 2340 R 17.1 22.5   2016:40 rtorrent
Hope this helps.

Martin

-- "I reject your reality and substitute my own" - Adam Savage


2009/1/27 <uncle...@gmail.com>

uncle...@gmail.com

unread,
Jan 28, 2009, 5:19:42 AM1/28/09
to NSLU2-rtorrent
Thanks for the explanation Martin.

I'll have a go at limiting my rtorrent too. It's good to hear this is
a known problem and it's not just my NSLU. It's perfect for my needs
in all other ways.

Just a quick question, when you set "max_downloads_global=1" does that
mean you only permit 1 download at a time?

Martin Manscher

unread,
Jan 28, 2009, 8:40:24 AM1/28/09
to NSLU2-r...@googlegroups.com
I thought so, but I'm not sure... I seem to be able to start multiple downloads at the same time.

Martin



2009/1/28 <uncle...@gmail.com>

zdroshnya

unread,
Jan 31, 2009, 9:41:28 PM1/31/09
to NSLU2-rtorrent
I think it limits you to one peer per download.
I tried it an it sure was limiting the download speed, while having
all downloads open.

On Jan 28, 2:40 pm, Martin Manscher <martinmansc...@gmail.com> wrote:
> I thought so, but I'm not sure... I seem to be able to start multiple
> downloads at the same time.
>
> Martin
>
> 2009/1/28 <uncletho...@gmail.com>

Martin Manscher

unread,
Feb 1, 2009, 10:22:23 AM2/1/09
to NSLU2-r...@googlegroups.com
Just checked - the torrent I'm downloading uses multiple peers, so it's not limiting the number of peers.

Martin


2009/2/1 zdroshnya <hepami...@gmail.com>

julian67

unread,
Feb 1, 2009, 10:43:22 AM2/1/09
to NSLU2-rtorrent
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510560

Unfortunately the patched version hasn't yet become available for
armel.

Using newer version from experimental or compiled from source also
doesn't help as there is a bug in the way that rtorrent 0.8.4
interacts with curl/libcurl which also results in random crashes.
Reply all
Reply to author
Forward
0 new messages