All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] >10Mbit on HTB
@ 2003-10-11 12:46 Kristiadi Himawan
  2003-10-11 14:28 ` Kristiadi Himawan
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Kristiadi Himawan @ 2003-10-11 12:46 UTC (permalink / raw)
  To: lartc

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

I want to try to shape 20-30Mbps traffic using HTB.
It's possible? Anyone already try this?

Thanks.

[-- Attachment #2: Type: text/html, Size: 552 bytes --]

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

* [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
@ 2003-10-11 14:28 ` Kristiadi Himawan
  2003-10-11 15:51 ` Jose Luis Domingo Lopez
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kristiadi Himawan @ 2003-10-11 14:28 UTC (permalink / raw)
  To: lartc

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

Below is the script:

tc qdisc del dev eth2 root
tc qdisc add dev eth2 root handle 1 htb default 10 r2q 100

tc class add dev eth2 parent 1: classid 1:2 htb rate 100Mbit

tc class add dev eth2 parent 1:2 classid 1:10 htb rate 20Mbit ceil 20Mbit
tc filter add dev eth2 parent 1:0 protocol ip prio 100 u32 match ip dst 202.xx.xxx.xx/26 classid 1:10

When i try to shape 20Mbit, there's dropped packet but i see the bandwidth not shaped to 20Mbit.
But when shape to 10Mbit, i see the bandwidth down to 13Mbit.

Any comment with this?

Thanks.



[-- Attachment #2: Type: text/html, Size: 1384 bytes --]

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
  2003-10-11 14:28 ` Kristiadi Himawan
@ 2003-10-11 15:51 ` Jose Luis Domingo Lopez
  2003-10-11 15:57 ` Jose Luis Domingo Lopez
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Jose Luis Domingo Lopez @ 2003-10-11 15:51 UTC (permalink / raw)
  To: lartc

On Saturday, 11 October 2003, at 20:01:04 +0700,
Kristiadi Himawan wrote:

> I want to try to shape 20-30Mbps traffic using HTB.
> It's possible? Anyone already try this?
> 
Very well possible, and you don't need great hardware for this, if you
don't have a rather complex classification scenario.

Just for the record, in the middle of some network performance test for
some sort of appliance I capped outgoing speed to 25 Mbps on my PIII 600
MHz with a 3Com 100 Mbps card, and the box barely spends 1-2 % of CPU
transmitting at "full" speed (full = 25 Mbps).

Hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc)
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
  2003-10-11 14:28 ` Kristiadi Himawan
  2003-10-11 15:51 ` Jose Luis Domingo Lopez
@ 2003-10-11 15:57 ` Jose Luis Domingo Lopez
  2003-10-13  5:16 ` Catalin BOIE
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Jose Luis Domingo Lopez @ 2003-10-11 15:57 UTC (permalink / raw)
  To: lartc

On Saturday, 11 October 2003, at 21:28:10 +0700,
Kristiadi Himawan wrote:

> Below is the script:
> [snipped]
> 
The script seems correct, and very similar to what I use, except I don't
even need to set up a "filter" to direct traffic, because in my tests I
just need to limit the output to some speed.


> When i try to shape 20Mbit, there's dropped packet but i see the bandwidth not shaped to 20Mbit.
> But when shape to 10Mbit, i see the bandwidth down to 13Mbit.
> 
Some time ago there was a report from someone who tried HTB in 2.5.x
kernels and saw a strange behaviour. For details, check:
http://bugme.osdl.org/show_bug.cgi?ide7

In short, it seems bandwidth limiting behaves strange for different
outgoing packet sizes.

Regards.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc)
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (2 preceding siblings ...)
  2003-10-11 15:57 ` Jose Luis Domingo Lopez
@ 2003-10-13  5:16 ` Catalin BOIE
  2003-10-13  6:07 ` Rio Martin
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Catalin BOIE @ 2003-10-13  5:16 UTC (permalink / raw)
  To: lartc

On Sat, 11 Oct 2003, Kristiadi Himawan wrote:

> I want to try to shape 20-30Mbps traffic using HTB.
> It's possible? Anyone already try this?

Yes. It's working very good.
You may want to use hashes if you have a lot of filters.

>
> Thanks.
>

---
Catalin(ux) BOIE
catab@deuroconsult.ro
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (3 preceding siblings ...)
  2003-10-13  5:16 ` Catalin BOIE
@ 2003-10-13  6:07 ` Rio Martin
  2003-10-13 14:17 ` Kristiadi Himawan
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Rio Martin @ 2003-10-13  6:07 UTC (permalink / raw)
  To: lartc

On Monday 13 October 2003 12:16, Catalin BOIE wrote:
> On Sat, 11 Oct 2003, Kristiadi Himawan wrote:
> > I want to try to shape 20-30Mbps traffic using HTB.
> > It's possible? Anyone already try this?
> Yes. It's working very good.
> You may want to use hashes if you have a lot of filters.
> > Thanks.

