OpenWrt with SQM to reduce ping?

Hey guys I am very new to OpenWrt, I like the concept of it and am specially interested in SQM. Because I am a absolute newbie I wanted to ask for your advice.

Currently I am using a Lan-Router with a sim card that provides meh good download and upload speeds, but a way to high ping to play multiple player online games. If I understood correctly I could maybe eliminate this problem by purchasing a OpenWrt-usable Lan-Router, than flashing OpenWrt and setting up SQM. My question ist would this work or I am too short thinking?

Thank you in advance!

What does a test like waveform show you?

Your unloaded ping cannot be influenced by SQM. Only loaded.


Tested again and got confusing results, so I deleted my first answer. bottom line is: most of the time ping "unloaded" is around 35ms, "download active": around +60 to +120ms, "upload active" around +50 to +70ms. (green latency category on the waveform website)

What is your ISP download/upload speed?

You say lan-router...does this mean you do not want WiFi?

Are you gaming wired or over WiFi?

your WAN connection needs constant/predictable bandwidth for SQM to be of good use. If your WAN has unstable/varying bandwidth, you will have a very hard time, configuring SQM to be of any good use. Mobile connections often dont have that consistency. There are some beta scripts discussed in the forum for non constant bandwith, but I don‘t have experience with those and those may require more fiddling.

If your WAN connection is of low quality, e.g. has occasional dropped packets or varying ping time over the day, even during times where the user clients are idle, SQM will not be of help.

The key use case for SQM is, if you have a rather low upload or limited download bandwith and have user clients that constantly max out either of both with downloads/uploads or video on demand. And if you have to fix issues with time-critical IP telephony or online gaming going on at the same time during those maxed out downloads/uploads.

Waveform test results are highly variable in my location too, and it's not my ISP service. It would be good to run a different test for comparison to make sure you are not getting false variability results.

This one works well for testing raw speed in my area. It's ping results are rudimentary, but it does at least report unloaded and up/down loaded average ping.

If you are testing latency through your WiFi, then you're testing ISP+router+WiFi latency. SQM won't solve bad WiFi latency and it's hard to tell where the problem is testing all together like this. If you're gaming system is wired to your router, that takes WiFi out of the picture.

SQM puts a lot of load on the router CPU, so you need to understand what speed service you need to shape with SQM/QoS. If your ISP is only 100 Mbps, then a cheap MT7621 ramips router will take care of SQM for you (something like a ZyXEL WSM20 Multy M1 or Belkin RT1800). If you are at half gig and willing to lose just a little of that half gig speed, something like a Netgear WAX206 or Belkin RT3200 will have enough CPU. If you have full gig service, you need something like a NanoPi R4S or x86 based router. Of these, the NanoPi R4S does not include WiFi and just has one wan and lan port each, so you need to pair it with a WiFi router that has extra ports to get WiFi and more ports.


@eginnc @Pico

Sorry for the confusion, right now I only have a router where I can put a mobile phone sim card in to get internet connection to my house, nothing other. A connection over LAN is unfortunately not possible. shows me about 80Mbps for download and 42 Mbps for upload. Ping for upload is 270ms, around 80ms for upload. Is it even possible to play online games under those circumstances?

For variable rate links we have @Lynx's great cake-autorate project:

That basically keeps adjusting the traffic shaper settings dependent on the observed latency. For some variable rate links that works pretty well, but at the cost of some more CPU cycles than normal SQM.


Measure ping on an idle connection. This will be the optimum ping time you will ever able to experience during gaming.

then measure ping during a maxed out download and upload session. This is what a game will experience at worst, if SQM is not in use.

With additional SQM enabled, the ping time during maxed out downloads or uploads will improve a lot, close to the ping times of the idle case, but SQM will not further improve the situation on an idle connection.

if the ping times on the idle connection is already 80ms/270ms (which is not good for online gaming), these times will not be improved with SQM. SQM only prevents a shitty routing strategy to make such a bad connection even worse, once the bandwidth is fully used.


Idle ping is the one farthest to the left on 23ms in this example without SQM:
I've no idea why it is not reporting download ping for me today.

And this is with CAKE SQM limiting down/up to 400/20:

Neither are great examples - I ran these tests on WiFi through a wall and around a corner.

Here's mine on 4G with cake and cake-autorate:


My 4G connection gives a stable 35-40ms unloaded RTT, a variable download bandwidth between 10-80Mbit/s and a variable upload bandwidth between 25-35Mbit/s.

cake-autorate (the most recent release is version 3.1.1) works pretty well in terms of tracking the available bandwidth, albeit as @Pico helpfully points out, if the unloaded latency is not stable, cake with or without cake-autorate cannot improve matters.

Feel free to give cake-autorate a try and post on the OpenWrt cake-autorate thread with your findings and any data or plots, and we can help you configure it for your connection. Since our connections seem rather similar, I suspect the defaults will work pretty well for you.

By the way, if you don't already have an outdoor antenna I'd get one, especially if you have line of sight to your nearest cell tower. You might consider something like the Zyxel NR7101 (which can run OpenWrt). At the very least I think you should spend some time moving around your indoor router to maximise as much as possible the reported LTE stats. Back when I used a Huawei B818-263 indoor 4G router, I was able to drastically improve the LTE stats and connection quality by adjusting the location and orientation of the device - it turned out that it worked best when placed on its side, underneath a window, parallel to the wall and in a particular upstairs room. Tin foil wrapped around the back of the device (in direction opposite to the cell tower) also helped, but it was at that point that I decided to invest in the NR7101 outdoor router, with antenna facing our nearest cell tower.


