From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Salim S I" Date: Fri, 11 May 2007 06:25:52 +0000 Subject: RE: [LARTC] PRIO and TBF is much better than HTB?? Message-Id: <001601c79395$3a0477d0$5964a8c0@SalimSi> MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1263751424==" List-Id: References: <001401c79315$b1732c60$14598520$@de> In-Reply-To: <001401c79315$b1732c60$14598520$@de> To: lartc@vger.kernel.org This is a multi-part message in MIME format. --===============1263751424== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0017_01C793D8.4827B7D0" This is a multi-part message in MIME format. ------=_NextPart_000_0017_01C793D8.4827B7D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable HTB=92s priority and PRIO qdisc are very different. =20 PRIO qdisc will definitely give better latency for your high priority traffic, since the qdisc is designed for the purpose of =91priority=92. = In theory it will even starve the low priority traffic, if high prio traffic is waiting to go out. =20 HTB=92s priority is different, it only gives relative priority. High = prio class in a level is de-queued first during the roundrobin/wrr cycle, but lower priority classes will also be fairly serviced, unlike PRIO qdisc. =20 =20 -----Original Message----- From: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] On Behalf Of Simo Sent: Thursday, May 10, 2007 11:13 PM To: lartc@mailman.ds9a.nl Subject: [LARTC] PRIO and TBF is much better than HTB?? =20 Hello mailing list, i stand bevor a mystery and cannot explain it :-). I want to do shaping and prioritization and I have done these following configurations and simulations. I can=B4t explain, that the combination of PRIO and TBF is much better than the HTB (with the prio parameter) alone or in combination with the SFQ. Here are my example configurations: 2 Traffic Classes http (80 =3D 0x50) and ssh (22 =3D 0x16), and in my example, I want to prioritize the http-Traffic: HTB: the results of the simulation ist here:=20 HTB cumulative: http://simo.mix4web.de/up/htb_cumul.jpg HTB delay: http://simo.mix4web.de/up/htb_delay.jpg HTB with prio parameter cumulative: http://simo.mix4web.de/up/htb_cumul_prio_paramter.jpg HTB with prio parameter delay: http://simo.mix4web.de/up/htb_delay_prio_parameter.jpg =20 #define UPLOAD 1000kbps dev eth0 1000 { egress { class ( <$high> ) if tcp_dport =3D=3D 80; class(<$low>) if tcp_dport =3D=3D 22; htb () { class ( rate UPLOAD, ceil UPLOAD) { /* with the prio parameter : $high =3D class ( rate 700kbps, ceil UPLOAD, prio 0); */ $high =3D class ( rate 700kbps, ceil UPLOAD); /* with the prio parameter : $low =3D class ( rate 300kbps, ceil UPLOAD, prio 0); */ $low =3D class ( rate 300kbps, ceil UPLOAD, prio 1); } } } } =20 /* 1Mbit 0.0008 =3D 100*8/10^6 */ every 0.0008s send TCP_PCK($tcp_dport=3D22) 0 x 60 /* 800kbit/s */ every 0.001s send TCP_PCK($tcp_dport=3D80) 0 x 60 time 2s =20 =20 =20 =20 PRIO and TBF: PRIO and TBF cumulative: http://simo.mix4web.de/up/prio_tbf_cumul.jpg PRIO and TBF delay: http://simo.mix4web.de/up/prio_tbf_delay.jpg =20 #define UPLOAD 1000kbps =20 dev eth0 1000 { egress { class ( <$high> ) if tcp_dport =3D=3D 80; class(<$low>) if tcp_dport =3D=3D 22; prio{ $high =3D class{ tbf (rate 700kbps, burst 1510B, mtu = 1510B, limit 3000B); } $low =3D class{ tbf (rate 300kbps, burst 1510B, mtu 1510B, limit 3000B); } } } =20 } =20 /* 1Mbit 0.0008 =3D 100*8/10^6 */ every 0.0008s send TCP_PCK($tcp_dport=3D22) 0 x 60 /* 800kbit/s */ every 0.001s send TCP_PCK($tcp_dport=3D80) 0 x 60 time 2s =20 =20 =20 the delay by the combination of PRIO and TBF is much better than by the HTB. (is it possible that pakets maybe dropped by the combination of PRIO and TBF, that=B4s why the latency is so good???) =20 Have you an idea??? =20 thanks simo =20 ------------------------------------------------------------------------ --------------------------------------------------------------------- In a world without walls who needs gates and windows? =20 ------=_NextPart_000_0017_01C793D8.4827B7D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

