Couldn't figure out sqm

These are my hardware:
Modem - CM600. hardware version is 1.01B, firmware version is V1.01.22
Router- GL-B1300(version 3.203); here is a snapshot of my system details(firmware version etc.)

So my router's previous version usually give me grade A on bufferbloat according to dslreports.com. I was using codel on that previous version. The recent upgrade(3.203) had cake so I upgraded right away. Now the default is fq_codel and simple.qos. With those I get the same results as the previous version but I feel like I'm experiencing bufferbloat more frequently. So I decided to try cake(and piece_of_cake.qos) and behold, no matter what I limit my upload and download, I only get B or C.. Obviously I'm on the default now but I'm left wondering why cake is not what it was hyped up to be...

I tried checking out why I keep getting packet loss when I'm gaming(I play valorant) and I get packet loss spikes so I looked around for a solution and I discovered pingplotter. [The results seemed fine to me]https://imgur.com/T0TAKs6). So can someone please explain and maybe give me a solution as to why this is happening? All I want is to play without lagging.

By the way: I don't have any apps open when I'm gaming except for discord, I don't have anything open when I'm doing speedtests, I am solo-ing a cable 800/18 connection.

You have so asymmetric connection with 44:1 download:upload ratio, that possibly cake spends too much time in calculating download related things. Big part of the small upload bandwidth is likely needed for download related protocol traffic (acknowledgments etc.)

Additionally, the almost gigabit speed is really high, adding to the CPU load.

What are the sqm settings that you have tested?

1 Like

Wow, that is REALLY asymmetric! Beats my local cable co here in the US, where I have 940/35, and they want people to move to things like 500/10.

Yeah, check the basics, like using top or top to see if your router is running out of CPU while handling your data rate. (check if idle time is getting done to 0%)

Also, look at some of the advanced cake settings, like ack-filter, to apply on the egress, which should lower some of the ack load...

If running out of gas is the main problem, theres trying other qdiscs than cake, they may use less CPU, or a trick I used when I had more speed than router to handle it, just apply cake to the egress. Just about any router could handle 15mbit, and I found that just doing that got me 2/3ds of the debloating benefit of both ways.

One additional comment.
You are apparently using the gl-inet's proprietary firmware based on an forked old version of OpenWrt. We have no knowledge of the respective SQM and cake version there, nor about the modifications that they have done to the main code or to SQM and cake.

So, some of the advice you may get here might be wrong, as it might contain references/options related to the current cake version etc.

1 Like

+1; TCP Reno will send by default one ACK packet for every two full MSS packets received, so for an MTU around 1500, that end up with a data stream to ACK ratio of ~ 40/1, your 800/18 = 44.4/1 is already too extreme to allow a hypothetical TCP Reno to achieve the full download rate your ISP promises... (In all likelihood your ISP uses some sort of ACK-filtering in your modem to "thin out" the ACK stream, which works bebause ACKs are accumulative and the receiver does not insist on receiving each individual ACK packet, as long as the ACK-sequence number gets increased). Modern techniques like generic receive offload (GRO) and generic segmentation offload (GSO) will merge mergeable packets into larger metapackets and will only ACK these meta packets, reducing the ACK rate.

Mmh, try to figure out the IP address of Valorant's Game Servers and run pingplotter against these...

Could you please post the output of (for 2, 3, 4 log into your router via ssh or putty, and run the commands on the command prompt offered by your router and then copy and paste the result into this thread, preferable as code:

Please use the "Preformatted text </>" button for logs, scripts, configs and general console output.
grafik
Please edit your post accordingly. Thank you! :slight_smile:

):

  1. A speedtest with SQM disabled

  2. cat /etc/config/sqm

  3. ifstatus wan

  4. tc -s qdisc

  5. a speedtest with SQM enabled

For speedtests, around here we like either the dslreports speedtest (see here for recommendations) or the waveform bufferbloat test (copy and paste the link from the Share your result field into this thread).

1 Like

