From: Michael Tremer Date: Wed, 13 Feb 2013 18:01:18 +0000 (+0100) Subject: QoS: Make fq_codel queues smaller and remove HTB qdisc when QoS stops. X-Git-Tag: v2.13-core66~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=24dbd0f7ed1fbab999baaf6dcaefb864f9c83c86;p=people%2Fms%2Fipfire-2.x.git QoS: Make fq_codel queues smaller and remove HTB qdisc when QoS stops. http://patchwork.openwrt.org/patch/2681/ --- diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl index 202bf4da1c..8c4f77c0b1 100644 --- a/config/qos/makeqosscripts.pl +++ b/config/qos/makeqosscripts.pl @@ -58,6 +58,7 @@ my $subclassfile = "/var/ipfire/qos/subclasses"; my $level7file = "/var/ipfire/qos/level7config"; my $portfile = "/var/ipfire/qos/portconfig"; my $tosfile = "/var/ipfire/qos/tosconfig"; +my $fqcodel_options = "noecn limit 800 quantum 500"; &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); @@ -70,13 +71,11 @@ $qossettings{'DEF_INC_SPD'} = ''; $qossettings{'DEFCLASS_INC'} = ''; $qossettings{'DEFCLASS_OUT'} = ''; $qossettings{'ACK'} = ''; -$qossettings{'MTU'} = '1492'; $qossettings{'RED_DEV'} = `cat /var/ipfire/red/iface`; $qossettings{'IMQ_DEV'} = 'imq0'; $qossettings{'TOS'} = ''; $qossettings{'VALID'} = 'yes'; $qossettings{'IMQ_MODE'} = 'PREROUTING'; -$qossettings{'QLENGTH'} = '1000'; &General::readhash("${General::swroot}/qos/settings", \%qossettings); @@ -161,10 +160,6 @@ case "\$1" in ### INIT KERNEL modprobe sch_htb - ### SET QUEUE LENGTH & MTU - has just to be tested!!! IMPORTANT - ip link set dev $qossettings{'RED_DEV'} qlen $qossettings{'QLENGTH'} - #ip link set dev $qossettings{'RED_DEV'} mtu $qossettings{'MTU'} - ### ADD HTB QDISC FOR $qossettings{'RED_DEV'} tc qdisc del dev $qossettings{'RED_DEV'} root >/dev/null 2>&1 tc qdisc add dev $qossettings{'RED_DEV'} root handle 1: htb default $qossettings{'DEFCLASS_OUT'} @@ -225,7 +220,7 @@ foreach $classentry (sort @classes) if ($qossettings{'RED_DEV'} eq $classline[0]) { $qossettings{'DEVICE'} = $classline[0]; $qossettings{'CLASS'} = $classline[1]; - print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 1:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: fq_codel\n"; + print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 1:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: fq_codel $fqcodel_options\n"; } } foreach $subclassentry (sort @subclasses) { @@ -233,7 +228,7 @@ foreach $subclassentry (sort @subclasses) { if ($qossettings{'RED_DEV'} eq $subclassline[0]) { $qossettings{'DEVICE'} = $subclassline[0]; $qossettings{'SCLASS'} = $subclassline[2]; - print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 1:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel\n"; + print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 1:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel $fqcodel_options\n"; } } print "\n\t### FILTER TRAFFIC INTO CLASSES\n"; @@ -419,10 +414,6 @@ print </dev/null 2>&1 tc qdisc add dev $qossettings{'IMQ_DEV'} root handle 2: htb default $qossettings{'DEFCLASS_INC'} @@ -483,7 +474,7 @@ foreach $classentry (sort @classes) if ($qossettings{'IMQ_DEV'} eq $classline[0]) { $qossettings{'DEVICE'} = $classline[0]; $qossettings{'CLASS'} = $classline[1]; - print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: fq_codel\n"; + print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'CLASS'} handle $qossettings{'CLASS'}: fq_codel $fqcodel_options\n"; } } foreach $subclassentry (sort @subclasses) { @@ -491,7 +482,7 @@ foreach $subclassentry (sort @subclasses) { if ($qossettings{'IMQ_DEV'} eq $subclassline[0]) { $qossettings{'DEVICE'} = $subclassline[0]; $qossettings{'SCLASS'} = $subclassline[2]; - print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel\n"; + print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 2:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel $fqcodel_options\n"; } } print "\n\t### FILTER TRAFFIC INTO CLASSES\n"; @@ -695,6 +686,7 @@ print </dev/null 2>&1 (sleep 3 && killall -9 qosd &>/dev/null) & # DELETE QDISCS + tc qdisc del dev $qossettings{'RED_DEV'} root >/dev/null 2>&1 tc qdisc add root dev $qossettings{'RED_DEV'} fq_codel >/dev/null 2>&1 tc qdisc del dev $qossettings{'IMQ_DEV'} root >/dev/null 2>&1 tc qdisc add root dev $qossettings{'IMQ_DEV'} fq_codel >/dev/null 2>&1