OpenWrt Forum Archive

Topic: sqm br-lan

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi

I have one doubt

Why when I apply SQM in br-lan using next setting My speed test says 5Mbps and not 20Mbps of download

Download speed (kbit/s) (ingress): 20000
Upload speed (kbit/s) (egress): 5000

Is it inverted name between download and upload ???

Thanks

(Last edited by jxtrem on 26 Jul 2017, 17:31)

Usually SQM is applied on the WAN interface. Why are you applying it to br-lan?

Remember that your upload speed also affects your download speed when using TCP connections, since all received packages need to be acknowledged as well.

Actually, I have a br-lan and br-vwifi (associated  to virtual ssid) and my WAN interface is eth2 (HiLink lte modem). I apply the sqm to the eth2 interface and I checked than setting in Download and Upload speed is OK when you use speedtest.net.
I applied to bridge interface because I want to limit bandwitdh in the lan of virtual ssid (br-vwifi) so when I put speed value download and upload are working in inverse order. In this point I dont understand WHY, why my sqm download speed is the upload speed in speedtest.net and upload speed in sqm is download speed in speedtest.net

Also I remember than when I apply the sqm to WAN interface it works worse than in br-lan. Several elementos are not loaded, for example miniature review in youtube or photos in daily sites, also are so slowly to show the photos.

Model TP-Link TL-MR3220 v2
Firmware Version    OpenWrt Barrier Breaker 14.07 / LuCI Trunk (0.12+svn-r10530)

(Last edited by jxtrem on 27 Jul 2017, 15:25)

I presume you run the speed test from a client computer that is connected to the br-lan? If so, then your result does make sense, even though the situation is somewhat strange. The SQM speeds are always from the perspective of the router.

For WAN-side, download is fetching from Internet, and upload is sending to Internet. For LAN-side, download is receiving from LAN, and upload is sending to LAN. And you've set the maximum speed to send into LAN to 5 Mb/s. All packets go through your router.

Thus, you are capping the maximum speed that your router is sending data to br-lan, even though it might receive it faster from the Internet.

OK Thanks,

Yes, I know I am limiting the max speed

However I am understanding than Download speed and Upload speed have different meaning depending of interface where you apply the sqm-script

:S

Now I see. Yes, they are reversed.

It's always a view from inside the router, looking out through an interface. Download speed is traffic coming in through the interface, and upload speed is the reverse. It doesn't matter where the interface is connected to, the behavior is the same.

I know download and upload are different hmm

But my doubt about the description Download speed (ingress) and Upload speed (egress) was solved after you said always the reference point is ROUTER, because

                      <---upload--------                     <---download----
     WAN-side                               ROUTER                               LAN-side
                      --download------->                    ----upload------->

I think the post was solved

Thanks

The problem is that the situation is slightly more complex than users really want to spend time on thinking through, so for the GUI sqm opted for the simple (but not gernerically correct) monikers "Download speed" and "upload speed" instead of the more correct "ingess" and "egress" (though these are mentioned in parentheses). This was done under the asumption that novice users would most likely just use one sqm instante on the WAN interface and be done with... For more advanced users the sqm documentation at https://lede-project.org/docs/howto/sqm left some "bread crumbs" in the last bullet point: "This discussion assumes SQM is instantiated on an interface that directly faces the internet/WAN. If it is not (e.g., on a LAN port) the meaning of ingress/egress flips. In that case, specify egress queueing disciplines as nat dual-dsthost and the ingress one as nat dual-srchost."...
I still believe the GUI makes the right choice, as the alternative would be to scare away too many users by having the required initial learning curve being too steep...

Hey moeller0

are you saying than I need write nat dual-dsthost and nat dual-srchost when I am applying the sqm-script to br-lan interface ??? like this

https://i.snag.gy/E2nRVS.jpg

no error checking, use very carefully.....??

(Last edited by jxtrem on 27 Jul 2017, 21:06)

jxtrem wrote:

Hey moeller0

are you saying than I need write nat dual-dsthost and nat dual-srchost when I am applying the sqm-script to br-lan interface ??? like this

[img]thttps://lh5.googleusercontent.com/1sNTyhcVFOhpyB6wJyfG_I55m7ilwTncuOVm88lq-64CdL45u3xaznJjGdqk6qhbBnlVxN3LLzNotzY=w1366-h599[/img]

no error checking, use very carefully.....??

Well the linked image gives a 403 error, so I do not know exactly what you ask...could you try to simply post your modified /etc/config/sqm?

Best Regards

P.S.: In case you switched to LEDE builds already, could we move the discussion over to the LEDE forum (if you are still using openwrt then let the discussion stay here)?

I nerver have edited /etc/config/sqm the only sqm luci

htt p s://drive.google.com/file/d/0B6rM2jcRklIpemRoR0tSM2MwaTA/view?usp=sharing

you can move to LEDE forum, although the flash of my router i think is not enought to use sqm same extra packages of barrier breaker

jxtrem wrote:

I nerver have edited /etc/config/sqm the only sqm luci

        All changes made in the GUI effectively get passed into /etc/config/sqm, and when started, sqm will process that config file.

