Hi, does anyone know router RAM requirements for using the SQM package for quality of service?
I tried setting up SQM on a 32 MB RAM device (a TP-LINK TL-WR1043ND router). On this device, when SQM starts, I get several page allocation failure warnings from tc.
32 MB can work for minimal router/AP functions, but may repeatedly “crash”, depending on your hardware and use case
Running SQM is past "minimal router/AP functions".
Further, if you've only got 32 MB it looks like you're running a v1 device and its 400 MHz, single-core, MIPS-based SoC and single Ethernet interface probably couldn't manage much more than 50-100 mbps if memory exhaustion wasn't an issue. (A 700-800 MHz, MIPS-based SoC with two Ethernet interfaces caps out at somewhere around 200 Mbps.)
I do not, but I do know that cake can be configured with a maximum memory parameter:
Here is what man tc-cake has to say on that matter:
OTHER PARAMETERS
memlimit LIMIT
Limit the memory consumed by Cake to LIMIT bytes. Note that this
does not translate directly to queue size (so do not size this based on
bandwidth delay product considerations, but rather on worst case
acceptable memory consumption), as there is some overhead in the data
structures containing the packets, especially for small packets.
By default, the limit is calculated based on the bandwidth and RTT
settings.
You could use the advanced option strings to pass this to cake. I note that both HTB and fq_codel have similar toggles.
Now whether it is sensible to still carry 32 MB devices into the present with relative modern bandwidth is a different can of worms that I do not want to open here.
P.S.: tc -s qdisc will make cake print its current memory consumption (as well as max size IIRC)
Hi, thanks very much for the tip on the memlimit parameter. I set that and I do see tc reporting that (lower) amount of memory used in "tc -s qdisc". So it is having an effect, but I still see the tc page allocation failure log messages.
Thanks to others for their replies also. I was testing with a TP-LINK 1043ND v1 device and with a DSL connection at 5 MBit/sec down and 0.5 up, so a small connection. The example above was trying the same type of device elsewhere. I've deployed so many of these 1043NDs as VLAN-enabled routers over many years, such good hardware for their day. It would have been nice to use SQM with them on DSL connections, which are still pretty common. Finally they are hitting their limits...
To report on testing the EdgeRouterX on a 100/100 Mbit/sec fiber connection with SQM, it was at about 30% CPU usage with a full rate speed test going on, so a definite good fit for that bandwidth. It costs about $70 so a nice price.