Help me to configure SQM (BIG mistake in SQM Cake)

#1

I already configure SQM perfectly as in this guide:
https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details

But I have a problem that all downloads, web browsing, YouTube videos are not separated by categories and when I'm playing I get lag, ping spike, disconnect, etc for example Fortnite.

layer_cake in queue setup NO WORK

I already test with:
For ingress queueing disciplines: nat dual-dsthost
For egress queueing disciplines: nat dual-srchost

It works, but it has a big problem, when in the console or pc that I am playing it is downloading or updating a game, it gives me lag and disconnects me from the games.

Long story short what I need to do:

  • prioritize types of traffic in general but...
  • ... also have possibility to specify rules down particular applications that would be prioritized above anything else.

It is possible to use at the same time luci-app-qos (Old QoS prioritize category) and luci-app-sqm (SQM QoS Cake)?

Something like this, but better:

#2

If you see latency going up, SQM isn't configured properly. Tone down the ingress/egress speeds in SQM until the speedtest on www.dslreports.com no longer shows bufferbloat. Then try the games again. Also, stick to piece of cake for now instead of layer cake.

2 Likes
#3

also be aware that sqm mostly does not work correctly with internet via cable, as these are oversubscribed on the last mile and thus your homerouter will not be the device controlling the queue.

1 Like
#4

there is only lag when you are downloading something in the same console or pc.
Using piece of cake, -15% my download and upload (A Bufferbloat in www.dslreports.com)

Example:

  • If I'm downloading something on the Xbox one and I'm playing on the computer I do not have lag.
  • but if I'm downloading something on the computer and I'm playing on the computer I have lag.

Because does not exist, category and prioritization gaming about downloads.
In ASUS adaptive QoS exist Auto category and prioritization, I was asking if it is possible to add these options to SQM Cake.
ASUS Adaptive QoS - Automatic

and also in Tomato QoS exist Manual category and prioritization you can check here:
Tomato QoS - Manual (Click in Basic Settings and Classification)

Openwrt/LEDE SQM Cake is not complete, it lacks these 2 important things, category and prioritization.

We advance 2 steps forward and 5 steps backwards.

#5

SQM already enforces fairness on connection basis, and not on IP basis. So using the same PC or different one for Downloading should not matter.

That looks good :slight_smile:

How is your computer connected to the router? If it is via WiFi, you might simply be seeing bufferbloat on the WiFi link, which SQM cannot fix.

What are you downloading exactly? If you are using torrents, they can spawn hundreds if not thousands of connections. In that case, the on connection based fairness might not be appropriate. A few additional questions:

  1. What are you downloading exactly when you are running into these issues. Torrents?
  2. When experiencing lag, please run top on your router via an SSH session. Do you ever see the idle CPU % approaching zero? You might simply be running out of CPU power.

If you are using Torrents I can think of two solutions:

  1. Make the torrent use DSCP tags on the packets, and make SQM DSCP aware. I haven't done this myself before, so I cannot really help you with how to do this, but it should be explained in the documentation on the Wiki, or perhaps someone here could lend you a hand.
  2. I am not sure if this is possible, but using QOS + SQM together might be an option. Again, I am not sure if this is possible, because I haven't tried that myself before, so you might want to wait for someone else to chime in on that topic :slight_smile:
1 Like
#6

Router R7800 with LEDE

PC: Steam and Fortnite Downloads
Console: Xbox one and PS4 Downloads

I have an RT-AC68U with FreshTomato-ARM and an RT-AC86U with Asuswrt-Merlin and they NEVER give me lag or disconnections when I'm playing and downloading something (Torrent, Steam, Epic Games, etc) on the same console or PC.
Only in R7800 with LEDE SQM Cake causes me lag and disconnections, When I download something (Torrent, Steam, Epic Games, etc) on the same console or PC that I am playing.

For the same that I said before, SQM Cake lacks these 2 important things, category and prioritization.

I repeat again, "We advance 2 steps forward and 5 steps backwards."

#7

If you want Category / priority based QoS, use the QoS package. SQM is not meant to have these options. SQM is meant to provide per connection based fairness. Hence it is not lacking that. They are simply two different tools for two different goals.

However, lag and disconnections is not something you should be seeing on SQM. Please provide the additional information that I requested so we can help debugging what is going wrong at the moment:

  1. How are your PC and consoles connected?
  2. Since you are running a R7800, which has two cores, please install htop on your router (opkg update && opkg install htop) and run the htop command. Do you ever see either core hitting 100% utilization?