jxtrem wrote:

htt p s://drive.google.com/file/d/0B6rM2jcRklIpemRoR0tSM2MwaTA/view?usp=sharing

        That looks like what I expect to be correct for a setup where ingress corresponds to internet upload and egress to internet download, so this should be corect for br-lan IMHO.

jxtrem wrote:

you can move to LEDE forum, although the flash of my router i think is not enought to use sqm same extra packages of barrier breaker

Na, only if you use LEDE. Side-note lede and openwrt are going to re-unite, but it is not yet clear which forum will selected for the future, so I presume for the time being the best place is depending on whether the openwrt or lede are actually used.

hey please

is it a correct config now ??

config queue
        option qdisc 'fq_codel'
        option script 'simple.qos'
        option linklayer 'none'
        option enabled '1'
        option interface 'br-lan'
        option qdisc_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'
        option qdisc_really_really_advanced '1'
        option iqdisc_opts 'nat dual-srchost'
        option eqdisc_opts 'nat dual-dsthost'
        option download '20000'
        option upload '5000'

it is not working, all very slow connection

(Last edited by jxtrem on 28 Jul 2017, 01:55)

Hi jxtrem

jxtrem wrote:

hey please

is it a correct config now ??

config queue
        option qdisc 'fq_codel'
        option script 'simple.qos'
        option linklayer 'none'
        option enabled '1'
        option interface 'br-lan'
        option qdisc_advanced '1'
        option squash_dscp '1'
        option squash_ingress '1'
        option ingress_ecn 'ECN'
        option egress_ecn 'NOECN'
        option qdisc_really_really_advanced '1'
        option iqdisc_opts 'nat dual-srchost'
        option eqdisc_opts 'nat dual-dsthost'
        option download '20000'
        option upload '5000'

it is not working, all very slow connection

Thanks for posting this. I had not noticed before, but since you are using fq_codel neither "nat" nor "dual-srchost" or "dual-dsthost" are valid keywords (they only work for the cake qdisc). And unfortunately, what happens if sqm encounters invalid keywords (for a direction) is that it fails to instantiate (in that direction. So either switch to cake/piece_of_cake or clear the two advanced options fields...

Best Regards

OK

last question

root@wars:~# /etc/init.d/sqm restart
SQM: Trying to start/stop SQM on all interfaces.
SQM: /usr/lib/sqm/run.sh Stopping SQM on interface: eth2
SQM: ifb associated with interface eth2: ifb4eth2
SQM: /usr/lib/sqm/stop.sh: Stopping eth2
SQM: ifb associated with interface eth2: ifb4eth2
SQM: /usr/lib/sqm/stop.sh: ifb4eth2 shaper deleted
SQM: /usr/lib/sqm/stop.sh: ifb4eth2 interface deleted
SQM: /usr/lib/sqm/run.sh Queue Setup Script: /usr/lib/sqm/simple.qos
SQM: ifb associated with interface eth2:
SQM: trying to create new IFB: ifb4eth2
Failed to find sch_fq_codel. Maybe it is a built in module ?
SQM: Squashing differentiated services code points (DSCP) from ingress.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: egress shaping activated
SQM: Do not perform DSCP based filtering on ingress. (1-tier classification)
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: ingress shaping activated

what does Failed to find sch_fq_codel. Maybe it is a built in module  mean ?

jxtrem wrote:

OK

last question

root@wars:~# /etc/init.d/sqm restart
SQM: Trying to start/stop SQM on all interfaces.
SQM: /usr/lib/sqm/run.sh Stopping SQM on interface: eth2
SQM: ifb associated with interface eth2: ifb4eth2
SQM: /usr/lib/sqm/stop.sh: Stopping eth2
SQM: ifb associated with interface eth2: ifb4eth2
SQM: /usr/lib/sqm/stop.sh: ifb4eth2 shaper deleted
SQM: /usr/lib/sqm/stop.sh: ifb4eth2 interface deleted
SQM: /usr/lib/sqm/run.sh Queue Setup Script: /usr/lib/sqm/simple.qos
SQM: ifb associated with interface eth2:
SQM: trying to create new IFB: ifb4eth2
Failed to find sch_fq_codel. Maybe it is a built in module ?
SQM: Squashing differentiated services code points (DSCP) from ingress.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: egress shaping activated
SQM: Do not perform DSCP based filtering on ingress. (1-tier classification)
SQM: get_limit: CURLIMIT: 1001
SQM: get_target defaulting to auto.
SQM: ingress shaping activated

what does Failed to find sch_fq_codel. Maybe it is a built in module  mean ?

It means exactly that, there is no easy way to figure out whether a qdisc is build in or exists as a module. Since module autoloading does not seem to be robustly available at all sqm-script target systems, sqm scripts defaults to attempting to load modules for all required qdiscs. The error you see occurs if a module does not exist. sqm will later check whether the required qdiscs seem actually to be functional, which will catch the case where a qdisc does not exist as either built-in or module...

Hope that helps...

The discussion might have continued from here.