Understand SQM and bufferbloat

I'm testing SQM on a TP-Link Archer C2600 with a FiOS connection to see if it improves my overall network performance. I'm testing using http://www.dslreports.com/speedtest
Without SQM, my bufferbloat grades are mostly Bs with some Cs, and my quality grades are a mixture of As and Bs. With SQM (using standard settings, with cake / piece_of_cake, as recommended here: https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm), I still get a lot of bufferbloat Bs and Cs (perhaps even more Cs than before), but now the quality is pretty consistently A+
Should I be taking these results seriously? Why is bufferbloat itself not improving - I thought that was the whole point of these SQM recommendations? I understand that if you don't have the CPU power for it, SQM won't work well, but I checked using top and idle never goes below 25%.
I saw this: SQM makes bufferbloat worse
Any guidance?

I haven't looked at the specs on that device but is it a 2 cores 4 threads device? Perhaps 25% means "saturating one thread"?

NEVERMIND: I was thinking load, but you were saying idle... The device has 2 cores. so 25% idle could easily mean saturating one core and 50% saturating another core. Since SQM is single-threaded, if its core is saturated, it'd be unable to do a proper job.

Also you don't say anything about your speeds. Can you link to a speedtest result without and then with SQM?

In addition, could you please show us your SQM configuration?

Okay, here are two fresh tests - I get a B for bufferbloat on both, but the quality goes from B to A+:

Without SQM: http://www.dslreports.com/speedtest/67374092
With SQM: http://www.dslreports.com/speedtest/67374121

This is Verizon FiOS 100/100 (up to 110 each way in practice).

~# cat /etc/config/sqm

config queue 'eth1'
option qdisc_advanced '0'
option interface 'eth0'
option debug_logging '0'
option verbosity '5'
option qdisc 'cake'
option script 'piece_of_cake.qos'
option linklayer 'ethernet'
option overhead '44'
option enabled '1'
option download '90000'
option upload '90000'

Ignore the letter grades, the second one had substantially improved buffer management.

It does feel like you should be able to do a tad better though.

With SQM on during a speed test, if you watch top -d 1 what does the idle percent do? And what does it do if you set the speed to 50Mbps

1 Like

C2600 will have similar CPU frequency scaling issues to R7800 - suggest reading the R7800 performance thread, starting with using the performance governor and then try tuning ondemand governor settings. Without this, ~100Mb/s symmetrical will be pushing close to limits with SQM enabled.

I concur with @dlakelan, Looking at the detailed bufferbloat figures (try clicking e.g. the link named 'Downloading' below the middle bar in the bufferbloat plot) SQM easily shaves of 100ms from tge Latency under load with a saturating download, from > 150 to 35ms. The upload however does not seem to improve much... but there except for the spikes visible in both tests even without SQM the bufferbloat is not terrible.

Here's the latest test.

Watching top, I see that idle drops to as low as 25%, and seems to bounce between 25-40% for the most intensive portions of the test. The grade is C here, and I'm not sure how to interpret the more detailed latency increase plots: they seem pretty low overall, with some really bad spikes?

Here's a test with speed set to 50000.

Idle never drops below 50% here, and it bounces between 50-70% for the more intensive portions.

I looked at the more detailed figures of the original tests, and I see the latency decrease there.

I looked at the R7800 thread, but it's a bit much for me - a whole spectrum of confusing and conflicting recommendations, over 2.5 years and considerable OpenWrt development. Is there any specific tweak from that thread that anyone would recommend?

I will very likely just drop SQM altogether - I'm not noticing much real world improvement, and as I discussed in this thread, it seems to cause instability on my unit (perhaps due to the heavy CPU usage?) In fact, the router spontaneously restarted several hours ago, whereas before (re)enabling SQM, it used to stay up for at least weeks at a time.

Thank you everyone for your help. I'm happy to try further tweaks before giving up.

For sure a problematic graph. Everything is great except that last upload data point... That's really weird.

If you're seeing instability perhaps the cpu is throttling due to heat. Does this unit have a fan? I wonder if adding an external fan maybe by USB would improve things

I don't think the unit has a fan. Perhaps I'll try one sometime - thanks. Something like one of the AC-Infinity Multifans? [from this thread]

Yeah something like that should help with heat if that's the issue.