HTB’s priority and PRIO qdisc are = very different.

 

PRIO qdisc will definitely give better latency for your high priority traffic, since the = qdisc is designed for the purpose of ‘priority’. In theory it will even starve the low priority = traffic, if high prio traffic is waiting to go = out.

 

HTB’s priority is different, it only gives relative priority. = High prio class in a level is de-queued first during = the roundrobin/wrr cycle, but lower priority classes = will also be fairly serviced, unlike PRIO qdisc.

 

 

-----Original = Message-----
From: lartc-bounces@mailman.ds9a.nl [mailto:lartc-bounces@mailman.ds9a.nl] = On Behalf Of Simo
Sent: =
Thursday, May 10, = 2007 11:13 PM
To: = lartc@mailman.ds9a.nl
Subject: [LARTC] PRIO and = TBF is much better than HTB??

 

Hello mailing = list,

i stand bevor a mystery and cannot explain it = J. = I want to do shaping and prioritization and I have done these following = configurations and simulations. I can=B4t explain, that the combination of PRIO and TBF = is much better than the  HTB (with the prio parameter) alone or  in combination with the SFQ.

Here are my example configurations: 2 Traffic = Classes http (80 =3D 0x50) and ssh (22 =3D 0x16), and in my example, I want to = prioritize the http-Traffic:

HTB: the results of the simulation ist here: =

HTB cumulative: http://simo.mix4web.de/u= p/htb_cumul.jpg

HTB delay: http://simo.mix4web.de/u= p/htb_delay.jpg

HTB with prio parameter cumulative: http://sim= o.mix4web.de/up/htb_cumul_prio_paramter.jpg<= /p>

HTB with prio parameter delay: http://si= mo.mix4web.de/up/htb_delay_prio_parameter.jpg

 

#define UPLOAD = 1000kbps

dev eth0 1000 {

    egress = {

        = class ( <$high> )  if tcp_dport =3D=3D = 80;

        class(<$low>) if  tcp_dport =3D=3D = 22;

        = htb () {

       &nbs= p;        class ( rate UPLOAD, ceil UPLOAD) = {

/* with the prio = parameter : $high   =3D class ( rate 700kbps, ceil UPLOAD, prio 0); = */

       &nbs= p;        $high   =3D class ( rate 700kbps, ceil = UPLOAD);

    =             /* with the prio parameter : $low   =3D class ( rate 300kbps, = ceil UPLOAD, prio 0); */

       &nbs= p;        $low  =3D class ( rate 300kbps, ceil UPLOAD, prio = 1);

       &nbs= p;        }

        = }

    = }

}

 

/* 1Mbit 0.0008 =3D 100*8/10^6  = */

every 0.0008s send TCP_PCK($tcp_dport=3D22) 0 = x 60

/* 800kbit/s  = */

every 0.001s send TCP_PCK($tcp_dport=3D80) 0 = x 60

time 2s

 

 

 

 

PRIO and TBF:

PRIO and TBF cumulative: http://simo.mix4web= .de/up/prio_tbf_cumul.jpg

PRIO and TBF delay: http://simo.mix4web.de/up/prio_tbf_delay.jpg

=

 

#define UPLOAD = 1000kbps

 

dev eth0 1000 {

    egress = {

        = class ( <$high> )  if tcp_dport =3D=3D = 80;

        class(<$low>) if  tcp_dport =3D=3D = 22;

        = prio{

       &nbs= p;      $high =3D class{ tbf (rate 700kbps, burst 1510B, mtu 1510B, limit = 3000B);  }

       &nbs= p;      $low =3D class{ tbf (rate 300kbps, burst 1510B, mtu 1510B, limit 3000B); = }

       &nbs= p;     }

        = }

 

}

 

/* 1Mbit 0.0008 =3D 100*8/10^6  = */

every 0.0008s send TCP_PCK($tcp_dport=3D22) 0 = x 60

/* 800kbit/s  = */

every 0.001s send TCP_PCK($tcp_dport=3D80) 0 = x 60

time 2s

 

 

 

the delay by the combination of PRIO and TBF = is much better than by the HTB. (is it possible that pakets maybe dropped by the combination of PRIO and TBF, that=B4s why the latency is so = good???)

 

Have you an = idea???

 

thanks

simo

 

----------------= -------------------------------------------------------------------------= ----------------------------------------------------
In a world without walls who needs gates and windows?

 

------=_NextPart_000_0017_01C793D8.4827B7D0-- --===============1263751424== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1263751424==--