All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] pb with ingress policy
@ 2002-08-07 13:44 Thomas SPECK
  2002-08-07 14:42 ` Patrick McHardy
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas SPECK @ 2002-08-07 13:44 UTC (permalink / raw)
  To: lartc

Hi !

I have a single host which is connected via an 512kbit ADSL link to the net. I quite often use some realaudio application that uses some bandwidth and I want to avoid other traffic to scale that bandwidth down. So I used some classes (with htb) on imq0 device and applied some filters and it seems to work in most cases. However, there are some sites with which download is interrupted if bandwidth is limited. I tried to trace it down and did some simple test:

modprobe imq numdevs=1
tc qdisc add dev imq0 root handle 1: htb default 10
tc class add dev imq0 parent 1: classid 1:10 htb rate 60kbit ceil 512kbit burst 15k
tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
iptables -t mangle -A PREROUTING -i ppp0 -j IMQ --todev 0
ip li set imq0 up

So now all traffic is limited to 60kbit. If I use some particular site for downloading (with wget) I observe the following with tcpdump:
At the beginning there is a huge burst (wget indicating something like 45 kbps) than speed decreases dramatically and achieves some equilibrium around 60kbit. Then for some reason after about 15 seconds my host sends FIN to the other site. Why ? ;-)
Is that a problem with some queue being too full after the burst at the beginning ? 
I tried to play with the burst option and I also used the pmtu stuff (iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS  --clamp-mss-to-pmtu) without success.

Anyone having an idea ?

Kernel 2.4.19, iptables 1.2.6a.

Thank you
--
Thomas

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] pb with ingress policy
  2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
@ 2002-08-07 14:42 ` Patrick McHardy
  2002-08-07 19:09 ` Stef Coene
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Patrick McHardy @ 2002-08-07 14:42 UTC (permalink / raw)
  To: lartc

Hi.

Thomas SPECK wrote:

> Hi !
> 
> I have a single host which is connected via an 512kbit ADSL link to the net. I quite often use some realaudio application that uses some bandwidth and I want to avoid other traffic to scale that bandwidth down. So I used some classes (with htb) on imq0 device and applied some filters and it seems to work in most cases. However, there are some sites with which download is interrupted if bandwidth is limited. I tried to trace it down and did some simple test:
> 
> modprobe imq numdevs=1
> tc qdisc add dev imq0 root handle 1: htb default 10
> tc class add dev imq0 parent 1: classid 1:10 htb rate 60kbit ceil 512kbit burst 15k
> tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
> iptables -t mangle -A PREROUTING -i ppp0 -j IMQ --todev 0
> ip li set imq0 up
> 
> So now all traffic is limited to 60kbit. If I use some particular site for downloading (with wget) I observe the following with tcpdump:
> At the beginning there is a huge burst (wget indicating something like 45 kbps) than speed decreases dramatically and achieves some equilibrium around 60kbit. Then for some reason after about 15 seconds my host sends FIN to the other site. Why ? ;-)


Hard to tell without seeing any data. Can you capture the session with 
tcpdump and put it online somewhere (or send it via email off-list) ?

Bye
Patrick

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] pb with ingress policy
  2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
  2002-08-07 14:42 ` Patrick McHardy
@ 2002-08-07 19:09 ` Stef Coene
  2002-08-08 11:03 ` Thomas SPECK
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2002-08-07 19:09 UTC (permalink / raw)
  To: lartc

On Wednesday 07 August 2002 16:43, Thomas SPECK wrote:
> Hi !
>
> I have a single host which is connected via an 512kbit ADSL link to the
> net. I quite often use some realaudio application that uses some bandwidth
> and I want to avoid other traffic to scale that bandwidth down. So I used
> some classes (with htb) on imq0 device and applied some filters and it
> seems to work in most cases. However, there are some sites with which
> download is interrupted if bandwidth is limited. I tried to trace it down
> and did some simple test:
>
> modprobe imq numdevs=1
> tc qdisc add dev imq0 root handle 1: htb default 10
> tc class add dev imq0 parent 1: classid 1:10 htb rate 60kbit ceil 512kbit
> burst 15k tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
> iptables -t mangle -A PREROUTING -i ppp0 -j IMQ --todev 0
> ip li set imq0 up
>
> So now all traffic is limited to 60kbit. 
You limit all traffic to 512 kbit with the ceil parameter, not 60 kbit.  The 
rate is used when you have 2 or more child classes with the same parent.

> If I use some particular site for
> downloading (with wget) I observe the following with tcpdump: At the
> beginning there is a huge burst (wget indicating something like 45 kbps)
> than speed decreases dramatically and achieves some equilibrium around
> 60kbit. Then for some reason after about 15 seconds my host sends FIN to
> the other site. Why ? ;-) Is that a problem with some queue being too full
> after the burst at the beginning ? I tried to play with the burst option
> and I also used the pmtu stuff (iptables -A FORWARD -p tcp --tcp-flags
> SYN,RST SYN -j TCPMSS  --clamp-mss-to-pmtu) without success.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] pb with ingress policy
  2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
  2002-08-07 14:42 ` Patrick McHardy
  2002-08-07 19:09 ` Stef Coene
