SQM configuration

im trying to set up sqm for my xfinity docsis cable connection. speed plan is 2000mb down and about 350mb up. i configured via GUI but also adjusted in the directory. just wanted an opinion if i set it up correctly

config queue 'eth2'
	option enabled '1'
	option interface 'eth2'
	option download '1000000'
	option upload '335000'
	option qdisc 'cake'
	option script 'piece_of_cake.qos'
	option linklayer 'DOCSIS'
	option debug_logging '0'
	option verbosity '5'
	option overhead '44'

1 Like

First you need to measure your actual bandwidth rather than going by plan speeds. Then set SQM to use 90% of your results.

If you follow this page, it has all the steps you need to take.

https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm

1 Like

In sqm first you need to understand the guranteed bandwidth you getting by measuring your speed, suppose you running speed test if it instantly reaching 100mbps then go further than that like it stops on 200mbps in this situation you will limit your speed to 100mbps and sqm will do the rest

This is incorrect, sqm does not know DOCSIS
Try the following instead:

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

For more bells an whistles maybe try:
to add:

        option ingress_ecn 'ECN'
        option egress_ecn 'ECN'
        option itarget 'auto'
        option etarget 'auto'
        option qdisc_advanced '1'
        option squash_dscp '0'
        option squash_ingress '0'
        option qdisc_really_really_advanced '1'
        option eqdisc_opts 'nat dual-srchost memlimit 32mb ack-filter'
        option iqdisc_opts 'nat dual-dsthost ingress memlimit 32mb'

This will give you per-internal-IP isolation (e.g. a computer doing torrents might still self congest a bit, but should not affect other computers too much), maximal buffersizing more appropriate for 1 Gbps (cake will still control the buffersize this just gives cake more memory headroom for high load cases) ack-filtering should help a bit on DOCSIS' bursty MAC and will conserve some upload bandwidth for uploading data...

1 Like

Wait so the ack filter should be on the first slot or second slot?

I was always putting overhead at 44 since my high speed. Maybe I should try 18 and also I wanted to tell you. My router does support BQL. It’s enabled but when I tried testing if the limits change dynamically they do not. Even though I see the files listed in the directory with hold time, in flight, limit min and limit max etc..

Ack filter makes most sense in upload/egress direction, so add it to eqdisc_opts.

This is fine overestimating the per packet overhead has no bad effect on latency under load...

To see changes you need to stress that interface and maybe even the CPUs... but this also might point at BQL potentially not working at all.

Ahhh it’s weird cause I have BQL files on all the interfaces

I’ve been experimenting with SQM but it feels like I have much more delay with it on while gaming. When I have it disabled and have no queuing discipline on any of the interfaces. Everything feels more fluid. Also even with SQM configured I still get sudden spikes in latency and jitter when testing for bufferbloat.

Not sure how diagnostic that is, my preferred test is to (first disable traffic shapers) and then load the network port and repeated look at the BQL values, if these actually do change BQL is doing something...

For cake that might simply be a sign, that you are trying to shape at too high a rate...
remind me gain, what rputer hardware are you using?

Computer hardware? As in what router?

My router is the Nano Pi R6S that utilizes the RK3588S chip which has about 8 cores.

Ah, this is, IIRC, a little/big combo... so you might be running cake on the little cores...

Any idea on how to fix that? lol. I’m not too technologically inclined on this sort of stuff. I know my way around cars but not this networking stuff lol..

I think there was a thread for sqm on the R6, about setting affinities or something...

Ahh yes. The guy I bought the R6S from discovered it. It was the optimization of the net smp affinity

Unfortunately that optimization was for the default fw for the R6S which is FWRT

hey good stuff with the commands you listed for me to put down. sqm feels a lot better. any other parameters that could be deemed useful that you got for me to try?? also where do you learn all these parameters? id love to learn and see what else you can tweak with SQM

Hard to say, this depends on your goals...

I was around when this stuff was developed, I would recommend the man pages for cake (tc-cake).

Am I right to assume this limits sqm's memory bandwidth access to 32mb?