Loading ...
Sorry, an error occurred while loading the content.

Re: [dubailug] Speeding Bittorent

Expand Messages
  • Dirk Tilger
    ... Opposite to the other networks, there is a central component in Bittorrent that manages the data transfers. This guys is called the tracker . There
    Message 1 of 19 , Oct 1, 2005
    • 0 Attachment
      --- aLT WiZard <altwizzy@...> wrote:
      > You got me wrong, I get better downloads on windows :p Im trying to
      > download
      > opensuse using debian and windows . Windows gives me btter download
      > rates
      > for the same file :(

      Opposite to the other networks, there is a central component in
      Bittorrent that manages the data transfers. This guys is called 'the
      tracker'. There tracker usually resides on the server that hosts the
      .torrent and is mentioned in it.

      The tracker collects statistics from your peers to weighten your
      upload- and download power. When there are not many peers that have the
      file complete, the tracker will hardly allow you to download more than
      you upload. But there is usually a small bandwidth left that is given
      to you on a generous basis.

      So when for some reason (firewall, etc.) some clients cannot reach you,
      you'll be assumed being an egoist who does not share and your bandwidth
      will get limited.

      Dirk.
    • Dirk Tilger
      ... I m using mldonkey on a 64kbit line and my bandwidth is always utilized. Oh: Another thing comes just to my mind. You should also make sure, that you limit
      Message 2 of 19 , Oct 1, 2005
      • 0 Attachment
        Sean Craig wrote:
        > I use Azureus which is Java based, and I get pretty good rates if
        > Iconnect to decent peers.

        I'm using mldonkey on a 64kbit line and my bandwidth is always
        utilized.

        Oh: Another thing comes just to my mind. You should also make sure,
        that you limit your bandwidth in your client to a value slightly lower
        than your actual bandwidth.

        This is because a TCP connection (most Internet connections are TCP)
        sends an acknowledgement for every packet. TCP tries to learn somehow
        your bandwidth so that it can transmit without loosing packets (because
        they don't fit through the line) and it does that also by taking those
        acknowledgement packets into account. The slower these ACK packets are
        coming the slower will the connection be rated.

        Now when you utilize your whole bandwidth these ACK packets are
        candidates to be dropped from time to time. When you up- and download
        these ACK packets flow in both directions. When you download with the
        full bandwidth these packets are candidates to be dropped at your
        provider and when you upload with full bandwidth they will be dropped
        by your computer. It gets even more worse when you have ADSL that
        further disturbs this by queueing the packets before transmission.

        For the uploads, those dropped ACK packets make your peer think it is
        sending too fast, because it might be also that not the acknowledgement
        ("Yes I got it") of the message was dropped, but the message itself.
        The usual reaction is limiting its bandwidth. But that doesn't help,
        because you still utilize your download bandwidth fully. So it
        decreases sending power further...

        Limit the bandwidth.

        Dirk.
      • Brad Campbell
        ... Grab htb tools and set yourself up some QoS configs. By proper queue s and packet classification you can *ensure* that acks going upstream *never* get
        Message 3 of 19 , Oct 1, 2005
        • 0 Attachment
          Dirk Tilger wrote:

          > For the uploads, those dropped ACK packets make your peer think it is
          > sending too fast, because it might be also that not the acknowledgement
          > ("Yes I got it") of the message was dropped, but the message itself.
          > The usual reaction is limiting its bandwidth. But that doesn't help,
          > because you still utilize your download bandwidth fully. So it
          > decreases sending power further...

          Grab htb tools and set yourself up some QoS configs.
          By proper queue's and packet classification you can *ensure* that acks going upstream *never* get
          dropped and get out the pipe first. This makes for great downloads :p)

          QoS is a bit of black magic if you have never configured it previously, but the combination of tc
          for setting up your queues and iptables for classifying packets is immensely powerful.

          Here I have 4 queues.

          -Acks
          -SSH traffic / ICMP packets
          -Other service related traffic - dns/ntp/...blah
          -The rest (which generally is all my p-t-p traffic (this is a default catch all bucket)

          And the traffic is prioritised and sent out in that order.
          In addition, I rate limit my outgoing at 10kbit/s slower than my maximum acheivable speed.
          Etisalat seems to control your bandwidth speed via external limiting rather than limiting the actual
          connection, so I can squirt about 512kbit/s upi my ADSL, but only about 380k/s actually gets out to
          the world, the rest gets dropped somewhere. By process of experimentation (continuous pings from an
          outside server) I determined that about 360k/s is about the maximum I can squeeze through my pipe
          without a) losing packets, and b) having huge laggy queues in the modem/upstream router.

          So by rate limiting my outgoing to 360k/s (not to bad for a 256k uplink!) I never drop a vital
          packet (I do drop p-t-p outgoing packets, but I do it before my modem) and I ensure the fastest
          round trip times for stuff that requires good latency (ntp/ssh).
          QoS is certainly worth looking at if you have heavily utilised links. My ADSL outbound is saturated
          24/7 and with QoS I can ssh in from the outside world, tunnel VNC over ssh and always have great
          response times. without QoS it was almost unusable. In addition, I don't drop outbound acks anymore
          and my downloads are quicker.

          As for bittorent.... I use azureus, and get great speeds if I'm connected to a decent swarm. Most
          stuff I download these days is botique and has small swarms, it can take daaaaays/weeks/months to
          get some stuff..
          Having said that, I also use gtk-gnutella and might have the same file download 7 or 8 times
          completely before a fully correct version happens, so bittorent has a lot going for it in not
          wasting bandwidth and ensuring a good download every time.

          Perhaps QoS should be the topic of a future workshop session.

          --
          "Human beings, who are almost unique in having the ability
          to learn from the experience of others, are also remarkable
          for their apparent disinclination to do so." -- Douglas Adams
        • Dirk Tilger
          ... Great idea. Take me on there (as your co-tutor). Dirk.
          Message 4 of 19 , Oct 1, 2005
          • 0 Attachment
            --- Brad Campbell <brad@...> wrote:
            > Perhaps QoS should be the topic of a future workshop session.

            Great idea. Take me on there (as your co-tutor).

            Dirk.
          • aLT WiZard
            thanks for the replies, I also use azureus, I noticed that the smiley face on the left which indicates the health of the torrent is mostly yelllow suggesting
            Message 5 of 19 , Oct 1, 2005
            • 0 Attachment
              thanks for the replies,
              I also use azureus,  I noticed that the smiley face on the left which indicates the "health" of the torrent is mostly yelllow suggesting a NAT problem.  I am using port 6882 which azureus says is ok.   I have also disabled the firewall by guarddog
              (echo "Resetting firewall rules."
              ipchains -P output ACCEPT
              ipchains -P input ACCEPT
              ipchains -P forward ACCEPT
              ipchains -F forward
              ipchains -F input
              ipchains -F output
              fi
              if [ $FILTERSYS -eq 2 ]; then
              echo "Using iptables."
              echo "Resetting firewall rules."
              iptables -P OUTPUT ACCEPT
              iptables -P INPUT ACCEPT
              iptables -P FORWARD ACCEPT
              iptables -F FORWARD
              iptables -F INPUT
              iptables -F OUTPUT
              fi;
              echo "Finished."
              )
              But Im still not getting the desired rates.


              On 10/1/05, Dirk Tilger <dirk@...> wrote:
              --- Brad Campbell <brad@...> wrote:
              > Perhaps QoS should be the topic of a future workshop session.

              Great idea. Take me on there (as your co-tutor).

              Dirk.


              SPONSORED LINKS
              Linux operating system Linux os Hosting linux unix web
              Free linux operating system Linux migration Linux user


              YAHOO! GROUPS LINKS




            • aLT WiZard
              Brad, I seriously gotta larn more linux, im a noob, no idea on qos thing, I ll check google :D
              Message 6 of 19 , Oct 1, 2005
              • 0 Attachment
                Brad,
                I seriously gotta larn more linux, im a noob, no idea on qos thing, I'll check google  :D

                On 10/2/05, aLT WiZard < altwizzy@...> wrote:
                thanks for the replies,
                I also use azureus,  I noticed that the smiley face on the left which indicates the "health" of the torrent is mostly yelllow suggesting a NAT problem.  I am using port 6882 which azureus says is ok.   I have also disabled the firewall by guarddog
                (echo "Resetting firewall rules."
                ipchains -P output ACCEPT
                ipchains -P input ACCEPT
                ipchains -P forward ACCEPT
                ipchains -F forward
                ipchains -F input
                ipchains -F output
                fi
                if [ $FILTERSYS -eq 2 ]; then
                echo "Using iptables."
                echo "Resetting firewall rules."
                iptables -P OUTPUT ACCEPT
                iptables -P INPUT ACCEPT
                iptables -P FORWARD ACCEPT
                iptables -F FORWARD
                iptables -F INPUT
                iptables -F OUTPUT
                fi;
                echo "Finished."
                )
                But Im still not getting the desired rates.



                On 10/1/05, Dirk Tilger <dirk@... > wrote:
                --- Brad Campbell <brad@...> wrote:
                > Perhaps QoS should be the topic of a future workshop session.

                Great idea. Take me on there (as your co-tutor).

                Dirk.


                SPONSORED LINKS
                Linux operating system Linux os Hosting linux unix web
                Free linux operating system Linux migration Linux user


                YAHOO! GROUPS LINKS





              • Sean Craig - Snr Solutions Consultant -
                How are you connecting to the net? On my DSL, I must set the port forwarding to allow the incoming connections. Regards Sean aLT WiZard wrote: Brad, I
                Message 7 of 19 , Oct 1, 2005
                • 0 Attachment
                  How are you connecting to the net?  On my DSL, I must set the port forwarding to allow the incoming connections.
                   
                  Regards

                  Sean


                  aLT WiZard wrote:
                  Brad,
                  I seriously gotta larn more linux, im a noob, no idea on qos thing, I'll check google  :D

                  On 10/2/05, aLT WiZard < altwizzy@...> wrote:
                  thanks for the replies,
                  I also use azureus,  I noticed that the smiley face on the left which indicates the "health" of the torrent is mostly yelllow suggesting a NAT problem.  I am using port 6882 which azureus says is ok.   I have also disabled the firewall by guarddog
                  (echo "Resetting firewall rules."
                  ipchains -P output ACCEPT
                  ipchains -P input ACCEPT
                  ipchains -P forward ACCEPT
                  ipchains -F forward
                  ipchains -F input
                  ipchains -F output
                  fi
                  if [ $FILTERSYS -eq 2 ]; then
                  echo "Using iptables."
                  echo "Resetting firewall rules."
                  iptables -P OUTPUT ACCEPT
                  iptables -P INPUT ACCEPT
                  iptables -P FORWARD ACCEPT
                  iptables -F FORWARD
                  iptables -F INPUT
                  iptables -F OUTPUT
                  fi;
                  echo "Finished."
                  )
                  But Im still not getting the desired rates.



                  On 10/1/05, Dirk Tilger <dirk@... > wrote:
                  --- Brad Campbell <brad@...> wrote:
                  > Perhaps QoS should be the topic of a future workshop session.

                  Great idea. Take me on there (as your co-tutor).

                  Dirk.


                  SPONSORED LINKS
                  Linux operating system Linux os Hosting linux unix web
                  Free linux operating system Linux migration Linux user


                  YAHOO! GROUPS LINKS





                • Brad Campbell
                  ... Dude, honestly.. if you are that green, just reading the QoS documents is going to bend your brain.. I think as Sean said, you need to set up port
                  Message 8 of 19 , Oct 2, 2005
                  • 0 Attachment
                    aLT WiZard wrote:
                    > Brad,
                    > I seriously gotta larn more linux, im a noob, no idea on qos thing, I'll
                    > check google :D

                    Dude, honestly.. if you are that green, just reading the QoS documents is going to bend your brain..
                    I think as Sean said, you need to set up port forwarding on your router to get the desired port to
                    the desired place.

                    I have my server set as the DMZ for my router so it just passes all packets through, but then I have
                    a slightly more secure firewall than yours.

                    Perhaps we should add basic iptables into our QoS lecture.
                    QoS is actually quite easy once you have it explained to you in laymans language.
                    When is the next group meeting?


                    --
                    "Human beings, who are almost unique in having the ability
                    to learn from the experience of others, are also remarkable
                    for their apparent disinclination to do so." -- Douglas Adams
                  • aLT WiZard
                    Well I am connected to the net with the aztech modem on 256kbps nothing special:| No router I guess ... Ok hmm... Well Azureus says the port 6882 is ok . But
                    Message 9 of 19 , Oct 2, 2005
                    • 0 Attachment
                      Well I am connected to the net with the aztech modem on 256kbps nothing special:| No router  I guess ...
                       

                      Ok hmm...

                      Well Azureus says the port 6882 is ok . But when downloading I get this smiley   - :-\ - when its supposed to be - :) - , Same with the bittorrent gui .. I seriously must have messed up the iptables hehe,
                      I'll try this
                      iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT --to-destination <host>
                      ... where 127.0.01 ( got em from  http://userpages.umbc.edu/%7Ehamilton/btclientconfig.html#FWConfig )



                       
                      On 10/2/05, Brad Campbell <brad@...> wrote:
                      aLT WiZard wrote:
                      > Brad,
                      > I seriously gotta larn more linux, im a noob, no idea on qos thing, I'll
                      > check google  :D

                      Dude, honestly.. if you are that green, just reading the QoS documents is going to bend your brain..
                      I think as Sean said, you need to set up port forwarding on your router to get the desired port to
                      the desired place.

                      I have my server set as the DMZ for my router so it just passes all packets through, but then I have
                      a slightly more secure firewall than yours.

                      Perhaps we should add basic iptables into our QoS lecture.
                      QoS is actually quite easy once you have it explained to you in laymans language.
                      When is the next group meeting?


                      --
                      "Human beings, who are almost unique in having the ability
                      to learn from the experience of others, are also remarkable
                      for their apparent disinclination to do so." -- Douglas Adams


                      YAHOO! GROUPS LINKS




                    • Dirk Tilger
                      ... Don t set to 127.0.0.1. The 127.0.0.1 address will hardly be in any firewall configuration. With 127.0.0.1 you reach yourself. Since you re having
                      Message 10 of 19 , Oct 2, 2005
                      • 0 Attachment
                        --- aLT WiZard <altwizzy@...> wrote:
                        > I'll try this
                        > iptables -t nat -I PREROUTING -p tcp --dport 6881:6889 -j DNAT
                        > --to-destination <host>
                        > ... where 127.0.01 ( got em from
                        > http://userpages.umbc.edu/%7Ehamilton/btclientconfig.html#FWConfig )

                        Don't set <host> to 127.0.0.1. The "127.0.0.1" address will hardly be
                        in any firewall configuration. With 127.0.0.1 you reach yourself. Since
                        you're having no router I suggest in general

                        iptables -t nat -F

                        that full flush your 'nat' tables. Unfortunally I don't have machine
                        here that has 'iptables' in the kernel, so I can't figure out how a
                        virgin nat tables looks. In most cases the statement above should do.
                        The next two staments will

                        iptables -I INPUT -p tcp --dport 6881:6889 -j ACCEPT
                        iptables -I OUTPUT -p tcp --dport 6881:6889 -j ACCEPT

                        These two instructions open up ports 6881-6889 in both directions. The
                        rule will be inserted at the very top of your list, so I can't imagine
                        a case right now (when 'nat' is empty) when this should not open up the
                        ports.

                        Dirk.
                      • Manu Abraham
                        ... iptables -L Chain FORWARD (policy ACCEPT) target prot opt source destination Chain INPUT (policy ACCEPT) target prot opt source
                        Message 11 of 19 , Oct 2, 2005
                        • 0 Attachment
                          Dirk Tilger wrote:

                          >Unfortunally I don't have machine
                          >here that has 'iptables' in the kernel, so I can't figure out how a
                          >virgin nat tables looks.
                          >
                          iptables -L

                          Chain FORWARD (policy ACCEPT)
                          target prot opt source destination

                          Chain INPUT (policy ACCEPT)
                          target prot opt source destination

                          Chain OUTPUT (policy ACCEPT)
                          target prot opt source destination



                          Manu
                        • Dirk Tilger
                          ... iptables -t nat -L
                          Message 12 of 19 , Oct 2, 2005
                          • 0 Attachment
                            --- Manu Abraham <manu@...> wrote:
                            > Dirk Tilger wrote:
                            >
                            > >Unfortunally I don't have machine
                            > >here that has 'iptables' in the kernel, so I can't figure out how a
                            > >virgin nat tables looks.
                            > >
                            > iptables -L

                            iptables -t nat -L
                          • Dirk Tilger
                            ... iptables -I OUTPUT -p tcp --sport 6881:6889 -j ACCEPT Dirk.
                            Message 13 of 19 , Oct 2, 2005
                            • 0 Attachment
                              --- Dirk Tilger <dirk@...> wrote:
                              > iptables -I INPUT -p tcp --dport 6881:6889 -j ACCEPT
                              > iptables -I OUTPUT -p tcp --dport 6881:6889 -j ACCEPT

                              iptables -I OUTPUT -p tcp --sport 6881:6889 -j ACCEPT

                              Dirk.
                            • aLT WiZard
                              thx all I got it! I had to do dpkg-reconfigure iptables first then the iptables port thing.. thanks again!
                              Message 14 of 19 , Oct 2, 2005
                              • 0 Attachment
                                thx all I got it!
                                I had to do dpkg-reconfigure iptables first then the iptables port thing..
                                thanks again!

                                 
                                On 10/2/05, Dirk Tilger <dirk@...> wrote:
                                --- Dirk Tilger < dirk@...> wrote:
                                > iptables -I INPUT -p tcp --dport 6881:6889 -j ACCEPT
                                > iptables -I OUTPUT -p tcp --dport 6881:6889 -j ACCEPT

                                iptables -I OUTPUT -p tcp --sport 6881:6889 -j ACCEPT

                                Dirk.


                                SPONSORED LINKS
                                Linux operating system Linux os Hosting linux unix web
                                Free linux operating system Linux migration Linux user


                                YAHOO! GROUPS LINKS




                              • Manu Abraham
                                ... Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain POSTROUTING (policy ACCEPT) target prot opt source
                                Message 15 of 19 , Oct 3, 2005
                                • 0 Attachment
                                  Dirk Tilger wrote:

                                  >--- Manu Abraham <manu@...> wrote:
                                  >
                                  >
                                  >>Dirk Tilger wrote:
                                  >>
                                  >>
                                  >>
                                  >>>Unfortunally I don't have machine
                                  >>>here that has 'iptables' in the kernel, so I can't figure out how a
                                  >>>virgin nat tables looks.
                                  >>>
                                  >>>
                                  >>>
                                  >> iptables -L
                                  >>
                                  >>
                                  >
                                  >iptables -t nat -L
                                  >
                                  >

                                  Chain OUTPUT (policy ACCEPT)
                                  target prot opt source destination

                                  Chain POSTROUTING (policy ACCEPT)
                                  target prot opt source destination

                                  Chain PREROUTING (policy ACCEPT)
                                  target prot opt source destination


                                  Manu
                                Your message has been successfully submitted and would be delivered to recipients shortly.