This guide covers manipulation of 'r2q' values to compensate for messages in the messages log concerning IMQ bandwidth warnings. This guide is intended for skilled admins.
You may get a message in /var/log/messages stating something like:
kernel: HTB: quantum of class 10001 is big. Consider r2q change.
This issue can be alleviated by performing a change to the r2q value in the following file:
/usr/clearos/apps/firewall/deploy/firewall.lua
Navigate the .lua file until you find the following r2q entries:
for _, ifn in pairs(IMQIF_UPSTREAM) do execute(string.format("%s link set %s up 2>/dev/null", IPBIN, ifn)) execute(TCBIN .. " qdisc del dev " .. ifn .. " root handle 1: htb >/dev/null 2>&1") execute(TCBIN .. " qdisc add dev " .. ifn .. " root handle 1: htb default 2 r2q 1") end for _, ifn in pairs(IMQIF_DOWNSTREAM) do execute(string.format("%s link set %s up 2>/dev/null", IPBIN, ifn)) execute(TCBIN .. " qdisc del dev " .. ifn .. " root handle 1: htb >/dev/null 2>&1") execute(TCBIN .. " qdisc add dev " .. ifn .. " root handle 1: htb default 2 r2q 1") end
Change the values to 10 for both r2q parameters:
for _, ifn in pairs(IMQIF_UPSTREAM) do execute(string.format("%s link set %s up 2>/dev/null", IPBIN, ifn)) execute(TCBIN .. " qdisc del dev " .. ifn .. " root handle 1: htb >/dev/null 2>&1") execute(TCBIN .. " qdisc add dev " .. ifn .. " root handle 1: htb default 2 r2q 10") end for _, ifn in pairs(IMQIF_DOWNSTREAM) do execute(string.format("%s link set %s up 2>/dev/null", IPBIN, ifn)) execute(TCBIN .. " qdisc del dev " .. ifn .. " root handle 1: htb >/dev/null 2>&1") execute(TCBIN .. " qdisc add dev " .. ifn .. " root handle 1: htb default 2 r2q 10") end
Restart the firewall and observe the logs.
service firewall restart
If the problem persists, increment the r2q value by 5 and restart again. Repeat until the problem goes away.