@ 2002-08-08 11:03 ` Thomas SPECK
  2002-08-08 11:10 ` Thomas SPECK
  2002-08-08 11:56 ` Stef Coene
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas SPECK @ 2002-08-08 11:03 UTC (permalink / raw)
  To: lartc

>Messsage du 07/08/2002 16:42
>De : Patrick McHardy <kaber@trash.net>
>A : Thomas SPECK <thomas.speck@wanadoo.fr>
>Copie à :  <lartc@mailman.ds9a.nl>
>Objet : Re: [LARTC] pb with ingress policy  
>
> Hi.
> 
> Thomas SPECK wrote:
> 
> > Hi !
> > 
> > I have a single host which is connected via an 512kbit ADSL link to the net. I quite often use some realaudio application that uses some bandwidth and I want to avoid other traffic to scale that bandwidth down. So I used some classes (with htb) on imq0 device and applied some filters and it seems to work in most cases. However, there are some sites with which download is interrupted if bandwidth is limited. I tried to trace it down and did some simple test:
> > 
> > modprobe imq numdevs=1
> > tc qdisc add dev imq0 root handle 1: htb default 10
> > tc class add dev imq0 parent 1: classid 1:10 htb rate 60kbit ceil 512kbit burst 15k
> > tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
> > iptables -t mangle -A PREROUTING -i ppp0 -j IMQ --todev 0
> > ip li set imq0 up
> > 
> > So now all traffic is limited to 60kbit. If I use some particular site for downloading (with wget) I observe the following with tcpdump:
> > At the beginning there is a huge burst (wget indicating something like 45 kbps) than speed decreases dramatically and achieves some equilibrium around 60kbit. Then for some reason after about 15 seconds my host sends FIN to the other site. Why ? ;-)
> 
> 
> Hard to tell without seeing any data. Can you capture the session with 
> tcpdump and put it online somewhere (or send it via email off-list) ?

Unfortunately the site is down now, so I can't do any tests anymore. I tried to find some other site but without succces :( 
I could reproduce it with realplayer but I am not sure if it is not realplayer shutting down and causing the FIN or the FIN causing realplayer to shut down ... (BTW I am not sure with wget as well, so could that all be an application problem ?)

If you would like to see the dump anyway, please let me know.

--
Thomas

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] pb with ingress policy
  2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
                   ` (2 preceding siblings ...)
  2002-08-08 11:03 ` Thomas SPECK
@ 2002-08-08 11:10 ` Thomas SPECK
  2002-08-08 11:56 ` Stef Coene
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas SPECK @ 2002-08-08 11:10 UTC (permalink / raw)
  To: lartc





>Messsage du 07/08/2002 21:09
>De : Stef Coene <stef.coene@docum.org>
>A : Thomas SPECK <thomas.speck@wanadoo.fr>,  <lartc@mailman.ds9a.nl>
>Copie à : 
>Objet : Re: [LARTC] pb with ingress policy  
>
> On Wednesday 07 August 2002 16:43, Thomas SPECK wrote:
> > Hi !
> >
> > I have a single host which is connected via an 512kbit ADSL link to the
> > net. I quite often use some realaudio application that uses some bandwidth
> > and I want to avoid other traffic to scale that bandwidth down. So I used
> > some classes (with htb) on imq0 device and applied some filters and it
> > seems to work in most cases. However, there are some sites with which
> > download is interrupted if bandwidth is limited. I tried to trace it down
> > and did some simple test:
> >
> > modprobe imq numdevs=1
> > tc qdisc add dev imq0 root handle 1: htb default 10
> > tc class add dev imq0 parent 1: classid 1:10 htb rate 60kbit ceil 512kbit
> > burst 15k tc qdisc add dev imq0 parent 1:10 handle 10: sfq perturb 10
> > iptables -t mangle -A PREROUTING -i ppp0 -j IMQ --todev 0
> > ip li set imq0 up
> >
> > So now all traffic is limited to 60kbit. 
> You limit all traffic to 512 kbit with the ceil parameter, not 60 kbit.  The 
> rate is used when you have 2 or more child classes with the same parent.

I would like to believe you but I observe even with one class, that traffic is decreasing to something around 60kbit. Is there something I am doing wrong ?
BTW looking into the howto I wonder if it is a good idea to set ceil for ingress to the maximum rate I get. 

--
Thomas

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] pb with ingress policy
  2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
                   ` (3 preceding siblings ...)
  2002-08-08 11:10 ` Thomas SPECK
@ 2002-08-08 11:56 ` Stef Coene
  4 siblings, 0 replies; 6+ messages in thread
From: Stef Coene @ 2002-08-08 11:56 UTC (permalink / raw)
  To: lartc

> > You limit all traffic to 512 kbit with the ceil parameter, not 60 kbit. 
> > The rate is used when you have 2 or more child classes with the same
> > parent.
>
> I would like to believe you but I observe even with one class, that traffic
> is decreasing to something around 60kbit. Is there something I am doing
> wrong ? BTW looking into the howto I wonder if it is a good idea to set
> ceil for ingress to the maximum rate I get.
You have to put the ceil to 99% of the link in both directions so the hugh 
filters in the modem are not used.  But the 512 kbit ceil works.  I did some 
htb tests (http://www.docum.org/stef.coene/qos/tests/htb/index.html) and the 
results are very accurate.  What if you remove the sfq qdisc and/or take 
other values for rate/ceil?

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

end of thread, other threads:[~2002-08-08 11:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-07 13:44 [LARTC] pb with ingress policy Thomas SPECK
2002-08-07 14:42 ` Patrick McHardy
2002-08-07 19:09 ` Stef Coene
2002-08-08 11:03 ` Thomas SPECK
2002-08-08 11:10 ` Thomas SPECK
2002-08-08 11:56 ` Stef Coene

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.