Skip to contentSkip to conversation

HTB weird problem ....

LARTC Drink Linux 3 participants 7 messages Oct 8, 2004 – Oct 9, 2004

lore
Share & tools
lore
#0 lore raw

Hello good day to all ... this is my setup
1 Linux Wireless Access Point, connected are 4 wireless gateway in which i needed to apply shaping
...
ok here is the weird part... clients on each gateway download files from the Acess Point ... a 500 mb file through ftp

on gateway 1 which is up to 64 kbps ... the result is from 60-64 kbps speed which is fine ...

on gateway 2 which is 128 kbps ... the result is varying from 130 - 132 kbps (why does it exceed)? but it is acceptable nevertheless

on gateway 3 which is up to 256 kbps ... the result is the lowest rate clients can get is up to 285-286 above limit ?!?!! why did that happen...

on gateway 4 .. which is up to 512 kbps ... the rate of the client is up to 600+ kbps ... why is that so ?!

anyway here is my script for anyone who can help ...thanks

one thing is when i ftp 2 files ... the speed is higher than the ceiling limit ....

kernel is 2.4.22 ... with QoS enabled ....

tc qdisc add dev wlan0 root handle 1:0 htb

tc class add dev wlan0 parent 1:0 classid 1:1 htb rate 1024kbps ceil 1024kbps

tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 1kbps ceil 64kbps
tc class add dev wlan0 parent 1:1 classid 1:20 htb rate 1kbps ceil 128kbps
tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 1kbps ceil 256kbps
tc class add dev wlan0 parent 1:1 classid 1:40 htb rate 1kbps ceil 512kbps

tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.245 flowid 1:10
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.246 flowid 1:20
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.247 flowid 1:30
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.248 flowid 1:40

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 48 lines · Drink Linux

Hello good day to all ... this is my setup
1 Linux Wireless Access Point, connected are 4 wireless gateway in which i needed to apply shaping
...
ok here is the weird part... clients on each gateway download files from the Acess Point ... a 500 mb file through ftp

on gateway 1 which is up to 64 kbps ... the result is from 60-64 kbps speed which is fine ...

on gateway 2 which is 128 kbps ... the result is varying from 130 - 132 kbps (why does it exceed)? but it is acceptable nevertheless

on gateway 3 which is up to 256 kbps ... the result is the lowest rate clients can get is up to 285-286 above limit ?!?!! why did that happen...

on gateway 4 .. which is up to 512 kbps ... the rate of the client is up to 600+ kbps ... why is that so ?!

anyway here is my script for anyone who can help ...thanks

one thing is when i ftp 2 files ... the speed is higher than the ceiling limit ....

kernel is 2.4.22 ... with QoS enabled ....

tc qdisc add dev wlan0 root handle 1:0 htb

tc class add dev wlan0 parent 1:0 classid 1:1 htb rate 1024kbps ceil 1024kbps

tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 1kbps ceil 64kbps
tc class add dev wlan0 parent 1:1 classid 1:20 htb rate 1kbps ceil 128kbps
tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 1kbps ceil 256kbps
tc class add dev wlan0 parent 1:1 classid 1:40 htb rate 1kbps ceil 512kbps

Quoted 8 lines

tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.245 flowid 1:10
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.246 flowid 1:20
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.247 flowid 1:30
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.248 flowid 1:40

kbps = k bytes/sec maybe you mean kbit for the rates.

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Drink Linux

hello Andy , i think they are right for
256kbps = 2048kbit ...

i have added a leaf pfifo with a limit of 1 packet per second, coz if i have 2-10 it wont work...viola !!! the ceiling rate for each class rule is now working... my problem is that you can reach the ceiling class only if you have 4-5 files getting through FTP,

ex: 256kbps Ceil

1 file ftp download = 80-90 kbps max speed 4-5 files ftp download = almost 256kbps

how can i make it work to 256kbps speed for 1 file alone ...?

:)

Quoted 68 lines · --- Andy Furniss
Quoted 3 lines · Drink Linux

Hello good day to all ... this is my setup 1 Linux Wireless Access Point, connected are 4 wireless gateway in which i needed to apply

shaping

Quoted 2 lines

...
ok here is the weird part... clients on each

gateway

Quoted 1 line

download files from the Acess Point ... a 500 mb

file

Quoted 3 lines

through ftp

on gateway 1 which is up to 64 kbps ... the result

is

Quoted 4 lines

from 60-64 kbps speed which is fine ...

on gateway 2 which is 128 kbps ... the result is varying from 130 - 132 kbps (why does it exceed)?

but

Quoted 3 lines

it is acceptable nevertheless

on gateway 3 which is up to 256 kbps ... the

result is

Quoted 1 line

the lowest rate clients can get is up to 285-286

above

Quoted 3 lines

limit ?!?!! why did that happen...

on gateway 4 .. which is up to 512 kbps ... the

rate

Quoted 1 line

