Am i using the wrong cake (in SQM)?

I have made a image via the openwrt-imagebuilder-25.12.1-ramips-mt7621. I am using the SQM on the router. This should be Multi-Queue and i expect to find activity from SQM on all four cores. But i only see the activity on one core. What am i doing wrong?

I am using:

apk info | grep cake
kmod-sched-cake

There is available:

apk search cake
kmod-sched-cake-6.12.74-r1

There is no “cake-mq” i presume, so i am using the correct module i think.
But since the one i am using is not using all cores, i think i am doing something wrong.

Help is appreciated. With SQM on one core, the processing power of the one core is limiting my internet connection. Using multiple cores would solve this.

The now present Multi-Queue cake in 25.12.x
backport cake-mq from Linux 7.0:

CAKE_MQ (CAKE Multi-Queue) to handle modern multi-core, high-speed networking
environments

1 Like

You hardware doesn't support it. Multiple hardware queues support is required on WAN port.

Thanks. I thought a 4 core processor was sufficient.

Cake-mq - backport of multi-core capable CAKE implementation to 25.12 branch - #68 by timur.davletshin - it's not because of CPU (CPU port supports multiple queues), but because of switch to which your WAN is connected. But you should check it for yourself to be 100% sure. I have no idea what kind of mt7621-based router you're talking about. BTW it has 2 physical cores which are hyperthreaded.

I'm no export in this deep field but maybe this helps: https://lwn.net/Articles/289137/

Thanks for all the help!

I thought the ‘cake’ was maybe renamed to ‘cake-mq’ and that this was the reason i did not find activity on all 4 processors of my CPU (indeed .2 physical cores which are hyperthreaded, checked with cat /proc/cpuinfo). I cheched in the code of linux Kernel 7.0, the ‘cake’ is not renamed, so i have the right module. It is name is 'kmod-sched-cake' in OpenWRT.

There is more info on the changes on: https://netdevconf.info/0x19/sessions/talk/mq-cake-scaling-software-rate-limiting-across-cpu-cores.html
Summery: When a network interface card (NIC) or switch port supports multi-queue, then a multiple CPU processors can handle network traffic. The ‘sch_cake’ is made in a multi-queue variant that can scale its rate limiting over multiple hardware queues and CPU cores.

With AI i came up with two test to test my hardware:

#ethtool -l wan

Channel parameters for wan:
Cannot get device channel parameters: Not supported

(this means: no multi-queue on WAN on my device)

and

#ethtool -k wan | grep rss

(which gave no responce, indicating no multi-queue on WAN on my device)

Conclusion: I don't have a multi-queue switch. So no multi-queue cake handling on my cpu is seen. Bummer.

My cpu is to slow to run SQM with cake to handle the traffic on WAN. One processor of my CPU is maxed-out, causing the bufferbloat to increase. So because of using SQM, i have more bufferbloat. I have to sacrifice a lot of bandwidth (about 15%) so the one processor can handle it, using SQM and cake. Then the bufferbloat is lower. I find i am better of without SQM and the higher (normal) bandwidth. I was hoping the multi-queue cake would solve this, but not in my case.

Drop the cake, use fq_codel if you want more speed. Drop speed to what your CPU can handle if you want cake.

One option to consider trying unrelated to cake_MQ is to enable packet steering across all CPUs. Enabling this on openwrt 24 and 25 improved cake performance on my E7350 MT7621 device.

Thanks for the tip!

I am now using:
Starting SQM script: simplest_tbf.qos on wan.300, in: 98000 Kbps, out: 96000 Kbps

This just works on my CPU...

Here below a picture of how my processors are behaving. Note the 100% in the scale. First with the cake, than reducing the throughput, than other SQM scrips. The last one works, with just a bit of reduced throughput. Note that the difference is not much between different SQM script, but when every bit counts, this is the way to go. I am happy with this! And the bufferbloat is better (=less) than without SQM.