errikos
Posts: 33
Joined: Thu Feb 09, 2012 12:47 pm

Re: Torrent server

Fri Jul 20, 2012 1:40 pm

cptwunderlich wrote:I had massive issues with the original Debian Wheezy image. With full speed, it would crash after a few minutes.
Then I tried the Raspbian image and rpi-updated. It didn't work either, but that was because of the faulty kernel/firmware. I updated it again yesterday and it works like a charm now. Downloaded several Gigabytes already.

Btw. I'm using transmission-daemon v2.52 and downloading onto an external hard disc.

Did you updated the firmware (rpi-update) or the raspbian image to the new version?

In that page http://www.raspberrypi.org/phpBB3/viewt ... 5&p=127237 is mentioned that a similar problem to ours, is solved by the new raspbian image!!

jerhat
Posts: 14
Joined: Fri Jun 08, 2012 1:26 am

Re: Torrent server

Fri Jul 20, 2012 4:12 pm

I just ripped the new official raspbian and performed my usual test (which used to make the pi freeze in 5mn). No fatal freeze anymore. However the pi iwas still freezing but only for a few seconds and then was back to life. This was due to the "smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped" error which was logged MANY times under high network load (about 100 000 times in 30minutes in my syslog and kern.log), so I guess the pi was only freezing because of sd I/O. But no kernel panic! The error was only logged in the log files but was not scrolling in the scrren as it used to do before.

I increased vm.min_free_kbytes to 16M, since then the error has not been logged even once and the pi is happily downloading at full speed.

I can say this new official image put an end at 2 months struggling with my pi. I hope it will solve the problem for you too.

ghallberg
Posts: 3
Joined: Mon Jun 25, 2012 6:38 pm

Re: Torrent server

Fri Jul 20, 2012 4:55 pm

What kinds of speeds are you getting then? Just saying "full speed" doesn't really give a point of comparison for the rest of us :)

errikos
Posts: 33
Joined: Thu Feb 09, 2012 12:47 pm

Re: Torrent server

Fri Jul 20, 2012 6:29 pm

jerhat wrote:I just ripped the new official raspbian and performed my usual test (which used to make the pi freeze in 5mn). No fatal freeze anymore. However the pi iwas still freezing but only for a few seconds and then was back to life. This was due to the "smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped" error which was logged MANY times under high network load (about 100 000 times in 30minutes in my syslog and kern.log), so I guess the pi was only freezing because of sd I/O. But no kernel panic! The error was only logged in the log files but was not scrolling in the scrren as it used to do before.

I increased vm.min_free_kbytes to 16M, since then the error has not been logged even once and the pi is happily downloading at full speed.

I can say this new official image put an end at 2 months struggling with my pi. I hope it will solve the problem for you too.
ROFLhoff wrote:
errikos wrote:I tried the default squeeze image with the upgraded kernel and the new firmware from rpi-update and it seems to work ok!
just 2 problems:
1) Dmesg is flooded with this message:

[ 3729.788441] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788464] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788509] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788538] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788563] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788586] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped
[ 3729.788632] smsc95xx 1-1.1:1.0: eth0: kevent 2 may have been dropped


2) For some weird reason, swat for samba does not start.


It is good to solve one problem but really linux is like a hydra, one problem is solved, numerous other emerge :D :twisted:

Have you tried adding "smsc95xx.turbo_mode=N" to /boot/cmdline.txt? That's how I kept my log files from completely filling my rootfs.

Try the "smsc95xx.turbo_mode=N" to /boot/cmdline.txt , solves the issue with the log! But it reduces a little bit the ethernet speed (not very significant for torrent use...)

jerhat
Posts: 14
Joined: Fri Jun 08, 2012 1:26 am

Re: Torrent server

Sat Jul 21, 2012 12:24 am

ghallberg wrote:What kinds of speeds are you getting then? Just saying "full speed" doesn't really give a point of comparison for the rest of us :)
My download speed is not relevant. I was just one of those in this topic facing the frezze issue and the new official raspbian did solve it (and it looks like I am not the only one). I'm confident it will work for you as well. Moreover it is now the official distro for the pi so I really encourage you to give it a try.

Mbir
Posts: 1
Joined: Sat Jul 21, 2012 7:25 am

Re: Torrent server

Sat Jul 21, 2012 7:32 am

I have also installed the official raspbian and it is torrenting with transmission-daemon overnight at "full speed" without crashing. I have seen download speeds of about 1MB/s however whenever it reaches that speed the remote transmission gui, putty and samba are unable to communicate with the Pi until the torrent speed drops. :roll: .

ghallberg
Posts: 3
Joined: Mon Jun 25, 2012 6:38 pm

Re: Torrent server

Sat Jul 21, 2012 9:34 am

