public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Torrent with dynamics throttles
@ 2011-08-13 15:57 Daniel Hilst Selli
  2011-08-13 18:43 ` Stroller
  2011-08-13 18:47 ` [gentoo-user] " Florian Philipp
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Hilst Selli @ 2011-08-13 15:57 UTC (permalink / raw
  To: gentoo-user

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!



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Torrent with dynamics throttles
  2011-08-13 15:57 [gentoo-user] Torrent with dynamics throttles Daniel Hilst Selli
@ 2011-08-13 18:43 ` Stroller
  2011-08-13 22:18   ` Andrea Conti
  2011-08-13 18:47 ` [gentoo-user] " Florian Philipp
  1 sibling, 1 reply; 6+ messages in thread
From: Stroller @ 2011-08-13 18:43 UTC (permalink / raw
  To: gentoo-user


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.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Torrent with dynamics throttles
  2011-08-13 15:57 [gentoo-user] Torrent with dynamics throttles Daniel Hilst Selli
  2011-08-13 18:43 ` Stroller
@ 2011-08-13 18:47 ` Florian Philipp
  1 sibling, 0 replies; 6+ messages in thread
From: Florian Philipp @ 2011-08-13 18:47 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 905 bytes --]

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Torrent with dynamics throttles
  2011-08-13 18:43 ` Stroller
@ 2011-08-13 22:18   ` Andrea Conti
  2011-08-15 16:02     ` Paul Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Andrea Conti @ 2011-08-13 22:18 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [gentoo-user] Torrent with dynamics throttles
  2011-08-13 22:18   ` Andrea Conti
@ 2011-08-15 16:02     ` Paul Hartman
  2011-08-15 16:38       ` [gentoo-user] " Holger Hoffstaette
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Hartman @ 2011-08-15 16:02 UTC (permalink / raw
  To: gentoo-user

On Sat, Aug 13, 2011 at 5:18 PM, Andrea Conti <alyf@alyf.net> 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.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [gentoo-user] Re: Torrent with dynamics throttles
  2011-08-15 16:02     ` Paul Hartman
@ 2011-08-15 16:38       ` Holger Hoffstaette
  0 siblings, 0 replies; 6+ messages in thread
From: Holger Hoffstaette @ 2011-08-15 16:38 UTC (permalink / raw
  To: gentoo-user

On Mon, 15 Aug 2011 11:02:01 -0500, Paul Hartman wrote:

> On Sat, Aug 13, 2011 at 5:18 PM, Andrea Conti <alyf@alyf.net> 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.

Which is why it is much more important to use a client that uses the µTP
protocol, which prevents TCP starvation (aka buffer bloat):
http://en.wikipedia.org/wiki/Micro_Transport_Protocol

cheers :)
-h





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-15 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-13 15:57 [gentoo-user] Torrent with dynamics throttles Daniel Hilst Selli
2011-08-13 18:43 ` Stroller
2011-08-13 22:18   ` Andrea Conti
2011-08-15 16:02     ` Paul Hartman
2011-08-15 16:38       ` [gentoo-user] " Holger Hoffstaette
2011-08-13 18:47 ` [gentoo-user] " Florian Philipp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox