# no internet when bittorrent runs [solved]

## tane_stelzer

Okay here is my problem, i have a router where 2 laptops are connected to via wifi. One is Gentoo and the other is windows xp. Whenever i or my flatmate start to donwload via bittorrent , the whole internet crashes except BT. Now i would like to decrease the amount of bandwidth( i am not sure if this is the word)which goes towards bt. We boths would like to use bt and surf the internet at the same time. But at the moment that is not possible. I have had a look around in the forums there seem to ve similar problems around but no real solution. Is there some kind of programm which can decrease the bandwidth which BT gets? 

Tane

----------

## Aonoa

There are a lot of routers that do not like the amount of traffic that BT creates, I think a lot would be done by just limiting the amount of connections you allow your client to make. Which BT client(s) are you using?

EDIT: An example for the python bittorrent client.

```
btdownloadcurses.py --max_connections 5 --max_upload_rate 40 --max_uploads 3 something.torrent
```

----------

## tane_stelzer

I use rufus it is not in portage, but it is a very good client. I have turned the port range from 6881 to 6882, how many ports should i allow. my frd on windows uses Bitcomet shall i turn down the amount of ports too???

EDIT: My frd said even with these low ports the internet still crashes. What should i do now?

----------

## PunkSC

Bittorrent use a lot of simultaneous connections, this should be crashing your connection. What i do is use a shaper script, like wshaper (http://lartc.org/wondershaper/) to give low priority to bittorrent packets, and give high priority to the usual traffic (http, ftp, etc). So u can user internet and bittorrent at the same time.

The default wshaper script isnt made specifically to bittorrent. You can achieve best results adding your own rules. 

I can suggest, from my own script, you add this rules to the default wshaper:

```

#Port 80 Traffic (HTTP) goes to the High Priority Class

iptables -t mangle -A FORWARD -p tcp --dport 80 -j MARK --set-mark 0x1

iptables -t mangle -A FORWARD -p tcp --dport 80 -j RETURN

#Bittorrent traffic goes to the Lowest Priority Class (If bittorent use port 6880 to 6888)

iptables -t mangle -A FORWARD -p tcp --dport 6880:6888 -j MARK --set-mark 0x3

iptables -t mangle -A FORWARD -p tcp --dport 6880:6888 -j RETURN

```

Of course this rules are made for my gateway server... thats why it uses the FORWARD mark. If you set this in your own computer, you need to change the FORWARD for OUTPUT.

Well.. this is just a start point. Took me about a month to figure out how to make all this things to work... but worth the effort!  :Very Happy: 

----------

## tane_stelzer

okay from the sound of it this is what i am looking for but er 1 month to get the script up and running, that sounds a bit harsh. Err I just use a normal router. Hmm nth special, well i will surely give it a try is it in portage?

EDIT: I was wondering if the internet would be a bit better if one of us would connect with cable and the other via wireless? is that an option?

----------

## Aonoa

I've never used rufus and could not say what specific options you should use with it. However, the ports used 6881-6889 has nothing to do with it, you have to limit the amount of connections it makes. Also, try setting a low upload rate like 10kBit/second.

----------

## tane_stelzer

OKay i turned down the no of connections from 50 to 5 but still everything stops, i had a look at wondershaper, i said that sth about a linux router, so does that mean i need a linux router, cos i dont have one, another thing is that i dont have a clue how to configure the script, is there somekind of how to which explains everything??

Thx a lot for the replies,

Tane

----------

## PunkSC

Sorry if i scared you with the "1 month" history. I took that long to understand how wshaper works and write my own rules. Use wondershaper with default configuration is pretty easy. 

In your case, since you dont have a linux router, wshaper can help only the bittorrent running under your linux laptot. But there is similar softwares to windows you can use under windows xp.

If you wanna give a try to wshaper under your linux laptop, here are the instructions:

Download http://lartc.org/wondershaper/wondershaper-1.1a.tar.gz, find the file "wshaper" and edit the file:

```

#Put here 85% of you download speed, in kbits/sec (If you have 1 Mbit connection, put 850 here)

DOWNLINK=850

#Put here 70% of your upload speed. If you have 512 Kbits/sec, put 420 herhe

UPLINK=420

#Put here the device you use to connect to internet. IN your case, its the wan device. In my case, its ppp0:

DEV=ppp0

```

Comment this lines:

```

#echo Please read the documentation in 'README' first :-\)

#exit

```

You are done! now:

chmod +x wshaper

and run wshaper:

./wshaper

Note: The Download/upload speeds you should configure is the speeds of your internet connection, not the speed between your laptop and the router...

The values of 85% and 70% get the best results here. You can change it if you want, but always set them a little less then your connection speeds. Trust me: You lose 15% of your download speed, but you will REALLY use the others 85% of the line  :Wink: 

----------

## tane_stelzer

and what about the rules you stated in the first post, add thos to the end?? and can i just add it to the init.d script??

and how can i find out the upload speed?? i only know the download is 2 Mbs.

thanks a lot 

Tane

----------

## tane_stelzer

Well i did what you said downloaded the file ,extracted it and changed the wshaper file. I start it and get this error.

```
tane@Dream Machine ~/wondershaper-1.1a $ ./wshaper

./wshaper: line 53: tc: command not found

./wshaper: line 59: tc: command not found

./wshaper: line 64: tc: command not found

./wshaper: line 70: tc: command not found

./wshaper: line 75: tc: command not found

./wshaper: line 79: tc: command not found

./wshaper: line 80: tc: command not found

./wshaper: line 81: tc: command not found

./wshaper: line 85: tc: command not found

./wshaper: line 90: tc: command not found

./wshaper: line 95: tc: command not found

./wshaper: line 117: tc: command not found

./wshaper: line 129: tc: command not found

./wshaper: line 140: tc: command not found

./wshaper: line 145: tc: command not found

./wshaper: line 149: iptables: command not found

./wshaper: line 150: iptables: command not found

./wshaper: line 153: iptables: command not found

./wshaper: line 154: iptables: command not found

```

i tried running as a root i get the same error but the iptables error dont appear.

now here is my wshaper file maybe i am just missing sth very obvious here

```
#!/bin/bash 

# Wonder Shaper

# please read the README before filling out these values 

#

# Set the following values to somewhat less than your actual download

# and uplink speed. In kilobits. Also set the device that is to be shaped.

DOWNLINK=1930

UPLINK=159

DEV=eth1

# low priority OUTGOING traffic - you can leave this blank if you want

# low priority source netmasks

NOPRIOHOSTSRC=80

# low priority destination netmasks

NOPRIOHOSTDST=

# low priority source ports

NOPRIOPORTSRC=

# low priority destination ports

NOPRIOPORTDST=

# Now remove the following two lines :-)

#echo Please read the documentation in 'README' first :-\)

#exit

#########################################################

if [ "$1" = "status" ]

then

   tc -s qdisc ls dev $DEV

   tc -s class ls dev $DEV

   exit

fi

# clean existing down- and uplink qdiscs, hide errors

tc qdisc del dev $DEV root    2> /dev/null > /dev/null

tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null

if [ "$1" = "stop" ] 

then 

   exit

fi

###### uplink

# install root CBQ

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit 

# shape everything at $UPLINK speed - this prevents huge queues in your

# DSL modem which destroy latency:

# main class

tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit \

allot 1500 prio 5 bounded isolated 

# high prio class 1:10:

tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit \

   allot 1600 prio 1 avpkt 1000

# bulk and default class 1:20 - gets slightly less traffic, 

#  and a lower priority:

tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit \

   allot 1600 prio 2 avpkt 1000

# 'traffic we hate'

tc class add dev $DEV parent 1:1 classid 1:30 cbq rate $[8*$UPLINK/10]kbit \

   allot 1600 prio 2 avpkt 1000

# all get Stochastic Fairness:

tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10

tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10

# start filters

# TOS Minimum Delay (ssh, NOT scp) in 1:10:

tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \

      match ip tos 0x10 0xff  flowid 1:10

# ICMP (ip protocol 1) in the interactive class 1:10 so we 

# can do measurements & impress our friends:

tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 \

        match ip protocol 1 0xff flowid 1:10

# prioritize small packets (<64 bytes)

tc filter add dev $DEV parent 1: protocol ip prio 12 u32 \

   match ip protocol 6 0xff \

   match u8 0x05 0x0f at 0 \

   match u16 0x0000 0xffc0 at 2 \

   flowid 1:10

# some traffic however suffers a worse fate

for a in $NOPRIOPORTDST

do

   tc filter add dev $DEV parent 1: protocol ip prio 14 u32 \

      match ip dport $a 0xffff flowid 1:30

done

for a in $NOPRIOPORTSRC

do

    tc filter add dev $DEV parent 1: protocol ip prio 15 u32 \

      match ip sport $a 0xffff flowid 1:30

done

for a in $NOPRIOHOSTSRC

do

    tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \

      match ip src $a flowid 1:30

done

for a in $NOPRIOHOSTDST

do

    tc filter add dev $DEV parent 1: protocol ip prio 17 u32 \

      match ip dst $a flowid 1:30

done

# rest is 'non-interactive' ie 'bulk' and ends up in 1:20

tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \

   match ip dst 0.0.0.0/0 flowid 1:20

########## downlink #############

# slow downloads down to somewhat less than the real speed  to prevent 

# queuing at our ISP. Tune to see how high you can set it.

# ISPs tend to have *huge* queues to make sure big downloads are fast

#

# attach ingress policer:

tc qdisc add dev $DEV handle ffff: ingress

# filter *everything* to it (0.0.0.0/0), drop everything that's

# coming in too fast:

tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \

   0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1

#Port 80 Traffic (HTTP) goes to the High Priority Class

iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK --set-mark 0x1

iptables -t mangle -A OUTPUT -p tcp --dport 80 -j RETURN

#Bittorrent traffic goes to the Lowest Priority Class (If bittorent use port 6881 to 6999)

iptables -t mangle -A OUTPUT -p tcp --dport 6881:6999 -j MARK --set-mark 0x3

iptables -t mangle -A OUTPUT -p tcp --dport 6881:6999 -j RETURN

```

I hope you can solve my problem you have been a great help so far thx a lot

Tane

----------

## PunkSC

Looks like you dont have tc installed. just do a: "emerge iproute2". Try it and test the script.

About your upload speed, try to set upload speed to 150kbits/sec just for testing purposes. If your problem is gone you can worry about finding the real value of your upload speed  :Smile: 

To run the commands i said on my first post you will need iptables too so, "emerge iptables" too.

Some kernel options may be necessary to run iptables. Its a good choice to say YES at least to CONFIG_IP_NF_IPTABLES, CONFIG_IP_NF_MATCH_MARK, CONFIG_IP_NF_MATCH_STATE, CONFIG_IP_NF_MATCH_CONNTRACK,CONFIG_IP_NF_MANGLE, CONFIG_IP_NF_ARPFILTER and CONFIG_IP_NF_ARP_MANGLE.

Here is my Network kernel configuration that can help you if you decide to recompile your kernel. I selected a LOT of things cause the main job of my linux box is do networking  :Very Happy: 

```
# Networking options

#

CONFIG_PACKET=y

CONFIG_PACKET_MMAP=y

CONFIG_UNIX=y

CONFIG_XFRM=y

CONFIG_XFRM_USER=m

# CONFIG_NET_KEY is not set

CONFIG_INET=y

CONFIG_IP_MULTICAST=y

CONFIG_IP_ADVANCED_ROUTER=y

CONFIG_ASK_IP_FIB_HASH=y

# CONFIG_IP_FIB_TRIE is not set

CONFIG_IP_FIB_HASH=y

CONFIG_IP_MULTIPLE_TABLES=y

CONFIG_IP_ROUTE_FWMARK=y

CONFIG_IP_ROUTE_MULTIPATH=y

CONFIG_IP_ROUTE_MULTIPATH_CACHED=y

CONFIG_IP_ROUTE_MULTIPATH_RR=m

CONFIG_IP_ROUTE_MULTIPATH_RANDOM=m

CONFIG_IP_ROUTE_MULTIPATH_WRANDOM=m

CONFIG_IP_ROUTE_MULTIPATH_DRR=m

CONFIG_IP_ROUTE_VERBOSE=y

CONFIG_IP_PNP=y

CONFIG_IP_PNP_DHCP=y

# CONFIG_IP_PNP_BOOTP is not set

# CONFIG_IP_PNP_RARP is not set

CONFIG_NET_IPIP=m

CONFIG_NET_IPGRE=m

# CONFIG_NET_IPGRE_BROADCAST is not set

CONFIG_IP_MROUTE=y

CONFIG_IP_PIMSM_V1=y

CONFIG_IP_PIMSM_V2=y

# CONFIG_ARPD is not set

# CONFIG_SYN_COOKIES is not set

# CONFIG_INET_AH is not set

# CONFIG_INET_ESP is not set

# CONFIG_INET_IPCOMP is not set

CONFIG_INET_TUNNEL=m

CONFIG_INET_DIAG=y

CONFIG_INET_TCP_DIAG=y

# CONFIG_TCP_CONG_ADVANCED is not set

CONFIG_TCP_CONG_BIC=y

#

# IP: Virtual Server Configuration

#

# CONFIG_IP_VS is not set

# CONFIG_IPV6 is not set

CONFIG_NETFILTER=y

# CONFIG_NETFILTER_DEBUG is not set

#

# Core Netfilter Configuration

#

CONFIG_NETFILTER_NETLINK=m

CONFIG_NETFILTER_NETLINK_QUEUE=m

# CONFIG_NETFILTER_NETLINK_LOG is not set

#

# IP: Netfilter Configuration

#

CONFIG_IP_NF_CONNTRACK=y

CONFIG_IP_NF_CT_ACCT=y

CONFIG_IP_NF_CONNTRACK_MARK=y

# CONFIG_IP_NF_CONNTRACK_EVENTS is not set

# CONFIG_IP_NF_CT_PROTO_SCTP is not set

CONFIG_IP_NF_FTP=m

CONFIG_IP_NF_IRC=m

# CONFIG_IP_NF_NETBIOS_NS is not set

CONFIG_IP_NF_TFTP=m

# CONFIG_IP_NF_AMANDA is not set

CONFIG_IP_NF_PPTP=m

CONFIG_IP_NF_QUEUE=y

CONFIG_IP_NF_IPTABLES=y

CONFIG_IP_NF_MATCH_LIMIT=y

CONFIG_IP_NF_MATCH_IPRANGE=y

CONFIG_IP_NF_MATCH_MAC=y

CONFIG_IP_NF_MATCH_PKTTYPE=y

CONFIG_IP_NF_MATCH_MARK=y

CONFIG_IP_NF_MATCH_MULTIPORT=y

CONFIG_IP_NF_MATCH_TOS=y

CONFIG_IP_NF_MATCH_RECENT=y

CONFIG_IP_NF_MATCH_ECN=y

CONFIG_IP_NF_MATCH_DSCP=y

CONFIG_IP_NF_MATCH_AH_ESP=y

CONFIG_IP_NF_MATCH_LENGTH=y

CONFIG_IP_NF_MATCH_TTL=y

CONFIG_IP_NF_MATCH_TCPMSS=y

CONFIG_IP_NF_MATCH_HELPER=y

CONFIG_IP_NF_MATCH_STATE=y

CONFIG_IP_NF_MATCH_CONNTRACK=y

CONFIG_IP_NF_MATCH_OWNER=y

# CONFIG_IP_NF_MATCH_ADDRTYPE is not set

# CONFIG_IP_NF_MATCH_REALM is not set

# CONFIG_IP_NF_MATCH_SCTP is not set

# CONFIG_IP_NF_MATCH_DCCP is not set

# CONFIG_IP_NF_MATCH_COMMENT is not set

# CONFIG_IP_NF_MATCH_CONNMARK is not set

# CONFIG_IP_NF_MATCH_CONNBYTES is not set

# CONFIG_IP_NF_MATCH_HASHLIMIT is not set

# CONFIG_IP_NF_MATCH_STRING is not set

CONFIG_IP_NF_FILTER=y

CONFIG_IP_NF_TARGET_REJECT=y

CONFIG_IP_NF_TARGET_LOG=y

CONFIG_IP_NF_TARGET_ULOG=y

CONFIG_IP_NF_TARGET_TCPMSS=y

# CONFIG_IP_NF_TARGET_NFQUEUE is not set

CONFIG_IP_NF_NAT=y

CONFIG_IP_NF_NAT_NEEDED=y

CONFIG_IP_NF_TARGET_MASQUERADE=y

CONFIG_IP_NF_TARGET_REDIRECT=y

CONFIG_IP_NF_TARGET_NETMAP=y

CONFIG_IP_NF_TARGET_SAME=y

# CONFIG_IP_NF_NAT_SNMP_BASIC is not set

CONFIG_IP_NF_NAT_IRC=m

CONFIG_IP_NF_NAT_FTP=m

CONFIG_IP_NF_NAT_TFTP=m

CONFIG_IP_NF_NAT_PPTP=m

CONFIG_IP_NF_MANGLE=y

CONFIG_IP_NF_TARGET_TOS=y

CONFIG_IP_NF_TARGET_ECN=y

CONFIG_IP_NF_TARGET_DSCP=y

CONFIG_IP_NF_TARGET_MARK=y

CONFIG_IP_NF_TARGET_CLASSIFY=y

# CONFIG_IP_NF_TARGET_TTL is not set

CONFIG_IP_NF_TARGET_CONNMARK=y

# CONFIG_IP_NF_TARGET_CLUSTERIP is not set

CONFIG_IP_NF_RAW=m

CONFIG_IP_NF_TARGET_NOTRACK=m

CONFIG_IP_NF_ARPTABLES=y

CONFIG_IP_NF_ARPFILTER=y

CONFIG_IP_NF_ARP_MANGLE=y
```

Thats it. Any problem, just post here  :Smile: 

----------

## tane_stelzer

i have checked and everything you have mentioned is in the kernel, i have emerged iptable and iroute2, as normal user i still get the same error, but as root i get this error

```
root@Dream Machine wondershaper-1.1a # ./wshaper

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

RTNETLINK answers: Invalid argument

RTNETLINK answers: Invalid argument

We have an error talking to the kernel

```

I am really bad at figuring out things related to networking, its just not my area, i hope you could help me again.

Thx alot for the help so far

Tane

----------

## PunkSC

Probably your kernel dont support QOS. I was searching the kernel option to support QOS and found this page in wiki:

http://www.de.gentoo-wiki.com/HOWTO_Packet_Shaping

There you can find the needed modules and a very good guide about shaping. Take a look.

----------

## tane_stelzer

Okay i had a read through this, it was quite interesting, but it was saying again that i would need a linux router or? Or can i just configure everything on my laptop and that rules will then just be for me? Well about the kernel. I had a look and nearly everything that this HOWTO mentioned is compiled, just i wasnt able to find these ones

```

QoS and/or fair queueing  --->

      <M>   HTB packet scheduler

      <M>   SFQ queue

      [*]   QoS support

      [*]     Rate estimator

      [*]   Packet classifier API

    <M> Firewall based classifier

    
```

I can see QoS and/or fair queueing  ---> but everything i need is not in there. The guide said that this is for Kernel 2.6.14 and above. Well i am using 2.6.15 and they are not in there?? Where else could i look to fine these options( is that the right word). I had a look around and also googled around but didnt find anything.

Thx so much for everything you have been a real help.  :Very Happy: 

Tane

EDIT: I forgot to mention this, i added one or 2 things into the kernel the things that i could find, after compile and cp to /boot , i rebooted, and once i typed dhcpcd eth1 my system completly crashes. Everything just freezes. I think it must be realated to the kernel?   :Question: 

Tane

----------

## converter

 *tane_stelzer wrote:*   

> Okay i had a read through this, it was quite interesting, but it was saying again that i would need a linux router or? Or can i just configure everything on my laptop and that rules will then just be for me? Well about the kernel. I had a look and nearly everything that this HOWTO mentioned is compiled, just i wasnt able to find these ones
> 
> 

 

Build yourself a router/firewall.

Scrounge up a decent old box (PIII or better) with 128 meg of RAM and a couple decent NICs (Intel is best in this case, Realtek is worst) and install pfsense on it, then configure traffic shaping (it's a simple wizard-based configuration). Works a charm for us--it's cheap, easy to configure, and low-maintenance.

----------

## tane_stelzer

@converter: the problem is that i am already very short of space and i havent got that much time atm, that might a project which i would like to do over summer, after having thrown away old this useless junk in my flat. but  it sure sounds interesting and i will improve my knowledge about networking, but for now i have to use my cheap etec router. and get my bt running with normal surfing hehe but thx for the advice i will get back once i will do that  :Wink: 

Tane

----------

## agent_jdh

I've just had a look over this thread, and you've indicated you don't know what your upload link speed is, and you've made no mention of whether you've tried to use your bittorrent client to limit how much of that upload bandwidth bt will use.

BT clients _will_ saturate your uplink unless you throttle them.  Traffic shaping can do it, but it's an overly complex solution for what is a fairly straightforward problem.

To find out your uplink bandwidth - have you tried contacting your ISP?  Alternatively, does your adsl router have a web based interface you can browse to?  I presume you've already done this to enable port forwarding to your boxes actually running BT, or else it will operate slowly (it will work, but not optimally, as remote connections cannot be initialised).

I would imagine that with a 2Mbps d/l link, your uplink speed will be 256kbps, or 32kB/s.  Obviously with TCP overheads you can't realise this, so a sensible rate to limit your BT client to (and this is a global limit) would be 20 or 22kB/s.  Limiting the number of connections (like you've already done) will help with some routers too.

That limit would apply to all of your BT clients, so if you are running multiple torrents for example 4, you'd need to divide that figure by 4 to set your limit per torrent.  It would be much easier to use a GUI based BT client that allowed you to set a global upload rate, and also allow you to alter it on-the-fly.  The latest v4 series of BitTorrent allows this, as do clients like Azureus.

----------

## tane_stelzer

I tried limiting my number of connections but that still crashed my internet, so i think this wont work for my router.

I use Talk Talk broadband(since you live in scotland i assume you know what i am talking about), and i havent tried to contact them but i will give that a shot tmr, to find out my uplink speed.

Now i dont quite understand what i have to do to lower the uplink speed of BT, so does that mean i should change my BT client where it is possible to change? And what are TCP overheads? Well i wouldnt like to change to azureus cos it just slows down my computer a lot, so is the v4 BitTorrent the best solution? 

Oh and my router does have a web based interface.

Thx for your reply but i am still quite confused about what you were talking about. Could you please explain in more detail.

Thx a lot

Tane

----------

## agent_jdh

 *tane_stelzer wrote:*   

> I tried limiting my number of connections but that still crashed my internet, so i think this wont work for my router.
> 
> I use Talk Talk broadband(since you live in scotland i assume you know what i am talking about), and i havent tried to contact them but i will give that a shot tmr, to find out my uplink speed.
> 
> Now i dont quite understand what i have to do to lower the uplink speed of BT, so does that mean i should change my BT client where it is possible to change? And what are TCP overheads? Well i wouldnt like to change to azureus cos it just slows down my computer a lot, so is the v4 BitTorrent the best solution? 
> ...

 

You can probably assume your upload is 256kbps, so in your BT client, try setting the max upload speed to 20 or 22 kB/s.

TCP overhead is just the extra data (all the SYN and ACK stuff) that actually controls the flow of data to and from your machine.  I wouldn't worry too much about it.  Just bear in mind you need to leave some uplink bandwidth for that and normal browsing etc.  Saturating your uplink is the best way to get the internet to crawl to a standstill for you.  It looks like that is probably what is happening.

BT v4 client (I'm actually using that now here, used to use BitTornado, and I agree with you about Azureus) has a slider on the main screen that lets you select your upload speed.  Mine is currently set to 22KB/s on my 256kbps uplink (2 meg down here too).

The web client interface for your router might have a section telling you what your up/down connection speed is, but I don't know your router so I can't help with that.  My router tells me on its "front page" as it were.

Just play around with the global uplink rate on your BT client and see how you get on.

----------

## tane_stelzer

Yeah i checked and on my router it does say the uplink speed or at least i think here is what it says 

```
DSL Speed:     288/2272kbps
```

 so i assume it is waht you said it is.

Well i will have a bash at v4 BitTorrent once my OpenOffice finished compiling   :Laughing:  just takes to long.....

Okay thx very much for your help, i will tell you how everything went once i can

Tane

----------

## tane_stelzer

OKay i think it worked fine i am still testing everything, i was wondering if the value for my uplink speed will affect my download speed??

thx very much for that( i will wait another day or so until i put solved into the title)

Tane

----------

## agent_jdh

 *tane_stelzer wrote:*   

> OKay i think it worked fine i am still testing everything, i was wondering if the value for my uplink speed will affect my download speed??
> 
> thx very much for that( i will wait another day or so until i put solved into the title)
> 
> Tane

 

As long as I don't set the BT client upload too high I don't notice any adverse affect on download speed, either on torrents downloading or on other files e.g. d/l from Firefox or updating Gentoo.

Remember to get the best out of BT you'll need to configure port forwarding on your router ... but that's a whole other topic.

----------

## tane_stelzer

well i forwarded all the port which BT could use at least which 6881-6999.

i can confirm now that everything works perfectly fine i still download rates of 100 -200 kbs with direct downloads, still surf the web and bt downloads at speeds of 26 atm

Thx so much

Tane

----------

## agent_jdh

 *tane_stelzer wrote:*   

> well i forwarded all the port which BT could use at least which 6881-6999.
> 
> i can confirm now that everything works perfectly fine i still download rates of 100 -200 kbs with direct downloads, still surf the web and bt downloads at speeds of 26 atm
> 
> Thx so much
> ...

 

Remember, if your flatmate has a different machine, you'll need to set up different ports on his BT client and use the router to forward those ports to his box, e.g. you use ports 6881-6889, he uses ports 6891-6899.  If your router uses dhcp it can be quite hard to guarantee this, so you may want to use fixed ip addresses for your machines that are outwith the range of your router's dhcp server.  Mine runs dhcp for ip addresses 192.168.0.1 -> 192.168.0.34 (iirc), so I've set my fixed ip to 192.168.0.35.  Works fine.

----------

## tane_stelzer

Yeah i know thos are all the port i just forwarded but split onto 2 machinese hehe  :Very Happy: 

but thx

tane

----------

