Skip to main content

Optimising the Internet connection on a router with OpenWrt

Recently while playing Call of Duty Mobile, I would occasionally experience a sudden slowdown in the form of increased ping, which would make the game temporarily unplayable.

In my home I have a few devices connected to the network. Thanks to streaming services, our household easily downloads over 1TB (1000GB) of data per month with about 50GB of data sent. With a 100/10Mbps connection, that’s a lot.

A sudden jump in Internet traffic has a negative impact on people playing online in the form of so-called lag.

This sudden jump, slowdown, extended response time (ping) is related to the so-called Bufferbloat - lag between packets.

While it is difficult to deal with this with a normal router (Linksys WRT32X with the factory software uses the so-called Killer Prioritization Engine to optimize, among others, Bufferbloat), with OpenWrt there is no major problem with this, because we can add this type of functionality.

To do this, you need to install the SQM (Smart Queue Management) package:

opkg update
opkg install luci-app-sqm

or from LuCI (System > Software).

Setup is incredibly simple.

We go to Network > SQM QoS.

OpenWrt — Network > SQM QoS

In the Basic Settings tab, check Enable this SQM instance and select our interface to which our Internet connection is connected.

Next, you need to set the speed of your Internet connection.

It is recommended to set the speed to 95% of the full connection speed, although, as part of the test, you can decide for yourself which setting is best. Since each connection has a certain amount of overhead, we are usually able to achieve more than officially stated.

My Virgin Media router with the assigned configuration allows you to receive up to 117 Mbps (117000047 bps) for downloads and 10.50 Mbps (10500047 bps) for uploads.

At the beginning I set 100000 kbit/s download (equivalent to 100 Mbps) and 10000 kbit/s upload (equivalent to 10 Mbps), then increased the download to 110000 kbit/s (equivalent to 110Mbps).

In order not to clutter our router’s log with unnecessary entries, I changed Verbosity to only reporting errors (error).

OpenWrt — SQM QoS — Basic Settings

In the Queue Discipline tab, I changed the default fq_codel to cake and selected the piece_of_cake.qos script.

OpenWrt — SQM QoS — Queue Discipline

In the Link Layer Adoption tab I selected Ethernet and Per Packet overhead (byte): 44.

Depending on your connection type, Per Packet overhead may be worth experimenting with (22, 26, 34), although 44 is the optimal setting.

OpenWrt — SQM QoS — Link Layer Adaptation

And that’s it.

Then Save & Apply and you’re all set.


If you have noticed, in the Basic Settings tab there is a green Add button, which allows you to add additional configuration in case we have additional internet connection on our router.


Here’s how using DSL Reports - Speed ​​Test my internet connection gained some stability.

Before (without SQL QoS):

Bufferbloat pre SQM QoS

After (SQL QoS, Cake, piece_of_cake, LLA 44):

Bufferbloat post SQM QoS

Can you see the difference? 😎

Best regards.

Share on Threads
Share on Bluesky
Share on Linkedin
Share via WhatsApp
Share via Email

Comments & Reactions

Categories