tc & bandwidth limit problem

This is a discussion on tc & bandwidth limit problem within the Linux Networking forums, part of the Linux Forums category; Hi everyone. I'm trying to implement the Linux 2.6 QoS capabilities to distribute the bandwidth in my network ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-07-2006
pardo
 
Posts: n/a
Default tc & bandwidth limit problem

Hi everyone. I'm trying to implement the Linux 2.6 QoS capabilities to
distribute the bandwidth in my network apps, but I can't get the limits
to work properly.

For example:

tc qdisc add dev eth0 parent root handle 1: htb default 1
tc class add dev eth0 parent 1: classid 1:1 htb rate 520kbit

These sample commands should maintain output traffic to a maximum of 520
kbit/s , if I'm correct.
But the transfers here become in fact limited to approximately one
quarter (25%) of that value.
No matter what I put as 'rate', a limit seem to be enforced at 25% of
it.

(I get same results when I try cbq or tbf qdiscs, too.)

Anyone knows what the problem could be? Thanks!!
--
Pardo
Powered by: Linux, KDE, Firefox
Following: GUNDAM SEED, .hack//Roots, Kore ga Watashi no Goshujin-sama!
Playing: Silver Knights, Oblivion
Reply With Quote
  #2 (permalink)  
Old 05-07-2006
Andy Furniss
 
Posts: n/a
Default Re: tc & bandwidth limit problem

pardo wrote:
> Hi everyone. I'm trying to implement the Linux 2.6 QoS capabilities to
> distribute the bandwidth in my network apps, but I can't get the limits
> to work properly.
>
> For example:
>
> tc qdisc add dev eth0 parent root handle 1: htb default 1
> tc class add dev eth0 parent 1: classid 1:1 htb rate 520kbit


Using htb default on eth can mess things up - your arp will get delayed.

Better not to use default and make a catch all IP filter.

tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 match u32 0 0
flowid 1:1

Andy.
Reply With Quote
  #3 (permalink)  
Old 05-09-2006
pardo
 
Posts: n/a
Default Re: tc & bandwidth limit problem

pardo wrote:
> tc qdisc add dev eth0 parent root handle 1: htb default 1
> tc class add dev eth0 parent 1: classid 1:1 htb rate 520kbit
> These sample commands should maintain output traffic to a maximum of
> 520 kbit/s , if I'm correct.
> But the transfers here become in fact limited to approximately one
> quarter (25%) of that value.
>


Solved: new kernel build replacing CONFIG_NET_SCH_CLK_CPU with
CONFIG_NET_SCH_CLK_GETTIMEOFDAY .
Maybe the cpu cycle counter doesn't work well as clock source on this
athlon-M w/powernow, which is.. frequently hopping frequencies :) -_-'
--
Pardo
Powered by: Linux+KDE+Firefox
Watching: GUNDAM SEED, .hack//Roots
Playing: Silver Knights, Oblivion
Reply With Quote
  #4 (permalink)  
Old 05-12-2006
Andy Furniss
 
Posts: n/a
Default Re: tc & bandwidth limit problem

pardo wrote:
> pardo wrote:
>
>>tc qdisc add dev eth0 parent root handle 1: htb default 1
>>tc class add dev eth0 parent 1: classid 1:1 htb rate 520kbit
>>These sample commands should maintain output traffic to a maximum of
>>520 kbit/s , if I'm correct.
>>But the transfers here become in fact limited to approximately one
>>quarter (25%) of that value.
>>

>
>
> Solved: new kernel build replacing CONFIG_NET_SCH_CLK_CPU with
> CONFIG_NET_SCH_CLK_GETTIMEOFDAY .
> Maybe the cpu cycle counter doesn't work well as clock source on this
> athlon-M w/powernow, which is.. frequently hopping frequencies :) -_-'


OK - that's the default now, the point about arp still stands you don't
really want it delayed/dropped with bulk traffic.

Talking of clocks Hz 1000 makes HTB more accurate as does changing an
option called HYSTERESIS to 0 in the source - net/sched/sched_htb.c

Hz is 250 default now, I don't know whats happened to my clock drift on
my desktop, I just noticed that on 2.6.16.11 it's now 100 times worse
than my gateway - in the past it's always been about 7 times worse and
that's on a uniprocessor/single core.

Andy.
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:29 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0