of the client is up to 600+ kbps ... why is that

so ?!

Quoted 7 lines

anyway here is my script for anyone who can help ...thanks

one thing is when i ftp 2 files ... the speed is higher than the ceiling limit ....

Quoted 8 lines

kernel is 2.4.22 ... with QoS enabled ....

tc qdisc add dev wlan0 root handle 1:0 htb

tc class add dev wlan0 parent 1:0 classid 1:1 htb

rate

Quoted 12 lines

1024kbps ceil 1024kbps

tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 1kbps ceil 64kbps
tc class add dev wlan0 parent 1:1 classid 1:20 htb rate 1kbps ceil 128kbps
tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 1kbps ceil 256kbps
tc class add dev wlan0 parent 1:1 classid 1:40 htb rate 1kbps ceil 512kbps

Quoted 8 lines

tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.245 flowid 1:10
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.246 flowid 1:20
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.247 flowid 1:30
tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.248 flowid 1:40

Quoted 4 lines

kbps = k bytes/sec maybe you mean kbit for the
rates.

Andy.

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#3 lore raw
In reply to Drink Linux
Quoted 2 lines · Drink Linux

hello Andy , i think they are right for
256kbps = 2048kbit ...

ahh I see.

I just tried your setup on my eth0 and it works OK. Though HTB's stats don't seem too accurate - I used wget/ftp to judge rates.

You may need to patch HTB/use a newer kernel - there was a patch posted on this list a while back which may affect you.

Also you may need to set Hz higher or use psched = CPU for timing.

See www.docum.org .

Quoted 8 lines

i have added a leaf pfifo with a limit of 1 packet per second, coz if i have 2-10 it wont work...viola !!! the ceiling rate for each class rule is now working... my problem is that you can reach the ceiling class only if you have 4-5 files getting through FTP,

Quoted 8 lines

ex: 256kbps Ceil

1 file ftp download = 80-90 kbps max speed 4-5 files ftp download = almost 256kbps

how can i make it work to 256kbps speed for 1 file alone ...?

Get rid of the 1 packet pfifo :-)

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#4 lore raw
In reply to Drink Linux

On Friday 08 October 2004 10:58, Andy Furniss wrote:
<snip>

Quoted 1 line

Also you may need to set Hz higher or use psched = CPU for timing.

In 2.6.9 this looks like it'll be part of the make config process itself. :)

Signature · 8 lines
Jason Boxman
Perl Programmer / *NIX Systems Administrator
Shimberg Center for Affordable Housing | University of Florida
http://edseek.com/ - Linux and FOSS stuff

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#5 lore raw
In reply to Drink Linux

if i remove the 1 packet ... it would be again exceed the ceiling ... thanks ill try

r u referring to this faq in docum??!?!?!
http://www.docum.org/docum.org/faq/cache/40.html

the file linux/include/net/sched/pkt_sched.h

does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU
im using 2.4.20-22 kernel, maybel ill try 2.4.27

oh well i think i just have to check it out on monday ...thanks so much .... :D

Quoted 46 lines · --- Andy Furniss
Quoted 2 lines · Drink Linux

hello Andy , i think they are right for
256kbps = 2048kbit ...

ahh I see.

I just tried your setup on my eth0 and it works OK. Though HTB's stats
don't seem too accurate - I used wget/ftp to judge rates.

You may need to patch HTB/use a newer kernel - there was a patch posted
on this list a while back which may affect you.

Also you may need to set Hz higher or use psched > CPU for timing.

See www.docum.org .

Quoted 3 lines

i have added a leaf pfifo with a limit of 1 packet

per

Quoted 1 line

second, coz if i have 2-10 it wont work...viola

!!!

Quoted 1 line

the ceiling rate for each class rule is now

working...

Quoted 11 lines

my problem is that you can reach the ceiling class only if you have 4-5 files getting through FTP,

ex: 256kbps Ceil

1 file ftp download = 80-90 kbps max speed
4-5 files ftp download = almost 256kbps

how can i make it work to 256kbps speed for 1 file alone ...?

Get rid of the 1 packet pfifo :-)

Andy.

Quoted 5 lines

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
http://lartc.org/

_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#6 lore raw
In reply to Drink Linux
Quoted 2 lines · Drink Linux

if i remove the 1 packet ... it would be again exceed the ceiling ... thanks ill try

When you fix HTB you won't need it.

Quoted 5 lines

r u referring to this faq in docum??!?!?!
http://www.docum.org/docum.org/faq/cache/40.html

the file linux/include/net/sched/pkt_sched.h

include/net/pkt_sched.h is the one I changed on a 2.4.24.

Quoted 3 lines

does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU
im using 2.4.20-22 kernel, maybel ill try 2.4.27

2.4.27 should fix things HTB has been patched since 2.4.20.

If you have 8 Mbit wirless your ceil/master rates need to be a bit less to allow for overheads.

Andy.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/