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