Networking Forums

Networking Forums > Computer Networking > Linux Networking > tc & bandwidth limit problem

Reply
Thread Tools Display Modes

tc & bandwidth limit problem

 
 
pardo
Guest
Posts: n/a

 
      05-07-2006, 03:14 PM
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
 
 
 
 
Andy Furniss
Guest
Posts: n/a

 
      05-07-2006, 07:46 PM
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
 
pardo
Guest
Posts: n/a

 
      05-09-2006, 09:44 PM
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
 
Andy Furniss
Guest
Posts: n/a

 
      05-12-2006, 03:06 PM
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
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Limit wireless bandwidth ?uzzled Broadband 14 01-04-2007 08:30 PM
bandwidth LImit ByteSurfer Windows Networking 0 12-07-2004 03:32 PM
Limit Bandwidth to/from One Host Bob Simon Linux Networking 1 08-14-2004 02:07 PM
Bandwidth limit and QoS Przemo Karlikowski Windows Networking 0 02-08-2004 02:08 PM
limit bandwidth? Mark Linux Networking 2 10-31-2003 06:30 AM



1 2 3 4 5 6 7 8 9 10 11