SQM configuration /etc/config/sqm
The sqm-scripts package in OpenWrt controls Bufferbloat - the undesirable latency that comes from the router buffering too much data. Smart Queue Management (SQM) is our name for an intelligent combination of better packet scheduling (flow queueing) techniques along with with active queue length management (AQM).
The Smart Queue Management (SQM) page explains how to setup SQM to mitigate bufferbloat latency.
This page discusses options found in the SQM configuration file in /etc/config/sqm
.
Sections
The queue
section declares buffer parameters for an interface.
Name | Type | Required | Default | Description |
---|---|---|---|---|
enabled | boolean | no | enable or disable the queue section | |
interface | string | yes | eth0 | interface name |
upload | integer | 2032 | Upload speed (kbit/s) (egress) set to 0 to selectively disable egress shaping | |
download | integer | 14698 | Download speed (kbit/s) (ingress) set to 0 to selectively disable ingress shaping | |
linklayer | string | none | “none”, “ethernet”, or “atm”. Link-layer adaptation. See sqmlink_layer_adaptation_tab | |
overhead | integer | 0 | Per Packet Overhead, bytes | |
tcMTU | integer | 2047 | Maximal Size for size and rate calculations, bytes; needs to be >= interface MTU + overhead | |
tcTSIZE | integer | 512 | Number of entries in size/rate tables, TSIZE; for ATM choose TSIZE = (tcMTU + 1) / 16 | |
tcMPU | integer | 0 | Minimal packet size, MPU (byte); needs to be > 0 for ethernet size tables | |
ilimit | integer | (none) | Hard limit on ingress queues; leave empty for default | |
elimit | integer | (none) | Hard limit on egress queues; leave empty for default | |
itarget | string | (none) | Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for automatic selection, put in the word default for the qdisc's default. | |
etarget | string | (none) | Latency target for egress, e.g. 5ms [units: s, ms, or us]; leave empty for automatic selection, put in the word default for the qdisc's default. | |
ingress_ecn | string | ECN | “ECN” or “NOECN”. Explicit congestion notification (ECN) status on inbound packets (ingress) | |
egress_ecn | string | ECN | “ECN” or “NOECN”. Explicit congestion notification (ECN) status on outbound packets (egress) | |
target | string | 5ms | Latency target for ingress, e.g 5ms [units: s, ms, or us]; leave empty for automatic selection, put in the word default for the qdisc's default. | |
squash_dscp | integer | 1 | Squash DSCP on inbound packets (ingress). 1 = squash, 0 = do not squash | |
squash_ingress | integer | 1 | Ignore DSCP on ingress. 1 = ignore, 0 = allow | |
qdisc | string | fq_codel | fq_codel efq_codel nfq_codel sfq codel ns2_codel pie sfq cake (availability varies, check /var/run/sqm/available_qdiscs) | |
script | string | simple.qos | Queue setup script (see table below) | |
iqdisc_opts | string | (none) | Advanced option string to pass to the ingress queueing disciplines; no error checking, use very carefully. | |
eqdisc_opts | string | (none) | Advanced option string to pass to the egress queueing disciplines; no error checking, use very carefully. | |
qdisc_advanced | boolean | false | [only used by the luci-app-sqm package] | |
qdisc_really_really_advanced | boolean | false | [only used by the luci-app-sqm package] |
Queue Setup Scripts
Name | Default | Description |
---|---|---|
simple.qos | yes | BW-limited three-tier prioritisation scheme with fq_codel on each queue. |
simplest.qos | no | Simplest possible configuration: HTB rate limiter with your qdisc attached. |
layer_cake.qos | no | This uses the cake qdisc as a replacement for htb as shaper and fq_codel as leaf qdisc. This exercises cake's diffserv profile(s) as different “layers” of priority. This script requires that cake is selected as qdisc. See: http://www.bufferbloat.net/projects/codel/wiki/Cake for more information |
piece_of_cake.qos | no | This just uses the cake qdisc as a replacement for htb as shaper and fq_codel as leaf qdisc. It just does not come any simpler than this, in other words it truly is a “piece of cake”. This script requires that cake is selected as qdisc. See: http://www.bufferbloat.net/projects/codel/wiki/Cake for more information |
simplest_tbf.qos | no | Simplest possible configuration (TBF): TBF rate limiter with your qdisc attached. TBF may give better performance than HTB on some architectures. |