You are not logged in.

#1 2005-10-22 09:07:07

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

[unsolved] Bittorrent extremly slow

I have a strange issue. I am not a big file sharer, but have some files I want to recieve with bittorrent. I notice bittorrent is extremly slow on my archlinux maschine. If I boot into knoppix, it is quite fast, and so is ubuntu live cd. While a download of a file lasts 4 days if I use arch, ubuntu and knoppix will do the job in 3 hours. Arch recieves 2-3 peers, the other systems hundreds. It does not depend that much on daytime or weekday, as this happens everytime I try it out. So what is the trick? As it is a behaviour on the same machine, in the same network, it must be a missconfiguration inside my archlinux setup. I have no idea.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2005-10-22 12:02:20

robot5x
Member
Registered: 2004-01-26
Posts: 266

Re: [unsolved] Bittorrent extremly slow

I would guess this is due to your firewall setup... bittorrent requires connectivity between peers to  operate properly, so you need to make sure the relevant ports are open.
Probably do a

iptables -nL

in knoppix and compare it to your arch setup.

Offline

#3 2005-10-22 12:49:52

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

I run only hardware firewall. The maschine has no extra firewall configurations. It's jsut pure lan, you know:
computer <> lan <> router - firewall <> world wilde web


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#4 2005-10-22 13:47:00

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: [unsolved] Bittorrent extremly slow

strange, b/c it does sound like a ports issue. i seem to get good speeds in arch. what kind of bitrates do you see?

Offline

#5 2005-10-22 15:02:18

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

I recently have one, somehow two peers per torrent, and in maximum about 10 kb/s per torrent, in the middle it is 3-5 kb/s.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#6 2005-10-22 15:30:06

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: [unsolved] Bittorrent extremly slow

and you have 6881-6999 forwarded?

Offline

#7 2005-10-22 16:36:41

robot5x
Member
Registered: 2004-01-26
Posts: 266

Re: [unsolved] Bittorrent extremly slow

I would guess that both ubuntu live and knoppix have quite sophisticated iptables setups (kind of necessary for a live cd) which would allow outgoing and related incoming packets on any ports you want to use.
The big difference is that you don't have ANY software firewall in arch, so if you install iptables and forward whatever ports your client uses (normally 6881-6999 as slackhack says) I bet you'll see much faster speeds.

Offline

#8 2005-10-22 17:03:08

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

A firewall as afterburner? Hm. Never heard of that. Iptables, humh? Will give it a try. Thanks so far, this is not an easy one smile


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#9 2005-10-22 18:58:24

Deciare
Member
From: UTC -8:00
Registered: 2005-05-05
Posts: 79

Re: [unsolved] Bittorrent extremly slow

To be certain that no default firewalls or such are getting in your way, you can run this series of commands:

/usr/sbin/iptables -F
/usr/sbin/iptables -X
/usr/sbin/iptables -P INPUT ACCEPT
/usr/sbin/iptables -P OUTPUT ACCEPT
/usr/sbin/iptables -P FORWARD ACCEPT

to conclusively wipe out all trace of iptables interference.

Offline

#10 2005-10-22 19:09:39

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

This does not make any sense to me.

- the machine has no firewall - therefore all ports are open
- the firewall that limits the access is external, so it is the same in all cases

So how sould be installing a additional local firewall the solution? Add a firewall where never had been one, open all ports that have been already opened before at that place, and then ... I have the same set as before, the ports are open, but in a quite more difficult way.
:?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#11 2005-10-22 19:54:28

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: [unsolved] Bittorrent extremly slow

i agree, the solution is not installing more firewalls. if you already have one and it's not causing a slowdown in other distros then it shouldn't be causing a slowdown in arch. if there is a problem, i think it must be something to do with the arch bt package configuration or how arch is implementing python or something. i did some looking around, and it seems that other folks are getting 100, 150, 175+ bitrates, e.g.:
http://img373.imageshack.us/img373/4130 … ent9yz.jpg

one place even said ~240kbps bitrates were common with a proper configuration. i haven't used bittorrent a lot, but the highest i remember ever getting with arch is around 50-75kb, and that was surprising. most often it's in the 15-25kb range for a "good" torrent, and now even that is starting to sound too slow in comparison.

tonight or tomorrow i'll install bt on my laptop (slackware) and see what happens. i guess i could try knoppix there too. i have the same setup as Moo with all my computers behind a firewall and no individual firewalls, so it will be interesting to see if i get higher speeds w/the other two distros. i'm using the knoppix 4 dvd torrent from the link on http://www.knoppix.net/get.php as a test -- right now i'm getting 1.8kbps with 29 seeds and 16 peers, so that is pretty pathetic.

