OpenWrt/LEDE has pre-built packages for controlling Bufferbloat - the undesirable latency that arises when the router buffers too much data. OpenWrt calls this SQM, although it's also called active queue management - AQM.
Bufferbloat is most evident when the link is heavily loaded. It causes bad performance for voice and video conversations, causes gamers to lag out, and generally makes people say, “The Internet is slow today.”
The “luci-app-sqm” package of OpenWrt/LEDE solves the problem of Bufferbloat. In a three-minute installation and configuration, you'll have a much more lively network connection. Here's how:
TL;DR Install OpenWrt 18.06 or newer (or back to LEDE 17.01), and follow the video at: https://www.youtube.com/watch?v=FvYhifdQ92Q
Before you can optimize your network, you need to know its current state. Run a speed test to find your down/upload link speeds. To do this:
The default values described below work quite well for most situations. They represent conservative estimates that may slightly overestimate the real overhead, which is generally desirable compared to under-estimating. You may be able to improve performance by experimenting with settings, see A little about tuning SQM below.
To configure SQM, choose Network → SQM QoS to see the Smart Queue Management (SQM) GUI.
Measure your latency again with the speed test. You should notice that the measured ping times should only be slightly larger during the downloads and uploads. Try using VoIP, Skype, Facetime, gaming, DNS, and general web browsing. They should be much more pleasant, even if someone's uploading or downloading a lot of data.
You've reduced your connection's bufferbloat!
The steps above will control latency well without additional effort. The 80-95% figures mentioned above are good first-cut estimates, but you can often gain more speed while still controlling latency by making a couple experiments to adjust the settings.
If you want to spend a few more minutes tuning, do these steps.
Note: If you have a DSL link, the experiments above may produce Download and Upload values that are actually higher than the original speed test results. This is OK: the ATM framing bytes of a DSL link add an average of 9% overhead, and these settings simply tell SQM how to make up for that overhead.
Note: If you use a cable modem, you should use a speed test that runs for a longer time. Cable modem makers have gamed speed tests thoroughly by using “Speedboost”, which usually gives you an extra 10 mbits or so for the first 10 seconds (so the speed test will look good(!)). Don't be surprised if the “right” setting for your queue rates is significantly lower than the no-SQM speed test results. You may need to tune the speeds down from your initial settings to get the latency to the point you need for your own usage of your connection.
Note: You can also experiment with the other settings (read SQM - The Details for more information), but they will not make nearly as large a difference as ensuring that the Download and Upload speeds are maximized.