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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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. |