How to use the cake queue management system on the Turris Omnia

i have been using cake w/ peice of cake, although when there is no one on the network in the mornings other than myself, i still experience ping fluctuation from the 15ms up to around 25 sometimes even 30ms.that is the part that gets me… i have a non puma6 modem which shouldn’t have any additional latency over my rtt, although the ping still moves around in a tight space.it cant be my isp at this point because ive gone in and tried to fix any outside issues that may have been and node usage is usually around 12% during day. ive seen other people get their ping very consistent and idk if thats because they have a different router or what… i want to master this sqm stuff that way i have full control over what gets priority packets sent out etc… what other settings can i mess with that way the gaming packets (since their is no way to manual say hey i want this ip/mac address to get first priority over everything else) come in and go out first before everything else?

The official documentation of PuTTY is a good place to start: https://the.earth.li/~sgtatham/putty/0.69/htmldoc/

Thank you very much, seems to work really well for a long time!

how did you disable all offloads? and what does that do?
and can doing so reduce latency?

Install ethtool (opkg update ; opkg install ethtool) in case it is not installed already then issue the following (replace $IFACE with the real ethernet interfaces that you want to affect):
ethtool -K $IFACE gso off
ethtool -K $IFACE tso off
ethtool -K $IFACE ufo off
ethtool -K $IFACE gro off

Most of these offloads will make the kernel do less work as all aggregated packets share a lot of common information (source address and port, destination address and port, and more); in essence the kernel will do the routing work only once per giant-meta-packet instead of once per ethernet frame, and at the lowest possible level these giant packets are segmented into normal full MTU ethernet frames; pretty clever and a big help if you want to route high bandwidth traffic without using up all cpu cycles. BUT that also means that especially at the sending stage giants will introduce some serialization delay, as the qdiscs (like cake and HTB) will only see a single very large packet and will send this to the lower levels as one large unit, the next packt will only be send after the giant has been segmented and all segments have been sent… E.g. assume an 11 segment giant that measures roughly 11 * 1538 = 16918 Bytes, which at say 5Mbps upload will occupy the link for ((1115388) / (5*1000^2)) * 1000 = 27.0688 milliseconds. So depending on your available bandwidth you might want to disable offloads.

The easiest way to test this is to log into your router via ssh and issue the following command (without the quotes):
“tc -s qdisc”
There will be output fields named something like max_packet or max_len (not quite sure, but cake and fq_codel use different names) that show the size of the biggest packets that the qdisc encountered, unless after some uptime of the router during which you had typical traffic patterns there will be values larger than say 1800 turning offloads off is not going to help you (unless there is an offload bug for your router).

Hope that helps.

EDIT: changed the wrong “opkg upgrade” to the desired “opkg update”, thans to @quietsche for catching that error!

nice,thank you for the explanation. i will try to apply it as best i can.

For sure you wanted to do a opkg update? Please change this in your post, as it may break other users systems.

1 Like

Thanks a lot for catching that! Error should be corrected by now.

curious, how come the (kmod-sched-cake) Queuing discipline doesn’t come stock like fq_codel?

Because the kernel module isn’t in Linux upstream yet.

1 Like

Hello everybody,

I have a somewhat different question. After I have implemented the settings on the recommendation of @moeller0 and these work wonderfully, does it still make sense to use the software cFos Speed further? Use traffic shaping and the automatic RWIN increase. If sqm with cake flawlessly works (Tablet, Phone, Notebook) is it determined at 200mbit completely sufficient?

For tips and suggestions I would be grateful!

Best regards!

As far as I can tell it still makes some sense to keep running cfos speed on the windows client. If cfos speed could be used to DSCP mark outgoing packet it would actually be a great addition to cake, but I severely doubt that it does.
But the easiest way is simply to test, run comparable workloads at comparable time of day and day of week, with and without cfos speed and evaluate whether you notice a difference… (Since I have neither windows hosts, nor cfos speed installed in a VM I can not test this myself, and even if I could, your question is about your own perception, so testing yourself seems quite reasonable.)

Best Regards

After a few days and different scenarios I would think that the deployment is worthwhile.
If it is not a plecabo effect :slight_smile:
DSLReports still achieves a triple A+ with and without cfos speed, however, felt in various online games a slightly better ping and reaction of the game.

All in all, as in a previous post from you, it is whining at a very high level.

Thanks again @moeller0 for your help and your tireless commitment to this topic.

Best regards

I also have issues with SQM and IPv6. My ISP uses 6rd on a fiber link and with SQM enabled my IPv6 throughput drops to ~20 kB/s. (i tried several sqm scripts and disciplines, no change)

With the help of @opotonil comment, i no longer have these issues till i reboot the omnia.

Does anybody know how to make this persistent on reboot and possibly better on ifup of eth1?


OpenWrt omnia 15.05 r47055
Kernel 4.4.106

In LuCI, go to System >> Startup and scroll down. Under Local Startup you can add custom commands to run at startup.

Hello everybody,

I accidentally discovered some new disciplines in the settings. Is anyone able to explain this in more detail what’s up with these?
Are these better, worse or different? Especially “test_WAN_dual-isolate__piece_of_cake.qos” has my interest. Do you have to adjust / change other options when switching?

best regards

These were distributed just for testing, if you follow https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm (especially the SQM - the details-> “Making cake sing and dance, on a tight rope without a safety net”) you will have all the relevant configurations described in more detail. I hope that helps…

Sorry for the noobiness here… I just installed luci-app-sqm package along with the sqm-scripts. I also tried installing cake using the opkg install kmod-sched-cake command line and it gave me this…
Unknown package 'kmod-sched-cake’
Collected errors:

  • opkg_install_cmd: Cannot install package kmod-sched-cake

not needed, sqm-scripts will install it

did you try if it works?

kmod-sched-cake seems to be available in the LEDE repo but not in OpenWRT and thus neither in TO.