Poor performance from SQM at 350mbps (WRT3200ACM)

I want to add we also need coreutils-date as that will report time in nano seconds, busybox time's resolution is simply not good enough for our purpose. (Micro-spikes in CPU-usage can certainly make a shaper unhappy, while not showing up if one uses to long an sampling period for the instrumentation).

We should add checks in that script for the required sleep + date and then output a message if they're not installed. I'll put a comment in my current git version to do that properly. Hopefully I can get some time towards the end of next week to improve things and do some basic analysis now that I have JSON output.

Got the output for you.. it's too big for Pastebin.. any suggestions on where to host?

If you can zip it and drop it in this google drive folder that'd be great: https://drive.google.com/drive/folders/1v_S3oFhLEIq49ShKMxjZkgvBQK8IP9ko?usp=sharing

It will be open for write until I see the file appear, and then will be read only.

OK - it's done, thanks.

awesome, thanks for donating some real world data. Follow the results of our efforts in the other thread, things making slow progress, eventually we'll request people to donate a bunch of data once we're ready to go

i would also like to think it can, but does it work with sqm?
also looks like it still needs some work in general

would you care to measure?

It was a suggestion to the topic starter :slight_smile:
Yes software flow offload doesn't bypass qdiscs, so it should help


So I managed to get hold of a small form factor X86 box (4th gen Intel i5 with 4GB Ram) for free and I'm planning to try it out as a SQM shaper with OpenWRT - I still need the WRT3200ACM to act as AP however.

I was planning to offload all firewall/vpn/SQM/ddns/adblock etc duties to the x86 box and just have the WRT3200ACM do Wireless.

However I can't decide whether to leave LAN routing/DHCP duties on the WRT3200ACM and just create a point to point layer 3 connection between the router and the x86 box (this should make keeping my guest WiFi networks isolated easier), or whether to have all routing done on the x86 box and just have the AP as a dumb device.

Do you have any recommendations on this?

:+1: on that from me!

I put all my SSIDs on a separate VLAN and deal with policy enforcement at the router.

That's what I would do. Use vlans to isolate guest etc. Maybe get a managed switch. I really like my zyxel web managed one. Tp links are acceptable in current version.

Is it possible to use the switch in the WRT3200ACM as the managed switch under OpenWRT? Or is it not capable of managing a layer 2 device?

Answered my own question :slight_smile: https://openwrt.org/docs/guide-user/network/vlan/switch_configuration#is_there_a_vlan-capable_hardware_switch_integrated_in_your_device

So with a bit of work I can have a LAN VLAN with the regular SSIDs and 4 network ports, a Guest VLAN for the Guest SSID and then a trunk port up to the x86 box. Essentially using the WRT3200ACM as a managed switch with an AP attached internally.

Yes, it's pretty easy to set up the WRT3200 as a managed switch, if the 4 ports are enough for your purposes. Otherwise, you can break-out more VLAN capable ports with a dedicated managed switch.


So the plot thickens. I spent quite a few hours the last few days setting up SQM on a seperate x86 box (dual core 2.9Ghz). Only to find... the exact same behaviour. :-/

Running Modem->x86 Box->PC on 1gig ethernet directly over Cat6 cables still ended me up with erratic downloads speeds capping out around 250mbps when SQM was enabled at 330mbps. WIth SQM disabled I got the full 350mbps WAN speed.

I will redo the test tomorrow and send you the log files from your script.

I do have a theory... the cable connection I have from Virgin Media is well known to be highly speed variable during peak hours. On their forums people regularly report that during peak evening times their speed (on an advertised 350mbps package) can drop as low as 50mbps.

If the speed of the SQM managed link is varying widely and dropping well below the configured ingress speed - would that have a dramatically adverse effect on SQM performance?

Yes, it would. I have some custom scripts that might work better under these conditions. will be a few days before I can get them to you.

EDIT: by the way, you will not regret getting that x86 router up and running. so don't worry that you've wasted your time.

yea, welcome to "high-speed" cable.
if your isp is the bottleneck, no sqm-setup on your end will make any difference.
i "downgraded" from 200mbps to 50 three years ago for exactly this reason.

rating internet connection for capacity is like rating a camera for raw resolution...

Yes, ingress shaping only works if the shaper has control over the true bottleneck (or rather if the shaper is the artificial bottleneck) otherwise the bottleneck will move back into the CMTS and bufferbloat will be as without enabling SQM. Now if your ISP allows its CMTS-shaper to use burst of above-contracted bandwidth to make up for more sparse transmit opportunities on a congested link, this might make cake think that it needs to throttle aggressively to get back to the desired ingress rate and that would manifest as a relatively high bandwidth loss with cake as compared to without. In that case it might make sense to try to set cake to a larger interval/target value so it gets a bit more tolerant to bursting (but note that will also increase the latency under load increase, so this does not come for free)

Indeed. I have run a few more tests today in 'off-peak' hours and SQM is running just fine at 330mbps on the x86 box.

During peak hours with SQM disabled the throughput can vary during speed tests, but not by much and stays fairly consistent through the test. With SQM enabled however, when the line speed drops below the SQM rate threshold the impact is much more severe and results in huge spikes in latency and I suspect some dropped packets - so much so it causes DSL Reports to abort the speedtest in many cases, which is something I've never seen before.