I have only tried fq_codel with simple.qos & cake with piece_of_cake.qos

I almost pooped myself when I saw all the replies here. Too much technical words that I barely understood the meaning of but I still gotta try so if any of what I did is incorrect please correct me with steps so I can just follow them sequentially. Also, it's my first try using ssh or putty(I used putty) and my first time posting so I'm still not familiar with formats but I really appreciate your help.

(1) When SQM is disabled

(2)

root@GL-B1300:~# cat /etc/config/sqm

config queue
        option debug_logging '0'
        option verbosity '5'
        option linklayer 'none'
        option interface 'eth0'
        option qdisc_advanced '0'
        option download '680000'
        option upload '15300'
        option enabled '1'
        option qdisc 'cake'
        option script 'piece_of_cake.qos'

(3)

root@GL-B1300:~# ifstatus wan
{
        "up": true,
        "pending": false,
        "available": true,
        "autostart": true,
        "dynamic": false,
        "uptime": 421647,
        "l3_device": "eth0",
        "proto": "dhcp",
        "device": "eth0",
        "metric": 10,
        "delegation": true,
        "ipv4-address": [
                {
                        "address": "71.202.247.142",
                        "mask": 22
                }
        ],
        "ipv6-address": [

        ],
        "ipv6-prefix": [

        ],
        "ipv6-prefix-assignment": [

        ],
        "route": [
                {
                        "target": "71.202.244.1",
                        "mask": 32,
                        "nexthop": "0.0.0.0",
                        "source": "71.202.247.142\/32"
                },
                {
                        "target": "0.0.0.0",
                        "mask": 0,
                        "nexthop": "71.202.244.1",
                        "source": "71.202.247.142\/32"
                }
        ],
        "dns-server": [
                "75.75.75.75",
                "75.75.76.76"
        ],
        "dns-search": [
                "hsd1.ca.comcast.net."
        ],
        "inactive": {
                "ipv4-address": [

                ],
                "ipv6-address": [

                ],
                "route": [

                ],
                "dns-server": [

                ],
                "dns-search": [

                ]
        },
        "data": {
                "hostname": "GL-B1300-ec0-5G",
                "leasetime": 345600
        }
}

(4)

root@GL-B1300:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth0 root
 Sent 78014535 bytes 250712 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 parent :1 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 15944372 bytes 49355 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :2 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 26413825 bytes 74387 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :3 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 15384078 bytes 58800 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth0 parent :4 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 20272260 bytes 68170 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc ingress ffff: dev eth0 parent ffff:fff1 ----------------
 Sent 1158015020 bytes 841771 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc mq 0: dev eth1 root
 Sent 152431535417 bytes 117599100 pkt (dropped 0, overlimits 0 requeues 215)
 backlog 0b 0p requeues 215
qdisc fq_codel 0: dev eth1 parent :1 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 29711201698 bytes 23256980 pkt (dropped 0, overlimits 0 requeues 34)
 backlog 0b 0p requeues 34
  maxpacket 67770 drop_overlimit 0 new_flow_count 52 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :2 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 46178479780 bytes 35165103 pkt (dropped 0, overlimits 0 requeues 64)
 backlog 0b 0p requeues 64
  maxpacket 66616 drop_overlimit 0 new_flow_count 59 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :3 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 40416169414 bytes 30941861 pkt (dropped 0, overlimits 0 requeues 52)
 backlog 0b 0p requeues 52
  maxpacket 67770 drop_overlimit 0 new_flow_count 158 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev eth1 parent :4 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 36125684525 bytes 28235156 pkt (dropped 0, overlimits 0 requeues 65)
 backlog 0b 0p requeues 65
  maxpacket 67770 drop_overlimit 0 new_flow_count 111 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wifi0 root refcnt 2 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev wifi1 root refcnt 2 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev ifb4eth0 root refcnt 2 limit 1024p flows 1024 quantum 1514 target 5.0ms interval 100.0ms ecn
 Sent 1193305940 bytes 840735 pkt (dropped 119, overlimits 0 requeues 372)
 backlog 0b 0p requeues 372
  maxpacket 67770 drop_overlimit 0 new_flow_count 6972 ecn_mark 0
  new_flows_len 1 old_flows_len 4