The speed has been relevant in the past, where people would say "full speed" and it would be 400KB/s, which has always worked for me. My Pi didn't crash reliably unitl 600.

I have tried the official raspbian image now and it seems great, so thanks for your input!

cr4zy
Posts: 1
Joined: Sun Jul 22, 2012 3:32 am

Re: Torrent server

Sun Jul 22, 2012 3:39 am

tomaac wrote:Hi everyone.

I had similar problems with my Raspberry Pi and rtorrent - after downloading files for 30-40 minutes, RPi ended with kernel Oops.

So here is what I did:

- Installed Debian Squeeze from Raspberry Pi download site
- apt-get update && apt-get upgrade
- installed newest firmware with rpi-update tool
- cp /boot/arm224_start.elf /boot/start.elf (since I dont use GUI, just CLI)
- set vm.min_free_kbytes to 16384
- set swap area on dedicated USB flash - 512 MB
- upgraded kernel to 3.2.21 from http://www.bootc.net/projects/raspberry-pi-kernel/
- run rpi-update again
- remove config file from /boot/
- install rtorrent (without any gui or web)
- set following values in config file:

Code: Select all

max_peers = 20
max_peers_seed = 10
max_uploads = 5
download_rate = 3000
upload_rate = 500
hash_read_ahead = 5
hash_max_tries = 5

Code: Select all

pi@raspberrypi:~$ uname -a
Linux raspberrypi 3.2.21-rpi1+ #12 Sun Jul 1 18:10:03 BST 2012 armv6l GNU/Linux

Code: Select all

pi@raspberrypi:~$ cat /etc/debian_version
6.0.5
So far I have been running rtorrent for a couple of hours downloading multiple mkv files simultaneously. It seems that it works just fine. Of course I will test it for longer period.

Btw I am using HTC 5v-1A charger + Belkin 7 port powered USB Hub, if that matters. All downloads goes to my 2.5'' USB HDD.
I've done this pretty much and been running fine for just under 9 days so far.

Slight differances, my swap is 128MB and on SD card. Files downloaded to USB flash drive and using transmission (2.03) with similar settings for my speeds 3000KB/s down, 300KB/s up. Multiple torrents seeded and also running irssi continuously with no issues connecting to that even when doing full upload or downloads.

karmapolice
Posts: 3
Joined: Tue Jul 24, 2012 8:17 am

Re: Torrent server

Fri Jul 27, 2012 5:20 am

Happened to me with the official Raspbian image and the last firmware from rpi-update.
vm.min_free_kbytes was set to 8M

I set it to 16M and added "smsc95xx.turbo_mode=N" to /boot/cmdline.txt and now I could download 8gb at 800kb/s max with no hangs or errors in the log.

mishoboss
Posts: 1
Joined: Fri Jul 27, 2012 1:12 pm

Re: Torrent server

Fri Jul 27, 2012 1:16 pm

I use Transmission on Raspbmc. No hanging so far (15 minutes :D), but the speed is goddamn low. Its about 400KBps. Is this the limit of the Raspi? My Internet speed is 50 Mbps.

zenomega
Posts: 2
Joined: Sat Apr 07, 2012 1:33 pm

Re: Torrent server

Fri Jul 27, 2012 5:23 pm

So it seems things are working with ethernet connection running rtorrent saving to a usb drive, but what about a wifi connection? I am still getting rpi lockup using the wifi dongle. I can connect and download effortlessly using ftp from and to the rpi using wifi dongle but it panics and shuts down if rtorrent is saving to a usb drive.

All works fine if I tell rtorrent to save to the sdcard using ethernet, but I need to have this setup away from my ethernet connection so need to have the wifi and usb working in harmony with rtorrent.

rotflcopter
Posts: 2
Joined: Wed Aug 01, 2012 7:01 pm

Re: Torrent server

Wed Aug 01, 2012 7:33 pm

karmapolice wrote:Happened to me with the official Raspbian image and the last firmware from rpi-update.
vm.min_free_kbytes was set to 8M

I set it to 16M and added "smsc95xx.turbo_mode=N" to /boot/cmdline.txt and now I could download 8gb at 800kb/s max with no hangs or errors in the log.
Thank you very much! Now everything works fine.
No hangs (running 3rd day now), downloading multiple files @ 1400KB/s.

elatllat
Posts: 1337
Joined: Sat Dec 17, 2011 5:05 pm

Re: Torrent server

Tue Aug 07, 2012 10:24 pm

I was able to prevent kernel panic with "nice rtorrent" and limiting "max_peers = 10" and "download_rate = 300".

I am using usb drives (LVM,dm_crypt,ext4)
Related: http://www.raspberrypi.org/phpBB3/viewt ... =53&t=7581
SBC with 32GB RAM: https://hardkernel.com

FAQ : https://raspberrypi.stackexchange.com