Offline

#12 2005-10-22 20:03:17

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: [unsolved] Bittorrent extremly slow

On those occasions that I've used bittorrent, I've never been able to get more than 15 KB/s.

The first time I used it, on Windows 98, when I was downloading a Slackware ISO, I got well over 200 KB/s.

Azureus is just as slow, so it isn't a problem with bittorrent. I have ports 6881 to 6999 all forwarded to public port 6881. I do not have iptable installed.

Something fishy is definitely going on here.

Offline

#13 2005-10-22 20:53:44

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: [unsolved] Bittorrent extremly slow

i just set up bittorrent on my webserver ( :shock:  lol ), forwarded the ports there, and it's not going any faster than arch (that's on debian, btw). if anything, it's a little slower, with about 30kbps right now compared to around 46 that arch got up to. (okay i just checked again, and it's at 39-40, so maybe it will just take a few more minutes to get up to its stable speed). the debian client doesn't tell you how many peers and seeds, either. mad

but it still seems a little slow. maybe in this case it's just the torrent (knoppix dvd)? if anyone knows of any torrents that are known to have good speeds, that might help.

------------------------------>
>>edit: okay, in the time it took me to reread that, the torrent on the debian box jumped up to 130kbps. that's definitely higher than i would ever get with arch, so i'm concluding until shown otherwise that there's a problem in arch somewhere. i'm going to give it a few more minutes to see how high it will go, and then switch the ports over to arch and see how high it goes. it seems to top out at around 45kbps.

btw, how to configure a firewall so all the clients behind it can use the same ports? on IPCop, it seems that only one client can be assigned any particular port. :?:

Offline

#14 2005-10-22 21:27:08

cs25x
Member
Registered: 2004-05-04
Posts: 150

Re: [unsolved] Bittorrent extremly slow

I use ctorrent and rtorrent. ctorrent is useless. rtorrent is slow, 10k is what i get on an exceptionally clear day. azureus is a bit slower than that. Right now I am getting 1.78k coming down the ADSL pipe. Some time back I checked speeds with 2 boxen side by side sucking the same file, one was on a 56k modem, the other adsl, both running Arch and azureus with the same settings. The result ? the 56k line was twice as fast as the adsl line. That was an extended test, not a snapshot it ran all afternoon and the dialup was at capacity all the time. So? i doubt if it is a firewall problem. I blamed the ISP, perhaps it is something to do with network or ethernet?  My question then is why ethernet should perform so poorly while ppp works so well??


--(*(cs25x--));

Offline

#15 2005-10-22 21:32:02

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: [unsolved] Bittorrent extremly slow

Okay, hate to ask, but...

Would someone here with access to a Win box try it on Windows, and compare the results to Linux?

Offline

#16 2005-10-22 22:53:55

sh__
Member
Registered: 2005-07-19
Posts: 272

Re: [unsolved] Bittorrent extremly slow

Hmm... no problem here. I get over 120k download rate in less than a minute with rtorrent.

