Re: How can I test my tc script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2011-02-02 at 22:17 -0400, Optimum Wireless Services wrote:
> I would like to know how can I run some sort of benchmark test on a
> network that would simulate 10,20,50,100 users connected to see if my gw
> is handling the traffic well.
> 

I suggest using tc-viewer to see what your qdisc is actually doing
during peak use:

tc-viewer --iface=eth1 --zero --counter=1 --unit=kbit

> Here's a snip of what the script looks like:
> 
> ################ 
> Now Download interface
> 
> $tc qdisc del dev eth1 root
> $tc qdisc add dev eth1 root handle 2: htb r2q 1
> 
> $tc class add dev eth1 parent 2:0  classid 2:1 htb rate 15500kbit ceil
> 15525kbit
> 

Does the sum of all the leaf classes below add up to the root rate
above? From the HTB manual: "The rate supplied for a parent should be
the sum of the rates of its children."

This isn't necessarily your problem, but you should definitely make sure
you have it right.

> #for each user
> $iptables -t mangle -A POSTROUTING -d 172.16.100.11 -j MARK --set-mark
> 1009
> $iptables -t mangle -A POSTROUTING -d 172.16.100.11 -j RETURN
> $tc class   add dev eth1 parent 2:17    classid 2:1009 htb rate 739kbit
> ceil 850kbit prio 3

This doesn't look right to me. I see no parent 2:17 ?

> $tc filter  add dev eth1 parent 2:0     protocol ip prio 3 handle 1009
> fw classid 2:1009
> $tc qdisc   add dev eth1 parent 2:1009  handle 507: sfq perturb 2
> 
> 
> Are these rules ok?
> 

I suggest using tc-vewer as above. You'll then be able to see how much
traffic is going into each leaf class and get an idea if your rules are
working. You will also be able to compare the data rate in your qdisc
with the rate on your interface - you might even find that not all
traffic is going into the qdisc.

Andy



--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux