tunneldigger icon indicating copy to clipboard operation
tunneldigger copied to clipboard

TC/Traffic Control does not always work

Open RalfJung opened this issue 3 years ago • 1 comments

A user is reporting that traffic control is not working for them. I found this in the logfile:

Dez 23 19:20:44 gw4.saar.freifunk.net tunneldigger[3089]: [INFO/tunneldigger.limits] Setting downstream bandwidth limit to 40000 kbps on tunnel 331.
Dez 23 19:20:44 gw4.saar.freifunk.net tunneldigger[3089]: Error: Invalid handle.
Dez 23 19:20:44 gw4.saar.freifunk.net kernel: HTB: quantum of class 10001 is big. Consider r2q change.

The "invalid handle" is harmless, as far as I know (see https://github.com/wlanslovenija/tunneldigger/issues/154). However, that other error about "quantum of class" is new.

Unfortunately I know basically nothing about TC on Linux -- I don't have any clue what "quantum of class" or "r2q change" mean, and maybe they have nothing to do with the problem.

RalfJung avatar Dec 24 '21 11:12 RalfJung

https://lartc.vger.kernel.narkive.com/E9X2YxQD/warnings-with-and-without-r2q explains what that "quantum" and "r2q" value is about. Looks like when we are adding the TC class via

class add dev %s parent 1: classid 1:1 htb rate %dkbit ceil %dkbit

we could add a quantum X to set this "quantum" value. However it also says that

Quantum is used when 2 classes are getting more bandwidth then the rate. So it's only important for sharing the remaining bandwidth. In that case, each class may send quantum bytes.

so I doubt this value is relevant for us, since we never have more than 1 class on a device.

RalfJung avatar Dec 30 '21 15:12 RalfJung