Mine also,
Here goes the result:

### eth1: traffic classes
class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b 
cburst 27810b
 Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0)
 rate 2545587bps 1683pps backlog 4p
 lended: 192373 borrowed: 0 giants: 0
 tokens: -8887 ctokens: -8887

Regards,
Rio Martin.
--
NOC ITENAS-net
www.itenas.ac.id
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (4 preceding siblings ...)
  2003-10-13  6:07 ` Rio Martin
@ 2003-10-13 14:17 ` Kristiadi Himawan
  2003-10-13 18:51 ` Stef Coene
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kristiadi Himawan @ 2003-10-13 14:17 UTC (permalink / raw)
  To: lartc

Oh ok, it's working now. The script is fine.
My test tool isn't accurate.
Now i have test with iperf and get accurate result.

Other question ...:)
which ingress qdisc that accurate like htb?

Thnx

----- Original Message ----- 
From: "Rio Martin" <rio@martin.mu>
To: <lartc@mailman.ds9a.nl>
Sent: Monday, October 13, 2003 1:07 PM
Subject: Re: [LARTC] >10Mbit on HTB


> On Monday 13 October 2003 12:16, Catalin BOIE wrote:
> > On Sat, 11 Oct 2003, Kristiadi Himawan wrote:
> > > I want to try to shape 20-30Mbps traffic using HTB.
> > > It's possible? Anyone already try this?
> > Yes. It's working very good.
> > You may want to use hashes if you have a lot of filters.
> > > Thanks.
> 
> Mine also,
> Here goes the result:
> 
> ### eth1: traffic classes
> class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b 
> cburst 27810b
>  Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0)
>  rate 2545587bps 1683pps backlog 4p
>  lended: 192373 borrowed: 0 giants: 0
>  tokens: -8887 ctokens: -8887
> 
> Regards,
> Rio Martin.
> --
> NOC ITENAS-net
> www.itenas.ac.id
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> 

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

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (5 preceding siblings ...)
  2003-10-13 14:17 ` Kristiadi Himawan
@ 2003-10-13 18:51 ` Stef Coene
  2003-10-14  3:59 ` Rio Martin
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Stef Coene @ 2003-10-13 18:51 UTC (permalink / raw)
  To: lartc

On Monday 13 October 2003 16:17, Kristiadi Himawan wrote:
> Oh ok, it's working now. The script is fine.
> My test tool isn't accurate.
> Now i have test with iperf and get accurate result.
>
> Other question ...:)
> which ingress qdisc that accurate like htb?
None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress qdisc 
handles the incoming packets.  And there is no queue for the incoming 
packets, so you can't use htb.  You can use filteres + policers to rate limit 
traffic.  Or you may take a look at the imq device.  This is a virtual 
device.  You can redirect all incoming packets to it and use htb on the imq 
device.

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

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

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (6 preceding siblings ...)
  2003-10-13 18:51 ` Stef Coene
@ 2003-10-14  3:59 ` Rio Martin
  2003-10-14 18:25 ` Stef Coene
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Rio Martin @ 2003-10-14  3:59 UTC (permalink / raw)
  To: lartc

On Tuesday 14 October 2003 01:51, Stef Coene wrote:
> On Monday 13 October 2003 16:17, Kristiadi Himawan wrote:
> > Oh ok, it's working now. The script is fine.
> > My test tool isn't accurate.
> > Now i have test with iperf and get accurate result.
> > Other question ...:)
> > which ingress qdisc that accurate like htb?
> None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress
> qdisc handles the incoming packets.  And there is no queue for the incoming
> packets, so you can't use htb.  You can use filteres + policers to rate
> limit traffic.  Or you may take a look at the imq device.  This is a
> virtual device.  You can redirect all incoming packets to it and use htb on
> the imq device.

Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use 
HTB'? For now i am not applying IMQ for the ingress, but using packet 
mangling under iptables to handle both incoming packets from internet and 
outgoing packets to internet. Is this not right? give me your opinion please, 
as far as i can see, there were no troubles using packet mangling to handle 
those situation.

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

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (7 preceding siblings ...)
  2003-10-14  3:59 ` Rio Martin
