Opkg commands extremely slow when mwan3 is running

opkg commands extremely slow when mwan3 is running

For example, take "opkg update"

Without mwan3 running takes less than 10 seconds:

root@LEDE:~# time opkg update
Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_core
Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_base
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_luci
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_packages
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_routing
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_telephony
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/telephony/Packages.sig
Signature check passed.
real 0m 7.61s
user 0m 2.37s
sys 0m 0.19s

With mwan3 running takes almost 11 minutes!:

root@LEDE:~# time opkg update
Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_core
Downloading http://downloads.lede-project.org/releases/17.01.1/targets/ar71xx/generic/packages/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_base
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/base/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_luci
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/luci/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_packages
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/packages/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_routing
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/routing/Packages.sig
Signature check passed.
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/reboot_telephony
Downloading http://downloads.lede-project.org/releases/17.01.1/packages/mips_24kc/telephony/Packages.sig
Signature check passed.
real 10m 47.28s
user 0m 2.44s
sys 0m 0.18s

Hi, this problems persist or you solved it?

Hi,

I don't know for the original poster but I still encounter the same problem on a Netgear R7800 running under openWRT 19.07.2.

With mwan3 stopped, updating opkg takes less than 10s
With mwan3 running, it takes more than 30mn
My mwan3 config is 2 FTTH connections with default setting being balanced mode between my 2 wan access.

root@r7800:~# uname -a
Linux r7800 4.14.171 #0 SMP Thu Feb 27 21:05:12 2020 armv7l GNU/Linux
root@r7800:~# echo "=> Stop mwan3" ;mwan3 stop ;echo "=> Update opkg mwan3 off" ;time opkg update ;echo "=> Restart mwan3" ;mwan3 start ;echo "=> Update opkg mwan3 on" ;time opkg update 
=> Stop mwan3
=> Update opkg mwan3 off
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ipq806x/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ipq806x/generic/packages/Packages.sig
Signature check passed.
<...>
real    0m 9.03s
user    0m 1.39s
sys     0m 0.43s
=> Restart mwan3
uci: Entry not found
uci: Entry not found
uci: Entry not found
uci: Entry not found
=> Update opkg mwan3 on
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ipq806x/generic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/ipq806x/generic/packages/Packages.sig
Signature check passed.
<...>
real    31m 8.97s
user    0m 1.34s
sys     0m 0.36s

It seems that mwan3 is complaining about missing uci configuration entries.

Also, please check if you have some previous configuration like some iptables rules, or if you have modified ifaces configuration, etc mainly on bridge interfaces.

please check cpu usage too, with top, and please check that the two wan interfaces have different metric value (common thing that people leave as-is and usually makes a lot of problems.

Thanks for your answer.

For the iptables rules, I have a few NAT rules but nothing special.
I also have 4 different lan (each one on a different subnet) declared as bridges indeed.

Metrics are like this:

        option metric '10'
--
config interface 'wanb'
        option metric '20'

I think I found the problem when I tried to get the sig with wget as the routeur does when invoking "opkg update" ...

--2020-04-08 16:28:33--  http://downloads.openwrt.org/releases/19.07.2/targets/ipq806x/generic/packages/Packages.gz
Resolving downloads.openwrt.org... 2a01:4f8:150:6449::2, 176.9.48.73
Connecting to downloads.openwrt.org|2a01:4f8:150:6449::2|:80...

It tries first to resolve the dns alias with ipv6... and as ipv6 is not working for me (or so badly that I disabled it), it takes a lot of time before falling back to ipv4.
In mwan3, I have disabled all my ipv6 interfaces and thus, they are not used when a machine from my lan try to reach internet.
But wget doesn't seem to follow mwan3 settings and try ipv6 anyway (because I still have a "wan6" interface up in my config).

I put it down and disabled it on boot.

Everything seems to work nicely now!

Thank you for helping me solve that problem!

1 Like

Happy to hear that!

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