Ahhhh, actually, something just crossed my mind:

  1. What build you using on the R7800? If you are using the latest Lede 17.01.4, it has known latency issues with the R7800. This issue has been fixed in the latest master builds. You can either flash a master build, or flash a 18.06 beta build. However, neither of them has a GUI (Luci) by default, so make sure you are comfortable with SSH to install a GUI yourself.
2 Likes
#8
  1. Cable (1 meter of the router)
  2. The CPU Never goes up more than 20%

Yes Im using Lede 17.01.4

#9

Try using a 18.06 snapshot: https://downloads.openwrt.org/releases/18.06-SNAPSHOT/
Or master snapshot: https://downloads.openwrt.org/snapshots/targets/

Make sure you are comfortable with installing Luci manually via SSH.

Edit: Or wait a few more weeks for the final version of 18.06 to arrive :slight_smile:

1 Like
#10

I'll wait at the end just buy this router to test LEDE SQM and I'm disappointed :frowning:

But I do not understand what they removed these important things category and prioritization.
Should combine SQM Cake and QoS package and goodbye to all the problems.

#11

They didn't remove this. Again, they work exactly as they are meant to work. SQM works fine without any manual categories or prioritization. I can download at max speeds, and my fiancee won't notice a thing during her gaming sessions. QoS and SQM are two separate packages, because they have two separate goals.

No, you are simply seeing a latency issue that is caused by a known bug with the switch in the R7800. As I mentioned before, these issues have been fixed in the master branch. No need to change SQM to solve your issues :slight_smile:

I'm sorry you feel that way :frowning: These issues have been solved, but there simply hasn't been a release yet that includes said fix. Lots of volunteers are working hard to bring 18.06 to the masses soon :slight_smile: You're always free to use the snapshot builds if you want the fix right now :slight_smile:

3 Likes
#12

Thanks for your help and I hope that one day the developers will add the options mentioned above to SQM Cake.

When they release the final version 18.06 I will try again.

#13

@Help_ME what kind of internet connection do you have?

1 Like
#14

Am I correct in reading this as: you want to be able download/update software on exactly the same machine you are currently using to play a game? In that case the per ip-isolation of cake is not going to help you at all, as it will only attempt to give each concurrently active IP-adress its fair share of the bandwidth.
Say, if you update/download software on the PC can you still play reasonably well on the console?
And what bandwidth do you have available?

Best Regards

1 Like
#15

Well, in an ideal world applications would allow to configure the desired DSCP markings to allow exactly that. Doing something like that on a central element like a router is always going to be a whack-a-mole kind of game, as you will need to constantly need to come up with and supervise heuristic traffic classification rules. Microsoft actually allows to set DSCPs per application, but unfortunately only vie group policies IIRC so you would need a dmain controller in your network (or whatever is needed to use group policies).

1 Like
#16

This is worth stressing, sqm really needs to be sure it controls the real bottleneck otherwise latency under load will increase. Now, I would nor frame this as "sqm not working correctly", but rather sqm only working well if its assumptions are met, but that is just verbal gymnastics, as @fuller's point is important!

2 Likes
#17

Okay, sqm/cake are working exactly as designed. This is one of the situations where cake/sqm's goal of minimal configuration does not allow easy matching with your desires, but the only alternative is extremely fiddly and approximate rule making to differentiate the different flows so you can assign your desired priorities.

Cake's goal is to be the AQM/QoS for the rest of us, that will only require minimal configuration but will mostly do the right thing or at least no harm. What you desire simply is out of scope for what sqm aims for.

BUT if you use layer_cake, sqm will allow you to use DSCPs to move certain packets into different priority bands, so maybe you should start looking how you can make sure your packets have the desired dscp directly from the source?

2 Likes
#18

You can always use qos-scripts instead, as they seem to do what you desire. For sqm this is out of scope, even though it would be nice to have a complimentary package to allow easier rule-based dscp re-mapping on a router, so you could re-map dscp's on the LAN interface that would at least solve the problem in the outgoing direction.

But frankly in your case, I would simply play games on that device that is not currently updating/downloading (is it possible to play on a console while these things are going on in the background at all ?)

2 Likes
#19

The dual-srchost/dual-dsthost options the OP seems to have configured also try to fairly share the bandwidth between all concurrently active internal IP-addresses (and for each IP-address cake will also tar to share fairly by flow).

1 Like
#20

That sounds like you have a solution already, why not simply use that?

This again looks like sqm is not the right tool for your problem then.

1 Like