Re: [gentoo-user] Torrent with dynamics throttles

2011-08-15 Thread Paul Hartman
On Sat, Aug 13, 2011 at 5:18 PM, Andrea Conti  wrote:
> All the other considerations apply, especially the one about capping the
> total outgoing bandwidth to something less than the actual available
> bandwidth so that the modem's tx queue stays empty.

In my (limited) experience, even if this is the only thing you do, it
has a noticeable impact on responsiveness of a busy connection.



Re: [gentoo-user] Torrent with dynamics throttles

2011-08-13 Thread Andrea Conti
Hello,

>> This set/unset is boring.. Is there any way to dynamic set my torrents 
>> limits, so when I'm using internet it frees some bandwidth  to me, and when 
>> I stop to use it goes full speed again??

> You want to use QoS / traffic-pritoritising, which is normally done at the 
> router.
> http://wiki.openwrt.org/doc/howto/tc/tc.theory
> http://wiki.openwrt.org/doc/howto/tc

The openwrt docs are fine, but apart from the technical details I think
it's worth mentioning a couple of important points:

QoS done on the user's end can only directly affect *upstream* bandwidth
allocation.

Having said that, if you're on an asymmetric connection (that is, if
your available downstream bandwidth is significantly larger than your
available upstream bandwidth) like most home users are, your bottleneck
is probably in the upstream direction and so it can be worked on.

In your scenario, upstream bandwidth allocation also influences what
happens in the downstream direction because HTTP is TCP-based: a full tx
queue in your modem will delay both new requests (thus increasing
latency) and the ACKs your computer is sending in response to received
data (which will effectively throttle the relevant connections,
decreasing throughput).

Therefore a QoS policy intended to favour internet surfing over
background bittorrent traffic should aim to minimize the delay incurred
by "connection setup" packets (i.e. DNS and HTTP requests) and by the
kind of ACKs usually associated with HTTP downloads (that is TCP packets
that have the ACK flag set and carry no payload -- and therefore are
smaller than a certain size, let's say 80 bytes).

All the other considerations apply, especially the one about capping the
total outgoing bandwidth to something less than the actual available
bandwidth so that the modem's tx queue stays empty.

> You can probably do this on your main computer, just by building the iptables 
> kernel modules and by creating a rule (or a handful of them) so that 
> BitTorrent traffic is delegated below everything else.

It really depends on network topology. In general, queueing should be
set up as close as possible to where the congestion is happening, which
means on the router or on the pc to which a modem is connected. Remember
that traffic shaping only works if *all* traffic passes through the shaper.

Interventions on machines which only originate traffic should be limited
to making life as easy as possible for the packet classifier, e.g. by
setting up the bittorrent client to use a specific TOS value so that
torrent traffic can be identified and assigned a low priority without
using complex rules.

HTH,
andrea



Re: [gentoo-user] Torrent with dynamics throttles

2011-08-13 Thread Florian Philipp
Am 13.08.2011 17:57, schrieb Daniel Hilst Selli:
> I was wondering about torrents, here is the case
> 
> I love to download stuff through torrents.. so there is aways a client
> downloading/uploading something.
> 
> When I want to use my band I just set torrents limits, so youtube videos
> charges fast, and sites load fast too. When I go away I first unset the
> limits, so my torrents go to full speed again.
> 
> This set/unset is boring.. Is there any way to dynamic set my torrents
> limits, so when I'm using internet it frees some bandwidth  to me, and
> when I stop to use it goes full speed again?? Is there any torrent
> client with that feature? If not, is this implementable?
> 
> Thanks in advance!
> 

This is something that should (must?) be done with traffic shaping. I
recommend shorewall. See
http://shorewall.net/traffic_shaping.htm

Regards,
Florian Philipp



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-user] Torrent with dynamics throttles

2011-08-13 Thread Stroller

On 13 August 2011, at 16:57, Daniel Hilst Selli wrote:
> …
> I love to download stuff through torrents.. so there is aways a client 
> downloading/uploading something.
> 
> When I want to use my band I just set torrents limits, so youtube videos 
> charges fast, and sites load fast too. When I go away I first unset the 
> limits, so my torrents go to full speed again.
> 
> This set/unset is boring.. Is there any way to dynamic set my torrents 
> limits, so when I'm using internet it frees some bandwidth  to me, and when I 
> stop to use it goes full speed again?? Is there any torrent client with that 
> feature? If not, is this implementable?

You want to use QoS / traffic-pritoritising, which is normally done at the 
router.

http://wiki.openwrt.org/doc/howto/tc/tc.theory
http://wiki.openwrt.org/doc/howto/tc

You can probably do this on your main computer, just by building the iptables 
kernel modules and by creating a rule (or a handful of them) so that BitTorrent 
traffic is delegated below everything else.

Stroller.




[gentoo-user] Torrent with dynamics throttles

2011-08-13 Thread Daniel Hilst Selli

I was wondering about torrents, here is the case

I love to download stuff through torrents.. so there is aways a client 
downloading/uploading something.


When I want to use my band I just set torrents limits, so youtube videos 
charges fast, and sites load fast too. When I go away I first unset the 
limits, so my torrents go to full speed again.


This set/unset is boring.. Is there any way to dynamic set my torrents 
limits, so when I'm using internet it frees some bandwidth  to me, and 
when I stop to use it goes full speed again?? Is there any torrent 
client with that feature? If not, is this implementable?


Thanks in advance!