[URL=http://img428.imageshack.us/my.php?image=knoptorr4ju.png]knoptorr4ju.th.png[/URL]

Some ISPs might throttle the ports bittorrent clients are using by default, but I suspect that is not the case here. A mystery indeed.

Offline

#17 2005-10-22 22:58:39

robot5x
Member
Registered: 2004-01-26
Posts: 266

Re: [unsolved] Bittorrent extremly slow

yes - I've also heard that many ISPs are throttling the 'normal' BT port range. May be worth using a higher port and seeing if that makes a difference. I use the stock arch bittorrent client and I regularly get speeds around 100kbps on well-seeded torrents.

Offline

#18 2005-10-22 23:20:56

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: [unsolved] Bittorrent extremly slow

Okay, I'll try incrementing the port numbers by 1000.

Offline

#19 2005-10-22 23:29:28

smoon
Member
Registered: 2005-08-22
Posts: 468
Website

Re: [unsolved] Bittorrent extremly slow

Tried that torrent as well and it started with 50K went up to 90 within 10 seconds and after about five minutes it's running around 350K which is almost the maximum for my connection. http://nooms.de/up/bittorrent.png. I had similar problems as you for quite a while though: Download speeds rarely went above 10K but I never figured out what was wrong, I just stopped trying to download stuff with Bittorrent and when I tried half a year or so later it was working well again.

Offline

#20 2005-10-22 23:36:43

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: [unsolved] Bittorrent extremly slow

70 KB/s right now. Took some time to get up to that speed though, and BT says I'm firewalled even though all the right ports are wide open. :?

Edit: 100 now. Doesn't seem to want to go past my max upload speed.

Edit 2: back down to 50 we go... gah, 30 now.

Edit 3: 15 KB/s, rapidly dropping back towards zero! And this is while peers with the same bandwidth or less are getting 400+... :shock:

Offline

#21 2005-10-23 07:27:29

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

I think I solved it, if the solution is not a security risk:

I compared /etc/sysctl.conf between ubuntu, knoppix and arch.
While the one of ubuntu and knoppix is emtpy, arch has several settings like:

#
# Kernel sysctl configuration
#

# Disable packet forwarding
net.ipv4.ip_forward=0

# Disable the magic-sysrq key
kernel.sysrq = 0

# Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies = 1

I just commended them out, and now I have downloads up to ... let me look ... 450 kb/s for files with a larger number of peers. Think this was it.

I am in doubt if this change could be a risk for security, but I am firewalled, you know.
Anyone wants to test the "solution"?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#22 2005-10-23 07:47:12

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: [unsolved] Bittorrent extremly slow

net.ipv4.ip_forward is whether or not to forward. If you have one box, with one interface, then you don't need to be forwarding packets, generally speaking (unless you are using Xen with ip bridging maybe).

kernel.sysrq...i believe that one is whether or not the kernel will listen for direct commands sent to it... useful in kernel debugging, but not safe for production..
http://howtos.linux.com/howtos/Remote-S … ysrq.shtml

tcp_syn cookies protects against syn flooding.
https://www.redhat.com/archives/fedora- … 00447.html

syncookies protection might induce a small amount of connection overhead, and a slightly higher cpu info..but i doubt it would make much of a difference.
I really doubt any of those settings would make the difference.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#23 2005-10-23 09:10:52

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: [unsolved] Bittorrent extremly slow

Then it was just a small moment of luck? Damn.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#24 2005-10-23 09:40:34

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [unsolved] Bittorrent extremly slow

I'm getting 145KB/s at the moment. My client can see 70 seeds and 9 peers. It took a little over 5 mins to get to that speed. I'm on 2Mb/128kb DSL, and I've set up my own port range.

For anyone getting slow speeds, and assuming your ports are set up correctly, have you limited the amount of upload that your client can use? If you don't do this, bittorrent will swamp your upload, and this will have a corresponding effect on your download. 75-80% of upload is generally recommended.

slackhack wrote:

btw, how to configure a firewall so all the clients behind it can use the same ports? on IPCop, it seems that only one client can be assigned any particular port. :?:

slackhack - remember your traffic is two way. Think of a request sent from one of your boxes, through the forwarded port, and out to the net, and then consider the response coming back from the net, into the forwarded port, and back to the requesting box - it will only get back to where it started from if the port is forwarded to one box only. If you could forward it to a range, how would the response know where to go?

<update>
Now over 160KB/s, 75 seeds, 5 peers.

<update2>
The download of 350MB finished in 43 minutes, which gives an average of 142KB/s.

Offline

#25 2005-10-23 15:01:08

slackhack
Member
Registered: 2004-06-30
Posts: 738

Re: [unsolved] Bittorrent extremly slow

tomk wrote:
slackhack wrote:

btw, how to configure a firewall so all the clients behind it can use the same ports? on IPCop, it seems that only one client can be assigned any particular port. :?:

slackhack - remember your traffic is two way. Think of a request sent from one of your boxes, through the forwarded port, and out to the net, and then consider the response coming back from the net, into the forwarded port, and back to the requesting box - it will only get back to where it started from if the port is forwarded to one box only. If you could forward it to a range, how would the response know where to go?

i get that, thanks, but i never thought about it before having more than one computer. for example, say a network has 100 computers on it, 192.168.0.100 - .199. port 6881 is forwarded for 192.168.0.100. that means only one computer on the network can use bittorrent and none of the others can? no, but why not? i don't get the reasoning of forwarding a port to a particular computer if the other computers can use it anyway. :?:

about the speed issue, on further testing i think we're all being too paranoid. last night i tried the knoppix download again, and after 5-10 minutes i started getting speeds close to 350kpbs. so i think it must just be a question of the particular torrent being slow at any particular time, or some other external factor. the fact that Moo got 450 also seems to suggest that it's nothing specifically to do with arch (to me, anyway, although not knowing much about BT i could be totally wrong big_smile ).

Offline

Board footer

Powered by FluxBB