You are not logged in.
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
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
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
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
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
and you have 6881-6999 forwarded?
Offline
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
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
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
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
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
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
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
i just set up bittorrent on my webserver ( :shock: ), 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.
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
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
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
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][/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
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
Okay, I'll try incrementing the port numbers by 1000.
Offline
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
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
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
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
Then it was just a small moment of luck? Damn.
Frumpus ♥ addict
[mu'.krum.pus], [frum.pus]
Offline
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.
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
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 ).
Offline