Unanswered: https://www.raspberrypi.org/forums/search.php?search_id=unanswered

2be
Posts: 19
Joined: Fri Jul 27, 2012 4:53 pm

Re: Torrent server

Thu Aug 09, 2012 9:09 pm

ok, I've read some of the posts but not all of them, but i have the same problem.
I'm using Xbian and it's great but when i have the transmission daemon active the pi freezes.

Can someone please sum this up and tell me how to fix it?
do I have to update something? or is it the swapfile? how do i change the swapfile from the sd-card to the hdd?

Caótico Fanegas
Posts: 14
Joined: Fri Jun 15, 2012 7:45 pm

Re: Torrent server

Thu Aug 09, 2012 10:09 pm

Well, I don't know about "Xbian", but from a raspbian (previous to the last official image), it only took:
  • Update
  • Run the rpi-update script
  • Add the "smsc95xx.turbo_mode=N" parameter to /boot/cmdline.txt
After that, it started working like magic, I have a current uptime of more than 10 days without a single crash. The last boot of my rpi was to apply some new updates though, so I'd say that it's been working for two weeks with no problems at all.

Good luck!

2be
Posts: 19
Joined: Fri Jul 27, 2012 4:53 pm

Re: Torrent server

Thu Aug 09, 2012 10:30 pm

Hm.. i think if i update Xbians rpi it will downgrade (so i've heard) so i'll wait with that.
but what does the smsc95xx.turbo_mode=N do? can someone explain?

Caótico Fanegas
Posts: 14
Joined: Fri Jun 15, 2012 7:45 pm

Re: Torrent server

Mon Aug 13, 2012 3:04 pm

This is what I got from the driver documentation. The smsc95xx.turbo_mode "Enable multiple frames per Rx transaction" when true.

I don't know exactly what does that mean, my networking superpowers are not good enough, but on the practical side of the issue, I've only detected a slight reduction of transfer speed on LAN when I switch it off, but it's still good enough to watch a 1080p mkv on my PC through samba, so no worries.

Ignas
Posts: 7
Joined: Wed Jul 18, 2012 2:05 pm
Location: Šiauliai, Lithuania

Re: Torrent server

Sat Aug 25, 2012 3:26 pm

I've noticed that Pi gets unstable only when downloading. I've been running rtorrent for a few days now and it's been rock solid when seeding 20-30 torrents with speeds up to 5MB/s (I've got 100Mbps line).

But if I add at least one download, Pi becomes unstable at such low speed as 300KB/s, dmesg becomes full of "kevent 2 blah blah dropped".
Adding "smsc95xx.turbo_mode=N" to /boot/cmdline.txt helps to reach higher speeds, like 1MB/s download, and prevents dmesg from flooding, but Pi really stresses with loads over 2.5. I didn't want to crash my Pi so I've just stopped the download.

cage85
Posts: 2
Joined: Thu Oct 04, 2012 6:29 am

Re: Torrent server

Thu Oct 04, 2012 10:39 am

I just wanted to post my own experiences with this and confirm that the fixes mentioned in this thread do indeed solve the problem. My RPi would freeze after 10-20 minutes of downloading torrents, seemingly regardless of download speeds, no. of peers etc. After applying the fixes it has been running for almost 12 hours with constant downloading of multiple torrents over 1MB/s. Just to make it easier for others who have this problem I decided to collect all steps required to fix it in a single post.

What I'm running
What I did to fix it

I performed the following suggested modifications mentioned in this thread.
  • Updated the firmware according to this blog post: http://www.stuffaboutcode.com/2012/07/r ... ed-by.html i.e. (add "sudo" before each command if you're not logged in as root)

    Code: Select all

    apt-get install git-core
    wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
    apt-get install ca-certificates
    rpi-update
  • Increased "vm.min_free_kbytes" to 16384 in /etc/sysctl.conf:

    Code: Select all

    nano /etc/sysctl.conf
    Replace the number 8192 after "vm.min_free_kbytes =" with 16384, i.e. double it.
  • Added "smsc95xx.turbo_mode=N" to /boot/cmdline.txt:

    Code: Select all

    nano /boot/cmdline.txt
    Paste "smsc95xx.turbo_mode=N" after all other entries in the file.
  • After that I pulled the plug, let the RPi rest for a few seconds before plugging it in again. Done!
I hope this is of help to someone!

xmacro
Posts: 1
Joined: Wed Sep 26, 2012 8:44 pm

Re: Torrent server

Thu Oct 11, 2012 9:51 am

Hi,
I'm using (freezing ) 2012-09-18-wheezy-raspbian with:
- rtorrent 0.9.2 / libtorrent 0.13.2 compiled from source
- rutorrent
- external HDD for download.

Rtorrent is configured to start at boot as daemon (with screen).

Any news to solve the freeze problem?