root@GL-B1300:~#

(5) When SQM is enabled with default(fq_codel and simple.qos), done at 85% of 800/18

When SQM is enabled with cake and piece_of_cake.qos, done at 85% of 800/18

Also please teach me how to reply using quotes. I want to reply just like you replied to mine and the other user but I can't figure it out. I saw the instructions on the right when I was going to type my reply but I can't figure it out.

@JonP I'm actually from California and I have Comcast Xfinity. I'm not really that tech savvy or knowledgeable about openwrt so how do I use "top or top..." ? I've only relied on video guides and a few text guides on openwrt so I didn't mess with the advanced settings.

Mmmh, maybe reading though this and that gives you a bit more background information on how to configure SQM?

This clearly lacks the overhead compensation, maybe add the following to /etc/config/sqm:

	option linklayer 'ethernet'
	option linklayer_advanced '1'
	option tcMTU '2047'
	option tcTSIZE '128'
	option tcMPU '64'
	option overhead '18'

This will properly account for the overhead applicable on a DOCSIS/cabe link (I assume your comcast link is not via fiber/FFTH). There are more configuration options you might want to try, but I guess you first want to read the SQM documentation in the links above (if you still have questions afterwards, I am happy to respond).

Good, eth0 is the "natural" interfac to instantiate SQM on.

This indicates that SQM was not instantiated/started at all (the entries for cake are missing), probably my fault since I failed to ask you to enable SQM between steps 1) and 2)... sorry for that.
Could you please run the following commands via SSH and copy and paste the results here in the thread:

SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm stop ; SQM_DEBUG=1 SQM_VERBOSITY_MAX=8 /etc/init.d/sqm start

But the other potential issue I see is that traffic shaping at rates >>200 Mbps is quite demanding, so I am not sure that your router has enough CPU cycles to actually reliably shape at 680Mbps...
Which is also apparent from the fact that the two speedtests with SQM all stay well below what you need to expect with your shaper setting of 680 Mbps:
680 * ((1500-20-20)/(1500+14)) = 655.7 Mbps

That is easy, at least on a desktop computer with a "real" browser:
Start editing your reply, then navigate to the post you want to cite from, mark the section you want to quote, and note the grey "Quote button appear. Then simply click that button and the marked text will be pasted into your editor window with the correct decoration to make it a proper quote with back reference to the post it came from.

BTW, what type of modem do you use? Because if it is an intel Puma6 based modem, SQM will never be able to remove all bufferbloat, see this.

And regarding using the forum, the official? discourse site has this handy first steps tutorial.

Top is a tool that one can access thru SSH and the command line. Typical use is "top -d1" which will give you a 1 second updating list of system performance, list of running tasks, etc. In that, you get the idle% and the sirq%. Those are the ones to watch. When the idle approaches 0 and the sirq 100%, the system is running out of CPU. This often happens with regular CPU not getting all that high, so it's confusing at a first look. Cake will start not working well, when things hit the limits, it won't just break.

Run top, and then a speedtest and see if you are running out of gas...
Two examples below, one not doing much, the other a full load Speedtest.


I'd start with a good basic Cake setup, are you using Luci or the command line for setting up? Start reducing the speed, down from where you are, until you see lower latency numbers. Maybe try 200Mb, and work your way up. After that, we can get you doing some of the fine tuning you should read about in the above mentioned OpenWrt doc pages.

Edit: Yikes! Just took a look at the system shot you posted. Are you running the stock firmware on that thing? It's Chaos Calmer, 15.0.5.1?? That is ancient!! Looks like you could run 19 or 21 versions. A lot of what we might suggest, might not be there yet on that early of FW and SQM, so I'd think about updating it to a recent version.