Page 1 of 1

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 11:01 am
by akaroot
Hello!
I would like to use Rasberry Pi B as a 24/7 standalone torrent client and network storage (under Ubuntu, deluge and samba, external HDD through usb).
Are there enough resources to download and seeding about 100 torrents (about 500 connects)?
Where can I download os image for he sd card (preferably Ubuntu or debian) for Rasberry Pi B?

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 11:56 am
by david13lt
I don't think that OS images are already available for R-P for now. There will be multiple distributions supported.

I am also thinking of using R-P as seedbox or streaming videos over BitTorrent. 100 active torrents are really a lot even for a normal setup. For example, a single torrent on my system can have up to 100 Mbps upload and with utorrent client that requires a lot of CPU power from my C2D. I would expect that USB external HDD would make it run slower.

If you gonna run a high bandwidth seedbox with USB external HDD, you might have some problems.

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 12:01 pm
by akaroot
david13lt! My net speed is about 10 Mbps, so i think that the hardware resources will suffice for this

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 12:48 pm
by abishur
yikes a hundred seeds on 10 Mbps? I hope you have a rotation schedule set up for them :P

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 1:38 pm
by obarthelemy
One unavoidable issue will be that the *internal* bus of the Pi is a sngle USB2 port. Ethernet and both USB ports go through that single USB2 interface. That means
- Ethernet and USB disk access compete for bandwidth
- USB management can take a lot of CPU cycles, so we're very dependent on driver quality
- BTW, the SD card on the Alpha models is surprisingly slow, so using it as a temp folder probably is not a good idea, aside from durability concerns.

