Smart Queue Management QOS

Smart Queue Management QOS

Smart Queue Management or SQM is an integrated network system that performs per-packet/per flow network scheduling, active queue length management (AQM), traffic shaping/rate limiting, and prioritization. It also controls Bufferbloat, the undesirable latency that comes from the router buffering too much data.

To configure Smart Queue Management, go to the Network menu and the SQM QoS submenu.

Use the Add button to add a new SQM Instance and the Instance's Delete button to remove it.

There are 3 tabs that allow you to configure the SQM Instance.

  1. Basic Settings sets the download and upload speeds of the interface link.
  2. Queue Discipline selects which queueing discipline to use on the interface link.
  3. Link Layer Adapation calculates the proper overheads for interface links such as DSL and ADSL.

But before configuring the SQM Instance there is some preparation work that needs to be done first. This includes finding out the ethernet adapter name associated with the interface you want to use and finding the speed of the link.

Interface Ethernet Adapter

ROOter supports Internet on 4 interfaces that you may want to add SQM to. These are :

  • WAN is wired Internet via the Wan port.
  • WWAN is a Wifi Hotspot.
  • WAN1 is Modem 1.
  • WAN2 is Modem 2.

To find the ethernet adapter name associated with the WAN and the modems go to the Network menu and the Interfaces submenu. The modems must be plugged into the router in order to find their adapter name.

For the WWAN ( Hotspot ) it is more involved. The Wifi Hotspot Manager must be enabled and connected for you to find the adapter name. Go to the Network menu and the Wireless submenu and click on the Hotspot's Edit button.

At the top of the ensuing page you will see the adapter name of that Wifi inteface.

This adapter name is associated with the selected Wifi radio and not specifically to the Hotspot. The correct adapter name for the Hotspot is wlan0-1.

Link Speed

In order to set up SQM correctly on an interface you need to know how fast the download and upload speeds are. Make sure that the interface is the only Internet source active on the router so you can test it's speeds. SQM for this interface must be disabled at this time.

When your network is relatively quiet, use DSLReports Speedtest to find these values.

Select the type of Internet connection you have and click on the appropriate button. Clicking on More will show more selections. Testing of your connection will then take place and you will see the results.

With the name of the ethernet adapter associated with the interface and the connection speed you are ready to create a SQM Instance for this interface.

SQM Instance

Each interface can only have a single SQM Instance created for it so you can use the one that is already created or add a new one if that is already used.

If you are adding SQM to a modem then the modem must be plugged into the router and connected before configuring the instance. If this is for a Hotspot then the Wifi Hotspot Manager must be enabled and connected before configuring. Otherwise, the ethernet adapter name will not appear in the Interface Name dropdown box.

Start with the Basic Settings tab.

  1. Select the name of the ethernet adapter for the interface from the Interface Namedropdown box.
  2. Set the Download Speedand Upload Speed to about 80-95% of the speeds you obtained from the speed test.
  3. Check the Enable this SQM Instancebox

Then go to the Queue Discipline tab.

  1. Change the Queuing Disciplineto cake.
  2. Change the Queue Setup Scriptto qos.

These are the best settings for an SQM Instance.

And lastly Link Layer Adaptation tab.

Leave the Link Layer at None (default).

Click on Save&Apply to save these changes and enable SQM on that interface.

Measure your latency again with the DSLReports Speedtest. You should notice that the measured ping times are only 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.