* Re: Bandwidth 'depredation' revisited
2002-06-11 14:57 ` Anders Fugmann
@ 2002-06-11 17:18 ` DervishD
2002-06-11 18:25 ` Anders Peter Fugmann
2002-06-11 20:20 ` Marius Gedminas
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: DervishD @ 2002-06-11 17:18 UTC (permalink / raw)
To: afu, raul; +Cc: linux-kernel
Hi Anders :)
>To do this you can use ingress scheduler.
That's the point... I'll give it a try, then.
>tc qdisc add dev eth0 handle ffff: ingress
>tc filter add dev etc0 parent ffff: protocol ip prio 50 u32 \
> match ip src 0.0.0.0/0 police \
> rate 232kbit burst 10k drop flowid :1
OK. Maybe a stupid question: will I need to mark the packages
with iptables in order to get them thru de ingress scheduler :?
>The downside is, that this actually decreases the maximum download
>speed, but you can really feel the difference.
Don't worry about that. I'll give it a try and compare results.
>IIRC, All this was explained in the Advanced-Routing howto.
I missed this part, then. Well, I didn't read deeply the
different shapers...
Thanks a lot :)
Raúl
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bandwidth 'depredation' revisited
2002-06-11 17:18 ` DervishD
@ 2002-06-11 18:25 ` Anders Peter Fugmann
0 siblings, 0 replies; 9+ messages in thread
From: Anders Peter Fugmann @ 2002-06-11 18:25 UTC (permalink / raw)
To: DervishD; +Cc: linux-kernel
DervishD wrote:
> Hi Anders :)
>
>>tc qdisc add dev eth0 handle ffff: ingress
>>tc filter add dev etc0 parent ffff: protocol ip prio 50 u32 \
>> match ip src 0.0.0.0/0 police \
>> rate 232kbit burst 10k drop flowid :1
>
> OK. Maybe a stupid question: will I need to mark the packages
> with iptables in order to get them thru de ingress scheduler :?
>
No. You can, but dont need to. The above lines match anything comming from eth0, and
shapes it to 232kbit. Tweak the value to suit your needs.
Anders Fugmann
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bandwidth 'depredation' revisited
2002-06-11 14:57 ` Anders Fugmann
2002-06-11 17:18 ` DervishD
@ 2002-06-11 20:20 ` Marius Gedminas
2002-06-11 20:59 ` Allan Sandfeld Jensen
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Marius Gedminas @ 2002-06-11 20:20 UTC (permalink / raw)
To: Linux-kernel
On Tue, Jun 11, 2002 at 04:57:58PM +0200, Anders Fugmann wrote:
> tc qdisc add dev eth0 handle ffff: ingress
Does this work with 2.2 kernels? I've enabled CONFIG_NET_CLS_POLICE,
but tc just barfs
RTNETLINK answers: No such file or directory
Shaping with CBQ works fine. Debian Woody, iproute 20010824-8.
Marius Gedminas
--
Q: Why do mountain climbers rope themselves together?
A: To prevent the sensible ones from going home.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bandwidth 'depredation' revisited
2002-06-11 14:57 ` Anders Fugmann
2002-06-11 17:18 ` DervishD
2002-06-11 20:20 ` Marius Gedminas
@ 2002-06-11 20:59 ` Allan Sandfeld Jensen
2002-06-14 3:35 ` Albert D. Cahalan
2002-06-14 9:17 ` lkml
4 siblings, 0 replies; 9+ messages in thread
From: Allan Sandfeld Jensen @ 2002-06-11 20:59 UTC (permalink / raw)
To: Linux-kernel
On Tuesday 11 June 2002 16:57, Anders Fugmann wrote:
> When you start a big download, you actually request a server to send as
> much data as possible to you. Quickly, the packet queues on your ISP's
> side gets filled up. If these queues are big (can hold many packets) you
> will see a rather high latency when trying to retrieve replys, since any
> pakcets (incl. ACK) will need first to enter the queue, and wait for
> their turn to be send to you.
>
> The best solution would be to install some sort of traffic shaping on
> the remove side (you ISP), but that is often(/always) not a possible
> solution.
>
> The second best solution is to simple drop packets comming in too
> quickly from the interface. By this, the sending machine will slow down
> transmission. The idea is to keep the queues at you ISP empty.
You could also just delay trafic from certain IPs. Or even better, you could
postpone acknowledgedments until you get the right distribution.
I know routers that do the former to gain fair download on shared internet
connections, but the second would be a lot nicer.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bandwidth 'depredation' revisited
2002-06-11 14:57 ` Anders Fugmann
` (2 preceding siblings ...)
2002-06-11 20:59 ` Allan Sandfeld Jensen
@ 2002-06-14 3:35 ` Albert D. Cahalan
2002-06-14 9:16 ` Anders Peter Fugmann
2002-06-14 9:17 ` lkml
4 siblings, 1 reply; 9+ messages in thread
From: Albert D. Cahalan @ 2002-06-14 3:35 UTC (permalink / raw)
To: Anders Fugmann; +Cc: DervishD, Linux-kernel
Anders Fugmann writes:
> The best solution would be to install some sort of traffic shaping on
> the remove side (you ISP), but that is often(/always) not a possible
> solution.
>
> The second best solution is to simple drop packets comming in too
> quickly from the interface. By this, the sending machine will slow down
> transmission. The idea is to keep the queues at you ISP empty.
>
> To do this you can use ingress scheduler.
>
> Something like:
> tc qdisc add dev eth0 handle ffff: ingress
> tc filter add dev etc0 parent ffff: protocol ip prio 50 u32 \
> match ip src 0.0.0.0/0 police \
> rate 232kbit burst 10k drop flowid :1
Rather than dropping packets, causing retransmits that
eat into your bandwidth, you could try the new ECN bits.
If you're downloading from a Linux box, it ought to slow
down a bit when you claim to be suffering congestion.
ftp://ftp.isi.edu/in-notes/rfc3168.txt
http://www.faqs.org/rfcs/rfc3168.html
http://www.aciri.org/floyd/ecn.html
http://gtf.org/garzik/ecn/
http://www.tux.org/lkml/#s14-2
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Bandwidth 'depredation' revisited
2002-06-14 3:35 ` Albert D. Cahalan
@ 2002-06-14 9:16 ` Anders Peter Fugmann
0 siblings, 0 replies; 9+ messages in thread
From: Anders Peter Fugmann @ 2002-06-14 9:16 UTC (permalink / raw)
To: Albert D. Cahalan; +Cc: Linux-kernel
Albert D. Cahalan wrote:
>
> Rather than dropping packets, causing retransmits that
> eat into your bandwidth, you could try the new ECN bits.
> If you're downloading from a Linux box, it ought to slow
> down a bit when you claim to be suffering congestion.
>
Yes - That would really be ideal.
Do you know how to enable ECN on the ingress filter,
or which filter to use instead?
Anders
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bandwidth 'depredation' revisited
2002-06-11 14:57 ` Anders Fugmann
` (3 preceding siblings ...)
2002-06-14 3:35 ` Albert D. Cahalan
@ 2002-06-14 9:17 ` lkml
4 siblings, 0 replies; 9+ messages in thread
From: lkml @ 2002-06-14 9:17 UTC (permalink / raw)
To: raul; +Cc: linux-kernel
On Tue, 11 Jun 2002 16:57:58 +0200
"Anders Fugmann" <afu@fugmann.dhs.org> wrote:
> To do this you can use ingress scheduler.
>
> Something like:
> tc qdisc add dev eth0 handle ffff: ingress
> tc filter add dev etc0 parent ffff: protocol ip prio 50 u32 \
> match ip src 0.0.0.0/0 police \
> rate 232kbit burst 10k drop flowid :1
Try http://luxik.cdi.cz/~patrick/imq/index.html. Imq allows to shape incomming traffic with egres qdiscs.
^ permalink raw reply [flat|nested] 9+ messages in thread