Tuning bandwidth throttling

Hi

I have a box with SuSE-11.1 as a router and a switch on the LAN side giving internet access to a bunch of users. On the external side is a very lousy ADSL with approx. 77K/s downstream and 50K/s upstream. In order to speed up interactive connections using ssh I have installed bandwith throttling with a script like this: The Ultimate Traffic Conditioner: Low Latency, Fast Up & Downloads

First: It works very well for speeding up interactive connections and it does balance service for different users in the LAN fairly well. However I need some advice in tuning the parameters to get the most out of my bandwith.

tc -s qdisc show dev eth1 (eth1 being the WAN side)

qdisc cbq 1: root rate 100000Kbit (bounded,isolated) prio no-transmit
Sent 36244434 bytes 61636 pkt (dropped 0, overlimits 22896 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 0 overactions 0 avgidle 78 undertime 0
qdisc sfq 10: parent 1:10 limit 127p quantum 1506b perturb 10sec
Sent 1879720 bytes 30767 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc sfq 20: parent 1:20 limit 127p quantum 1506b perturb 10sec
Sent 34364714 bytes 30869 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
qdisc ingress ffff: parent ffff:fff1 ----------------
Sent 61937366 bytes 79465 pkt (dropped 1414, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0

tc -s class show dev eth1

class cbq 1: root rate 100000Kbit (bounded,isolated) prio no-transmit
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 0 overactions 0 avgidle 78 undertime 0
class cbq 1:1 parent 1: rate 360000bit (bounded,isolated) prio 5
Sent 36244170 bytes 61635 pkt (dropped 0, overlimits 0 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 5669 overactions 0 avgidle 78 undertime 0
class cbq 1:10 parent 1:1 leaf 10: rate 360000bit prio 1
Sent 1879720 bytes 30767 pkt (dropped 0, overlimits 153 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 1 overactions 103 avgidle 78 undertime 0
class cbq 1:20 parent 1:1 leaf 20: rate 324000bit prio 2
Sent 34364450 bytes 30868 pkt (dropped 0, overlimits 24210 requeues 0)
rate 0bit 0pps backlog 0b 0p requeues 0
borrowed 5668 overactions 5955 avgidle -23816 undertime 58066

Question is how to interpret those borrowed / overactions / avgidle / undertime values and tune the speed parameters accordingly to optimize throughput.

Any hints would be appreciated.
Regards, Thomas

You’d have to read the mathematical explanation of how traffic control works, what those metrics mean, then work out which knobs to turn and experiment a bit. There should be links in the LARTC to technical papers.

If this doesn’t sound very helpful it’s because TC is really is fairly complicated, and even I would have to relearn all this stuff if I wanted to do it again. Scripts of necessity make a lot of simplifying assumptions which may or may not suit your situation.

Hi

Thanks a lot. You’re helpful insofar as I know now that I’m pretty much on my own here. I’m one of those old fashioned guys who does read the manuals and in fact I studied LARTC and the tc manuals but I was unable to gain much insight on how to tune, as there are a bunch of parameters and this makes a trial and error method almost impossible. I may have to read the source code (that’s what open source is good for!).

Anyone out there who knows whether HTB works together with tc and SuSE-11-1 (32Bit) without recompiling the kernel?

Thomas

IIRC Hierarchical Token Bucket is just one of the controllers that can be plugged into the TC framework, probably the best known one. I don’t know if you need to roll your own kernel on openSUSE to have TC, but if it’s already working, then chances are it’s compiled in or available as a module.