40mbps Flint 2 SQM settings help

Hi guys, so now that I've finally been able to hook the Flint 2 to my modem, I need to configure the SQM. I only touched the basic settings tab. I have a 40 down/6 up mbps connection, so I tried with 37000 and 5000, eth1 (cake and piece of cake were default on 2nd tab). This was the result before:

and the results after applying these settings are the same. What do I need to change?

Please post the full /etc/config/sqm file content.

It would also be helpful to run:

tc -s qdisc

Then immediately run the test again, then immediately run:

tc -s qdisc

Post the before and after output to compare the stats.

this is the sqm file content:
config queue 'eth1'
option qdisc 'cake'
option script 'piece_of_cake.qos'
option linklayer 'none'
option enabled '1'
option verbosity '5'
option download '37000'
option debug_logging '0'
option upload '5000'
option interface 'eth1'

I'll try the command and test in a second

before:

root@GL-MT6000:~# 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 fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 27119800 bytes 55848 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1510 drop_overlimit 0 new_flow_count 151 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8015: dev eth1 root refcnt 2 bandwidth 5Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 11415555 bytes 43131 pkt (dropped 32, overlimits 24909 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 130560b of 4Mb
 capacity estimate: 5Mbit
 min/max network layer size:           30 /    1514
 min/max overhead-adjusted size:       30 /    1514
 average network hdr offset:           14

                  Tin 0
  thresh          5Mbit
  target            5ms
  interval        100ms
  pk_delay       13.6ms
  av_delay       1.58ms
  sp_delay         38us
  backlog            0b
  pkts            43163
  bytes        11445093
  way_inds          786
  way_miss         1600
  way_cols            0
  drops              32
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1514
  quantum           300

qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
 Sent 28120616 bytes 43631 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan5 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev ra0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 395645026 bytes 1151342 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 7570 drop_overlimit 0 new_flow_count 3869 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 ra1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 rax0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 223286573 bytes 723781 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 7145 drop_overlimit 0 new_flow_count 3120 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev rax1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 apcli0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 apclix0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 pppoe-wan root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 182249284 bytes 727536 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1492 drop_overlimit 0 new_flow_count 8917 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8016: dev ifb4eth1 root refcnt 2 bandwidth 37Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 28731408 bytes 43631 pkt (dropped 0, overlimits 29584 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 34Kb of 4Mb
 capacity estimate: 37Mbit
 min/max network layer size:           60 /    1514
 min/max overhead-adjusted size:       60 /    1514
 average network hdr offset:           14

                  Tin 0
  thresh         37Mbit
  target            5ms
  interval        100ms
  pk_delay        330us
  av_delay         63us
  sp_delay          1us
  backlog            0b
  pkts            43631
  bytes        28731408
  way_inds          150
  way_miss         1568
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            1
  bk_flows            1
  un_flows            0
  max_len          1514
  quantum          1129

after:

root@GL-MT6000:~# 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 fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 30137487 bytes 66078 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1510 drop_overlimit 0 new_flow_count 197 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8015: dev eth1 root refcnt 2 bandwidth 5Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 13567228 bytes 50128 pkt (dropped 50, overlimits 30265 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 230656b of 4Mb
 capacity estimate: 5Mbit
 min/max network layer size:           30 /    1514
 min/max overhead-adjusted size:       30 /    1514
 average network hdr offset:           14

                  Tin 0
  thresh          5Mbit
  target            5ms
  interval        100ms
  pk_delay       4.64ms
  av_delay        794us
  sp_delay          6us
  backlog            0b
  pkts            50178
  bytes        13620454
  way_inds          834
  way_miss         1906
  way_cols            0
  drops              50
  marks               0
  ack_drop            0
  sp_flows            4
  bk_flows            1
  un_flows            0
  max_len          1514
  quantum           300

qdisc ingress ffff: dev eth1 parent ffff:fff1 ----------------
 Sent 31010455 bytes 50863 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan2 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan3 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan4 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan5 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc noqueue 0: dev lan1 root refcnt 2
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc fq_codel 0: dev ra0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 395887455 bytes 1152948 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 7570 drop_overlimit 0 new_flow_count 3871 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 ra1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 rax0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 223385939 bytes 724688 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 7145 drop_overlimit 0 new_flow_count 3124 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc fq_codel 0: dev rax1 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 apcli0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 apclix0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 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 pppoe-wan root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 4Mb ecn drop_batch 64
 Sent 184270227 bytes 734540 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
  maxpacket 1492 drop_overlimit 0 new_flow_count 9113 ecn_mark 0
  new_flows_len 0 old_flows_len 0
qdisc cake 8016: dev ifb4eth1 root refcnt 2 bandwidth 37Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100ms raw overhead 0
 Sent 31722495 bytes 50863 pkt (dropped 0, overlimits 32867 requeues 0)
 backlog 0b 0p requeues 0
 memory used: 34Kb of 4Mb
 capacity estimate: 37Mbit
 min/max network layer size:           60 /    1514
 min/max overhead-adjusted size:       60 /    1514
 average network hdr offset:           14

                  Tin 0
  thresh         37Mbit
  target            5ms
  interval        100ms
  pk_delay        195us
  av_delay         17us
  sp_delay          1us
  backlog            0b
  pkts            50863
  bytes        31722495
  way_inds          834
  way_miss         1877
  way_cols            0
  drops               0
  marks               0
  ack_drop            0
  sp_flows            3
  bk_flows            1
  un_flows            0
  max_len          1514
  quantum          1129

Try Ethernet with overhead as link layer and set the package overhead to 44. SQM has been solid for me on this model

I would also suggest going to the Queue Discipline tab, and checking the Advanced Configuration box, and then checking the Dangerous Configuration box.

Update these options:

  • Qdisc options (ingress): nat ingress
  • Qdisc options (egress): nat


like this? Also, should I disable network acceleration?

sorry what does that mean? How do i do that?

No, put those options in the 2 fields starting with "Advanced option string to pass to the...". You must be using stock GL-inet firmware running 21.02.

Ok done. Oh I thought the luci gui was the same for everybody
EDIT: also, how do i know i chose the right interface?

The GUI has been modified/simplified between 21.02 and 23.05, so the text descriptions are different.

For the Link Layer Adaptation tab, set the Link Layer to "Ethernet..." and put the number 44 in the "Per Packet Overhead (bytes)" box that appears.

got that one too thanks. I edited the reply later sorry: how do i know i chose the right interface?
EDIT: ok, so ifstatus wan shows device is eth1, so i guess that's right

It should be the WAN interface, which is likely eth1. So you should be fine.

GODDAM NOW THAT'S AN IMPROVEMENT:

Should I try raising up and down limits now? they're not at 95%, they're quite below

You can experiment with increasing one at a time, but as soon as you start to see unwanted latency, back down to the previous value. I would tune the upload before the download.

Those result were with 37000 and 5000. Now raised to 40000 and 5900:

I think this is a pretty good sweet spot. Thanks guys, I absolutely love you! Now I hopefully won't have any more issues with random lags for the first time ever!
I'll make sure to backup the sqm file

If your connection is DOCSIS cable, you can also try to reduce the overhead bytes from 44 to 18. If that makes things worse, go back to 44. But with a more accurate overhead, you might see slightly more throughput, as long as the latency stays under control. 44 is the conservative, safe value, however.

I have no idea what DOCSIS cable is honestly and I wouldn't know how to check

OK, better to leave it alone then. 44 is safe.

If you want to think about it later, who is your ISP and what kind of device did they give you to plug your router into? What model is it?