I think the solution will involve severely optimizing disk accesses (ie, apply the "flash" tweaks also for USB HDs, <ad>there's a topic about that</ad>); and optimizing the OS for max available RAM/Cache (no x11...).

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 2:03 pm
by nobbit
...optimizing the OS for max available RAM/Cache (no x11...).
Is it possible to run utorrent without X11? I think it even has to be run through wine (not sure about that).

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 2:10 pm
by akaroot
There is a utorrent client for linux, but I think the deluge much better torrent client. It can work in daemon mode. There is a web interface and you can connect to deluge deamon using gui client from other computer's

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 2:15 pm
by obarthelemy
uTorrent is not the sole bittorrent client. It is pretty good, but it no longer is the only small, fast, C-based client it once was. There are other good, noX, torrent clients. BTW, you want to avoid both X11 *and* java.
https://wiki.archlinux.org/index.php/Li ... nt_Clients
rtorrent and transmission are in the debian-armel repo; not qBittorrent.

Web interface is not 100% necessary, it's easy to open a remote text shell.

Re: Rasberry Pi as standalone torrent client

Posted: Thu Sep 29, 2011 2:51 pm
by obarthelemy
This semi-recent linux torrent clients comparison is interesting:
http://pastehtml.com/view/5tx16jw.html

- Actual download performance is pretty much the same for all. The test covers single-torrent leeching, not seeding nor multi-torrent, but extrapolating should be valid.
- Memory usage varies widely. transmission is very good, rtorrent and qbit are OK (rtorrent figures are misleading because it uses the OS'cache, not its own), uTorrent is bad (you have to add Wine and x11)
- CPU usage: same as above

Other test (sorry, no source):


My take is: use transmission unless it misses features you need.

Re: Rasberry Pi as standalone torrent client

Posted: Fri Sep 30, 2011 4:38 am
by Tide
How about ctorrent?

Re: Rasberry Pi as standalone torrent client

Posted: Fri Sep 30, 2011 3:36 pm
by MoonTEC
Quote from Tide on September 30, 2011, 05:38
How about ctorrent?
I'm using ctorrent on FreeBSD box. Not very user friendly interface, but i like it. Fast and stable on low resources.

Re: Rasberry Pi as standalone torrent client

Posted: Fri Sep 30, 2011 4:33 pm
by WASD
I'm planning to do this. I've tried rTorrent and transmission-daemon with web-interfaces. I liked transmission-daemon most.

Re: Rasberry Pi as standalone torrent client

Posted: Sat Oct 01, 2011 4:23 pm
by akaroot
What kind of USB are there in Raspberry Pi B (1.1 or 2.0)? What it speed? Can I connect external hard drive?

Re: Rasberry Pi as standalone torrent client

Posted: Sat Oct 01, 2011 4:34 pm
by obarthelemy
USB 2.0, which is 480mbps. You can connect an external hard drive, though probably not power it, you'll need either a power brick for the HD, or use one of those Y cables that take 2xUSB power off a powered hub.
Fair warning: the Pi B's Ethernet and 2 USB ports are internally hooked up to a single USB 2.0 channel, so these 3 ports (and anything off a USB of course) contend for so-so bandwidth.

Re: Rasberry Pi as standalone torrent client

Posted: Sat Oct 01, 2011 10:13 pm
by Philou
Quote from obarthelemy on September 29, 2011, 15:51
This semi-recent linux torrent clients comparison is interesting:
http://pastehtml.com/view/5tx16jw.html

- Actual download performance is pretty much the same for all. The test covers single-torrent leeching, not seeding nor multi-torrent, but extrapolating should be valid.
- Memory usage varies widely. transmission is very good, rtorrent and qbit are OK (rtorrent figures are misleading because it uses the OS'cache, not its own), uTorrent is bad (you have to add Wine and x11)
- CPU usage: same as above

Other test (sorry, no source):


My take is: use transmission unless it misses features you need.
+1 for transmission !
For my "seedbox" under Debian Lenny without X
I run the web app torrentflux-b4rt to manage my torrents, with transmission client, I think that Rasberry Pi can run it without problem !

Re: Rasberry Pi as standalone torrent client

Posted: Sat Sep 01, 2012 10:25 pm
by Melsius
I see there are no posts here since it actually hit the shelves. Thought I just might give an update on my current project doing exactly what the topic says:

I installed rTorrent along with ruTorrent and Samba on the debian squeeze image. I have a 100 mbps up/down uplink. For reference: normally when I download a private torrent I can easily get over 9 MB/s down.

At first I was getting kernel errors when the speed picked up, but this was fixed by updating the raspberry pi firmware.
Now it seems to be working okay, but the speeds aren't getting over 2 MB/s even with just one active torrent. When I add one extra torrent, the total download speed drops even more (never mind trying to do a hash-check on a partly downloaded torrent!).

I think rTorrent is about the lightest possible client and it seems that especially the USB disk operations and maybe moving that much data around in general is just the bottleneck on the Raspberry Pi. I didn't really check the effect of encryption on the speeds, but I'd like mine to be on at all times anyway.

It pains me to see my poor Raspberry Pi struggling so much, so I guess I'll find something else to do with it.

Did anyone else get it to work better?

Re: Rasberry Pi as standalone torrent client

Posted: Sun Sep 02, 2012 7:42 am
by kalehrl
I have no experiences with rtorrent but I use Transmission which is supposed to be the lightest of them all. It ships as default torrent client with Lubuntu (LXDE based Ubuntu) and it usually takes around 30MB of RAM while running.

Re: Rasberry Pi as standalone torrent client

Posted: Sun Sep 02, 2012 7:53 am
by Alvaro
kalehrl wrote:I have no experiences with rtorrent but I use Transmission which is supposed to be the lightest of them all. It ships as default torrent client with Lubuntu (LXDE based Ubuntu) and it usually takes around 30MB of RAM while running.

Rtorrent and screen is the lightest system I can think of. Perfect for the Raspberry Pi. Here is a client that has been running for 11 days on my system, seeding two torrents:

1518 rtorrent 20 0 32532 4348 2260 S 1.0 2.3 114:50.46 rtorrent

Just a little more than 4 megabytes in use.

Excellent tutorial is here:
http://forums.debian.net/viewtopic.php?f=16&t=54670

Just add a user called rtorrent...

Code: Select all

sudo adduser rtorrent
.

Then skip down to the part where you install rtorrent. Also I just used the rtorrent.rc and init script on that page, so it starts automatically on each boot.

Re: Rasberry Pi as standalone torrent client

Posted: Sun Oct 21, 2012 10:47 pm
by mcmanuf
Forget all about it pal.. A 100 seeds?
Try seeding 1 torrent and see if it even can saturate your connection.. I think not.

I cant even download 1mb/s stable. I have tried everything between heaven and earth, but nothing helps.

Your project sounds like utopia on a rpi!

Re: Rasberry Pi as standalone torrent client

Posted: Mon Oct 22, 2012 10:20 pm
by whirpool
mcmanuf wrote:Your project sounds like utopia on a rpi!
Well.. regarding the 100seeds that might be true.. could guess that ram could be an issue there but i know little to nothing about rtorrents ram usage.

I'm running rtorrent on my pi since May seeding the pi-distros and LinuxMint ISO's (total of 8 torrents) on a 50/10Mbit connection w/o any speed restrictions for rtorrent.
Upspeeds of 1.1MB/s and downspeeds of 5.8MB/s are possible and, even if mostly idle or at low speed (~50-200KBs), i saw rtorrent utilizing the the bandwidth to its full extend.

my ~/.rtorrent.rc:

Code: Select all

# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum and minimum number of peers to connect to per torrent.
min_peers = 40
max_peers = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
min_peers_seed = 10
max_peers_seed = 50

# Maximum number of simultanious uploads per torrent.
max_uploads = 30

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 0

# Default directory to save the downloaded torrents.
directory = ~/rtorrent/

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = ./rtorrent/session

# Port range to use for listening.
port_range = 9680-9689

# Start opening ports at a random position within the port range.
port_random = yes

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = yes

# Set whetever the client should try to connect to UDP trackers.
use_udp_trackers = yes

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,enable_retry,prefer_plaintext

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
#
dht = auto

# UDP port to use for DHT.
#
dht_port = 9881
rtorrent itself gets startet fom /etc/rc.local with:
/bin/su - -- pi -l -c '/usr/bin/screen -dmS rtorrent rtorrent'
greetings,
whirpool

Re: Rasberry Pi as standalone torrent client

Posted: Tue Oct 23, 2012 10:56 am
by mcmanuf
Thanks for sharing your config file. I just wish there was a fix for transmission as well.