Hi
I have observed that the sqm service is not "effective" upon boot/reboot of my router (or even when the dsl drops and reconnects). The Initscript in Startup is set to Enabled.
After checking the system log, It appears that sqm tries to start loading before my dsl0 interface is on. Hence, I can see that I am exposed to bufferbloat as if I did not have sqm truned on.
However, if I manually log into luci and click start in the sqm, then it successfully runs amd mitigates bufferbloat.
I have read the following two threads and I can't figure out any way to "fix" this issue:
So I'm I having a curious issue with SQM (sqm-scripts 1.2.2-1) on a recently installed OpenWrt snapshot (r7054-64b5324). It works fine ... until I issue ifup wan (as I am doing once a day via cron, preemptive to my ISP's 24-hour disconnect). For some reason, SQM does not re-initialize on the newly brought up wan interface and is notably absent when checking bufferbloat.
My first check was /etc/hotplug.d/iface/11-sqm, but turns out it is properly called when the pppoe-wan interface comes up. Yet…
Guys, can I configure luci-app-sqm to start and enable whenever I reboot or reconnect the router? It is being a nuisance this, every time I turn off or restart the router I need to manually start and enable sqm for it to work. Thanks if you guys can explain how to configure luci-app-sqm to start automatically every time.
Also, by writing the following little script in the /etc/rc.local area does not help either. If I even use "Sleep 60" before enabling sqm, it just delays the dsl booting process by 60 seconds.
/etc/init.d/sqm enable
/etc/init.d/sqm start
exit 0
Is there any suggestion for entering a script either in the /etc/rc.local area or somewhere else in order to enable and start sqm conditional to the dsl (interface) status (UP)?
Ultimately, what I want to achieve is to have sqm live at all times when dsl is on.
Thanks
1 Like
Which version of openwrt are you using?
the latest one: 18.06.2
luci-app-sqm:1.2.4-1
Thanks, there are no changes after your version that deal with hotplug. I take it you do not use pppoe or pppoa, but rather dhcp?
Add this to the top of /etc/init.d/sqm
service_triggers()
{
procd_add_reload_trigger 'firewall' #<addthis
procd_add_reload_trigger "sqm"
}
1 Like
@Moeller0 : I use pppoe
@anon50098793 : As I am a novice in Unix/Openwrt environments, could you please demonstrate how I can edit /etc/init.d/sqm file in order to add these lines on top? Is there any chance I use Samba to locate the file in the root of the router and right-click->Edit it with Notepad in Windows? Thanks
1 Like
@pstlr78 Connect via ssh to your Router. Since you use windows, install putty .
After the connection has been established use vi:
vi /etc/init.d/sqm
In vi press i to start editing. When you're finished, press ESC and then :wq followed by ENTER to save the changes and quit vi.
So with pppoe you should instantiate sqm on pppoe-wan. Could you please post the output of the following commands (log into your router using putty first):
cat /etc/config/sqm
tc -s qdisc
tc -d qdisc
TIA
1 Like
You can use winscp, if I recall correctly to directly edit files.
@pstlr78
Before you start editing files try to choose the pppoe interface to run SQM on as @moeller0 already suggested.
Had the same problem some time ago and using the pppoe interface directly did the trick.
2 Likes
At the moment the interface I have linked sqm to is "dsl0.101(wan)". This is a custom interface I have setup in order to be able to connect with my ISP. My WAN interface is pppoe-wan as I mentioned before.
@accelerate : Do you mean that I should choose "pppoe-wan (wan, wan6,wan_6)" in the SQM menu?
@moeller0 : Sorry if you meant pppoe interface in the SQM menu. By the way, many thanks for refreshing my memory about WinSCP. This is the solution I was looking for in order to get a Samba-like funtionality and the ability to directly read/edit files. The output of the script as you requested is below:
root@LEDE:~# cat /etc/config/sqm
config queue 'eth1'
option qdisc_advanced '0'
option debug_logging '0'
option verbosity '5'
option enabled '1'
option interface 'dsl0.101'
option qdisc 'cake'
option script 'piece_of_cake.qos'
option linklayer 'ethernet'
option overhead '34'
option download '72000'
option upload '18000'
root@LEDE:~# tc -s qdisc
qdisc noqueue 0: dev lo root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 ta rget 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 4532797033 bytes 3493250 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 1514 drop_overlimit 0 new_flow_count 116 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc noqueue 0: dev br-lan root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev eth0.1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan0 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc noqueue 0: dev wlan1 root refcnt 2
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev dsl0 root refcnt 2 limit 10240p flows 1024 quantum 1514 ta rget 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 983734904 bytes 3520450 pkt (dropped 0, overlimits 0 requeues 1)
backlog 0b 0p requeues 1
maxpacket 0 drop_overlimit 0 new_flow_count 0 ecn_mark 0
new_flows_len 0 old_flows_len 0
qdisc cake 800d: dev dsl0.101 root refcnt 2 bandwidth 18Mbit besteffort triple-i solate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 34
Sent 395372192 bytes 1485874 pkt (dropped 1531, overlimits 318385 requeues 0)
backlog 0b 0p requeues 0
memory used: 368160b of 4Mb
capacity estimate: 18Mbit
min/max network layer size: 16 / 1492
min/max overhead-adjusted size: 50 / 1526
average network hdr offset: 14
Tin 0
thresh 18Mbit
target 5.0ms
interval 100.0ms
pk_delay 32us
av_delay 16us
sp_delay 13us
backlog 0b
pkts 1487405
bytes 397669146
way_inds 10294
way_miss 18774
way_cols 0
drops 1531
marks 0
ack_drop 0
sp_flows 1
bk_flows 1
un_flows 0
max_len 1506
quantum 549
qdisc ingress ffff: dev dsl0.101 parent ffff:fff1 ----------------
Sent 3365302087 bytes 2750409 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
qdisc fq_codel 0: dev pppoe-wan root refcnt 2 limit 10240p flows 1024 quantum 15 10 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
Sent 364555352 bytes 1421885 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0
maxpacket 1480 drop_overlimit 0 new_flow_count 153 ecn_mark 0
new_flows_len 0 old_flows_len 16
qdisc cake 800e: dev ifb4dsl0.101 root refcnt 2 bandwidth 72Mbit besteffort trip le-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 34
Sent 3403451677 bytes 2750166 pkt (dropped 243, overlimits 2087455 requeues 0)
backlog 0b 0p requeues 0
memory used: 206976b of 4Mb
capacity estimate: 72Mbit
min/max network layer size: 42 / 1492
min/max overhead-adjusted size: 76 / 1526
average network hdr offset: 14
Tin 0
thresh 72Mbit
target 5.0ms
interval 100.0ms
pk_delay 1.1ms
av_delay 550us
sp_delay 14us
backlog 0b
pkts 2750409
bytes 3403807813
way_inds 25432
way_miss 22783
way_cols 0
drops 243
marks 0
ack_drop 0
sp_flows 1
bk_flows 1
un_flows 0
max_len 1506
quantum 1514
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
root@LEDE:~# tc -d qdisc
qdisc noqueue 0: dev lo root refcnt 2
qdisc fq_codel 0: dev eth0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc noqueue 0: dev br-lan root refcnt 2
qdisc noqueue 0: dev eth0.1 root refcnt 2
qdisc noqueue 0: dev wlan0 root refcnt 2
qdisc noqueue 0: dev wlan1 root refcnt 2
qdisc fq_codel 0: dev dsl0 root refcnt 2 limit 10240p flows 1024 quantum 1514 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc cake 800d: dev dsl0.101 root refcnt 2 bandwidth 18Mbit besteffort triple-isolate nonat nowash no-ack-filter split-gso rtt 100.0ms noatm overhead 34
qdisc ingress ffff: dev dsl0.101 parent ffff:fff1 ----------------
qdisc fq_codel 0: dev pppoe-wan root refcnt 2 limit 10240p flows 1024 quantum 1510 target 5.0ms interval 100.0ms memory_limit 4Mb ecn
qdisc cake 800e: dev ifb4dsl0.101 root refcnt 2 bandwidth 72Mbit besteffort triple-isolate nonat wash no-ack-filter split-gso rtt 100.0ms noatm overhead 34
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
Yes, try to choose "pppoe-wan (wan, wan6,wan_6)".
wow. it looks that the issue is sorted after linking sqm directly to pppoe-wan. I rebooted the router and sqm is working fine without the need to manually force start. Many many thanks.
4 Likes
system
Closed
April 18, 2019, 9:43pm
15
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.