mcmanuf
Posts: 115
Joined: Wed Aug 22, 2012 12:29 am

Re: Torrent server

Mon Oct 22, 2012 3:22 pm

I think there is definetly something wrong with transmission build at least.
As many others have pointed out, one can still download from wget at high speed without any problems.

I have read this whole thread and tried so many different settings but its hopeless.
I have avoided my pi from crashing with the cmdline setting and the vm_min_free setting in sysctrl, but the download speed fluctuates like crazy no matter what I do.. Like some buffer has to be emptied or something.

I have made my own torrent server, so only 1 seed and no other peers. This should eliminate all concerns regarding number of connections.
Still what I see, even when limiting the download speed to a measly 300kb/s, is that transmission downloads and suddenly stops for a couple of seconds (htop tells me transmission-daemon uses 0% cpu) before it continues downloading at the indicated speed. It does this all the time.

What the hell can it be?
Is someone willing to try to build transmission 2.73 into a deb package with armhf to see if it is something wrong with our particular build 2.52?

I mean I have tried eliminating all the bottlenecks I could thing of with no luck whatsoever!

Running latest 3.2.27 kernel, and even have overclocked cpu to 900 Mhz, even though I cantell that the cpu is nowhere near being maxed out.
May I also remind you that my old arm 300Mhz could easely max out my connection at 1,2mb/s stable download. The Pi cant even do 300kb/s stable :((((((

SawaFish
Posts: 9
Joined: Mon Oct 22, 2012 10:15 pm

Re: Torrent server

Mon Oct 22, 2012 10:26 pm

Hello all,

I've experienced the same problems running rTorrent. It would get incredibly slow and within 10 minutes just stop working at all. I've tried the solutions to add "smsc95xx.turbo_mode=N" in vim "/boot/cmdline.txt" and to increase "vm.min_free_kbytes = 8192" to 16384 in "vim/etc/sysctl.conf" but this didn't work.

What so far seems to work for me is the following, open this file:
~/.rtorrent.rc
Add this line at the end:
max_memory_usage = 160

Judging from my system log the problem was that the USB bus was used too heavily so the system couldn't allocate memory anymore, resulting in a crash. It seems rTorrent doesn't play nice with the "vm.min_free_kbytes" command. I must say that I'm very new to Linux and have little to no idea what I'm actually doing, however this prevents my RPi from crashing while running rTorrent. :)

paxrex
Posts: 2
Joined: Fri Jul 27, 2012 10:46 am

Re: Torrent server

Tue Oct 23, 2012 8:21 am

SawaFish wrote:Judging from my system log the problem was that the USB bus was used too heavily so the system couldn't allocate memory anymore, resulting in a crash.
What image are you using? I remember that latest Raspbian image have some USB fix, can't remember exactly. This USB fix should improve performance.

I am thinking about setting one Pi as a torrent server. But if there are problems I might just go the other way. I have also Asus RT-N13U-B1 and I could install DD-WRT with transmission daemon ans use it instead. I'm not sure which one is better. I like Pi solution cause I could just switch SD card and voila, my torrent server is meda center :).

mcmanuf
Posts: 115
Joined: Wed Aug 22, 2012 12:29 am

Re: Torrent server

Tue Oct 23, 2012 10:54 am

paxrex wrote:
SawaFish wrote:Judging from my system log the problem was that the USB bus was used too heavily so the system couldn't allocate memory anymore, resulting in a crash.
What image are you using? I remember that latest Raspbian image have some USB fix, can't remember exactly. This USB fix should improve performance.

I am thinking about setting one Pi as a torrent server. But if there are problems I might just go the other way. I have also Asus RT-N13U-B1 and I could install DD-WRT with transmission daemon ans use it instead. I'm not sure which one is better. I like Pi solution cause I could just switch SD card and voila, my torrent server is meda center :).
Or even better you might be able to use both at the same time :)
We just have to figure out the reason for the crashes and the low/fluctuating torrent speeds. It must be a software fault atm, as I have made local tests and transmission still fluctuates lot even though im the only seeder seeding locally with full speed!.

SawaFish
Posts: 9
Joined: Mon Oct 22, 2012 10:15 pm

Re: Torrent server

Wed Oct 24, 2012 8:04 am

paxrex wrote:What image are you using? I remember that latest Raspbian image have some USB fix, can't remember exactly. This USB fix should improve performance.
I'm using Raspbian 3.2.27+. While setting the max memory fixed the crashing, rTorrent couldn't hash files anymore due to a lack of memory. But the torrent to be hashed was a lot smaller than the allocated memory. I'm now using Transmission and it works very well. So I can recommend the RPi for use as a torrent seedbox. Just keep in mind that the speed (especially downloading) is limited due to the USB bus. However, I've downloaded at 2 MB/s without any problems.

Return to “Networking and servers”