Just a sidenote:

is a better browser speedtest, as it will show the individual latency probe results:

However, without redactions this test will also report its estimate of your location (which in my case, I am happy to report is clearly wrong, I do not even live all that close to Hamburg) and the IPv4/6 address of the device running the test. If one is sensitive about exposing those pieces, one better edits the server location panel of the results page, I however am not (dynamic address will change soon anyway).

Side-note: Browsertests are at the same time great because they are very convenient and can be run on any end-devices where installation of measurement software would not be possible at all. But they are also not that great, because modern browsers are complex beasts and will influence the results by themselves (typically for the worse, and some of this for good reason, side-channel attacks often desire precise time information, so browsers try to not give to precise time to applications, but latency measurements also work better with more precise timing). As long as one keeps this in mind, browser tests are IMHO clearly a win.

P.S.: this is a fixed line 100/40 VDSL2 link, it is just that someone was running a big steam download simultaneously, so even the unloaded latency is already measured under load :wink:

P.P.S.: It is not that is a bad test, and they did add more detailed delay distribution information into their speedtest applications, it is just that seeing the individual probes typically is helpful. Also the Waveform speedtest is still great and useful, it is just that the cloudflare one has nicer visualsisation and the tests with different file sizes and the packet loss test (in unloaded conditions) are great tools, Where Waveform still rules supreme is in the downloadable .csv data, the cloudflare download does e.g.not seem to contain the idle latency probes... (nor the packetloss probes, these should also include an RTT estimate).


Nice! I just found my Waveform replacement. Thanks for sharing.

Clourflare's speetest is now so cool! Here's mine:

I can also recommend Cloudflare's family DNS filter (together with adblock-lean to strip out ads):

It's similar to the the CleanBrowsing family filter:

I tested RTT again on the websites mentioned here and got around 30ms unloaded. I would love to have this outdoor Zyxel router @Lynx mentioned, but as a student my budget is rather limited. I currently have a TP-Link Archer MR200 V5.2 which is according to OpenWrt not supported but apprently someone here in the forum found a solution to get OpenWrt on this router: Adding OpenWrt support for TP-Link Archer MR200 V5.3 - #31 by EisAmStiel

Is my current Archer MR200 router even powerful enough to run cake-autorate? RAM is 64MB...

I think it might be a stretch, but I'll defer to @patrakov or @moeller0 here.

Is 8MB sufficient flash memory to include a minimal set of cake packages and bash(?), and is:

MT7628 @ 580MHz

powerful enough to shape at circa 80Mbit/s, whilst leaving enough headroom to run cake-autorate with very relaxed settings?

You could always simply buy an RT3200 (they are pretty cheap) and use it downstream of your MR200. I use one downstream of my Zyxel. They can shape at a few hundred Mbit/s.

Regarding the "sufficient storage" question, the answer is "yes" - TP-Link Archer C7 v2 was definitely usable with CAKE-Autorate with a significantly reduced ping rate.

Regarding the ability to shape at 80 Mbit/s, again, TP-Link Archer C7 v2 (which is a mipsel-based platform with a single CPU clocked at 720 MHz but often bottlenecked on the DDR2 memory speed) is definitely usable in a real setup up to around 100Mbit/s.

Yes @richb-hanover-priv wrote this helpful field report for the Archer C7 here:

But what about the MR200?

Regarding Archer C7 v2, my initial testing (from the hotel where PLDT could not fix their ADSL for months) was with this router :slight_smile:

Another question is whether the OP needs autorate. I would suggest trying the basics first: a static shaper tuned for 60/30 Mbps. That's most likely within the hardware capabilities. If it isn't, one can always downshape it further.

I would be careful with a straight up compare on clock rate alone of an Archer C7 with a 720 MHz MIPS 74K CPU to an MR200 with a 580 MHz MIPS 24K CPU to estimate SQM performance.

I would guess the CPU load on an MR200 handling just basic routing and WiFI is going to be higher than on a C7 handling the same tasks. In other words, all else being equal, the MR200 is going to have a smaller proportion of its CPU capability left over for SQM, before even considering the impact of its slower clock rate on what CPU capability it does have left over for SQM. And unfortunately, all else is not equal: MIPS 74K is also 12 to 20 percent more efficient per unit clock rate than MIPS 24K.

The MR200 could still shape enough throughput for gaming if you get past the risks of loading an unsupported OpenWrt build on it, but I would certainly not expect it to handle ~100 Mbps * 580/720 SQM throughput. My guess is it will be a good bit less than that.

Does the OEM firmware let you put your MR200 in bridge mode and turn it into a straight modem? And actually, even if you cannot put it into bridge mode and have to double NAT, you still might consider turning off its WiFi and relegating the MR200 to modem/router duty only. The idea here is that you could pick up a relatively inexpensive all-in-one device officially supported by OpenWrt to handle routing, firewall SQM and WiFi (double routing if bridge mode is not an option on the MR200) . If you go this route, I would still suggest something like a WSM20 Multy M1, Belkin RT1800 or Netgear WAX202, preferably used, since budget is an issue for you. These are less expensive MT7621 targets that also support 802.11ax WiFi so that if you later upgrade your router to handle faster future ISP service, one of these can still be useful as a managed switch and "dumb" WiFi AP. A MT7622 based Belkin RT3200 or WAX206 would be an even better choice if you find a used bargain (an open box RT3200 is $39.99 shipped on ebay as I type this, but you may not be located where that is an option), but that is more capability / future proofing than your budget can probably stand.