Transfer rate for Qos

Greetings. I am new to openwrt, but I am already loving it. I am struggling to understand how the transfer rates work when setting up Qos. They do not seem to line up with reality. I am testing by using speed test.net. I have SQM Qos running, and in order for bandwith to be limited to 20mbps, I have to set the ingress and egress values to 52000 kbps... I would expect it to be 20000 kbps. I also installed luci-app-nft-qos to limit specific ip addresses. I listed my phone and in order to limit it to 6mbps, I have to set the value to 750kbps... again I would expect it to be 6000kbps. Am I doing something wrong or misunderstanding how these values work? Any help/advice would be greatly appreciated.

I believe you are confusing bits and bytes. 6000kbps (bits) is 6000/8 = 750 kBps (Bytes) for example

1 Like

Sorry for all the posting and deleting. My brain is not working as it should. This answers my question concerning luci-app-nft-qos, as those limits are given in bytes (which I did not realize. I will pay closer attention). However, it still leaves me wondering about SQM Qos. Those values are given in kilobits, and I have to set it to 52,000 to limit my speed to around 21 megabits. Setting it to 21,000 limits me to about 7 megabits... am I not understanding how SQM Qos works?

That's definitely weird. SQM works in kilobits per second and everyone gets that kind of limit. I think there must be something wrong in your config. But first are you testing on a wired device? Also you can't run nft QoS and SQM together as far as I know

I have tested on both wired and wireless devices with practically the same results. I was wondering about running nft QoS and SQM together, but it doesn't seem to matter. I get the same results in SQM whether nft QoS is enabled or not. I thought I might be able to accomplish the same thing in nft QOS as what SQM has to offer by setting a global rate limit at about 90%. However, I first don't understand the difference between the static and dynamic option in there. And second, it doesn't seem to matter what I do with those settings... it changes nothing. nft QOS only seems to work when I list individual ip addresses. Is there something I can check in my config to try to work through this in either nft QoS or SQM?

Turn off nft, enable SQM, and post the config along with results of speedtest at dslreports

I disabled nft and rebooted the device. I then set up an SQM instance configured as:

Here are the results from dslreports:

Fore reference, here is a report from dslreports with everything disabled:

change the interface name from br-lan to whatever you use for WAN. That's your problem.

Your "disabled" results are so good I would not run SQM on that connection unless I was trying to specifically prioritize one kind of traffic over another.

When I select the proper WAN, the results are identical to having everything disabled. Seeing that I score an A on bufferbloat with everything disabled, as you said... maybe I should just stop worrying about it!

I would like to know why nothing seems to happen when I try to set a global limit using nft. My initial purpose of using these two packages was to limit traffic on a LTE network I have at another location. I can set a limit for each individual device (a firestick that it using a couple gigabytes of data a month with minimal viewing for instance), but it would be nice to just have a global policy that says nothing gets to transfer data faster than 6-7 mbps, but not limit the whole network to that cap.

enable nft-qos the way you wanted it, and then post the output of:

nft list ruleset

With nft configured as:

the output is:

root@OpenWrt:~# nft list ruleset
table inet nft-qos-monitor {
        chain upload {
                type filter hook prerouting priority filter; policy accept;
                ip saddr 192.168.1.144 counter packets 3437 bytes 466100
                ip saddr 192.168.1.193 counter packets 2218 bytes 626069
                ip saddr 192.168.1.248 counter packets 30 bytes 2449
                ip saddr 192.168.1.241 counter packets 20917 bytes 3448823
                ip saddr 192.168.1.165 counter packets 8827 bytes 1044996
                ip saddr 192.168.1.156 counter packets 5974 bytes 1468032
                ip saddr 192.168.1.188 counter packets 3493 bytes 1726921
        }

        chain download {
                type filter hook postrouting priority filter; policy accept;
                ip daddr 192.168.1.144 counter packets 4867 bytes 5515955
                ip daddr 192.168.1.193 counter packets 1285 bytes 738402
                ip daddr 192.168.1.248 counter packets 21 bytes 14582
                ip daddr 192.168.1.241 counter packets 19254 bytes 27366259
                ip daddr 192.168.1.165 counter packets 10114 bytes 17820777
                ip daddr 192.168.1.156 counter packets 3055 bytes 4603524
                ip daddr 192.168.1.188 counter packets 4086 bytes 3582181
        }
}
table inet nft-qos-static {
        chain upload {
                type filter hook prerouting priority filter; policy accept;
        }

        chain download {
                type filter hook postrouting priority filter; policy accept;
        }
}
table inet nft-qos-dynamic {
        chain upload {
                type filter hook prerouting priority filter; policy accept;
        }

        chain download {
                type filter hook postrouting priority filter; policy accept;
        }
}

right now you have no rules set up right? show the config with the rules you want, or at least some test rules.

Perhaps I am confused about how this configuration page works. What is the section of the configuration page I posted for? Right now I do not have any individual ip addresses listed with specific rules for them, but I do have the top portion of the page configured to limit to 750 Kbytes/s. When I list specific ip addresses with their own rules down below this, those work just as one would expect.

I'm totally unfamiliar with the nft-qos package configuration, but I suspect that the "default" is just that, a default, so if you list an ip and don't provide a specific rate, it'll use that default rate.

I don't think it can limit the connection overall? I mean, it's possible to do theoretically but that might not be part of what nft-qos does?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.