@ 2003-10-14 18:25 ` Stef Coene
  2003-10-15  3:42 ` Rio Martin
  2003-10-15 18:44 ` Stef Coene
  10 siblings, 0 replies; 12+ messages in thread
From: Stef Coene @ 2003-10-14 18:25 UTC (permalink / raw)
  To: lartc

On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An ingress
> > qdisc handles the incoming packets.  And there is no queue for the
> > incoming packets, so you can't use htb.  You can use filteres + policers
> > to rate limit traffic.  Or you may take a look at the imq device.  This
> > is a virtual device.  You can redirect all incoming packets to it and use
> > htb on the imq device.
>
> Hi Stef,
> What do you mean by ' no queue for the incoming packets, so you can't use
> HTB'? For now i am not applying IMQ for the ingress, but using packet
> mangling under iptables to handle both incoming packets from internet and
> outgoing packets to internet. Is this not right? give me your opinion
> please, as far as i can see, there were no troubles using packet mangling
> to handle those situation.
What do you mean with packet mangling?  
And it's not because there is no queue for incoming packets that you can't do 
anything with time.  The filter + policer setup can rate limit incoming 
packets.  Iptables can also do rate limiting.

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

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

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (8 preceding siblings ...)
  2003-10-14 18:25 ` Stef Coene
@ 2003-10-15  3:42 ` Rio Martin
  2003-10-15 18:44 ` Stef Coene
  10 siblings, 0 replies; 12+ messages in thread
From: Rio Martin @ 2003-10-15  3:42 UTC (permalink / raw)
  To: lartc

On Wednesday 15 October 2003 01:25, Stef Coene wrote:
> On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An
> > > ingress qdisc handles the incoming packets.  And there is no queue for
> > > the incoming packets, so you can't use htb.  You can use filteres +
> > > policers to rate limit traffic.  Or you may take a look at the imq
> > > device.  This is a virtual device.  You can redirect all incoming
> > > packets to it and use htb on the imq device.
> > Hi Stef,
> > What do you mean by ' no queue for the incoming packets, so you can't use
> > HTB'? For now i am not applying IMQ for the ingress, but using packet
> > mangling under iptables to handle both incoming packets from internet and
> > outgoing packets to internet. Is this not right? give me your opinion
> > please, as far as i can see, there were no troubles using packet mangling
> > to handle those situation.
>
> What do you mean with packet mangling?
> And it's not because there is no queue for incoming packets that you can't
> do anything with time.  The filter + policer setup can rate limit incoming
> packets.  Iptables can also do rate limiting.

iptables -t mangle -A bla bla bla ..
i classified all the traffic both for incoming and outgoing to mangle table.
correct me if this is wrong stef ..

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

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

* Re: [LARTC] >10Mbit on HTB
  2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
                   ` (9 preceding siblings ...)
  2003-10-15  3:42 ` Rio Martin
@ 2003-10-15 18:44 ` Stef Coene
  10 siblings, 0 replies; 12+ messages in thread
From: Stef Coene @ 2003-10-15 18:44 UTC (permalink / raw)
  To: lartc

On Wednesday 15 October 2003 05:42, Rio Martin wrote:
> On Wednesday 15 October 2003 01:25, Stef Coene wrote:
> > On Tuesday 14 October 2003 05:59, Rio Martin wrote:
> > > > None.  Htb is an egress qdisc so it shapes outgoing traffic.  An
> > > > ingress qdisc handles the incoming packets.  And there is no queue
> > > > for the incoming packets, so you can't use htb.  You can use filteres
> > > > + policers to rate limit traffic.  Or you may take a look at the imq
> > > > device.  This is a virtual device.  You can redirect all incoming
> > > > packets to it and use htb on the imq device.
> > >
> > > Hi Stef,
> > > What do you mean by ' no queue for the incoming packets, so you can't
> > > use HTB'? For now i am not applying IMQ for the ingress, but using
> > > packet mangling under iptables to handle both incoming packets from
> > > internet and outgoing packets to internet. Is this not right? give me
> > > your opinion please, as far as i can see, there were no troubles using
> > > packet mangling to handle those situation.
> >
> > What do you mean with packet mangling?
> > And it's not because there is no queue for incoming packets that you
> > can't do anything with time.  The filter + policer setup can rate limit
> > incoming packets.  Iptables can also do rate limiting.
>
> iptables -t mangle -A bla bla bla ..
> i classified all the traffic both for incoming and outgoing to mangle
> table. correct me if this is wrong stef ..
But what has this to do with traffic shaping ????  You can mangle incoming and 
outgoing packets with iptables, but tc kicks in just before the packets are 
placed on the wire.  So after all iptables stuff and only for the outgoing 
packets.

Stef

-- 
stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

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

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

end of thread, other threads:[~2003-10-15 18:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-11 12:46 [LARTC] >10Mbit on HTB Kristiadi Himawan
2003-10-11 14:28 ` Kristiadi Himawan
2003-10-11 15:51 ` Jose Luis Domingo Lopez
2003-10-11 15:57 ` Jose Luis Domingo Lopez
2003-10-13  5:16 ` Catalin BOIE
2003-10-13  6:07 ` Rio Martin
2003-10-13 14:17 ` Kristiadi Himawan
2003-10-13 18:51 ` Stef Coene
2003-10-14  3:59 ` Rio Martin
2003-10-14 18:25 ` Stef Coene
2003-10-15  3:42 ` Rio Martin
2003-10-15 18:44 ` 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.