mwan3 memory usage
fe at dev.tdt.de
Thu Jun 15 05:30:21 PDT 2023
> We have enabled mwan3 (version 2.11.4) functionality with OpenWRT
> version 22.03 and we see that four mwan3rtmon processes are running,
> two each for IPv4 and IPv6.
We made the change with the following commit:
I'm not sure, but I think we had before also two mwan3rtmon process
one for ipv4 and the other for ipv6 so there is no difference. But
the change we switched to procd to control the rtmon services.
> Whereas with mwan3 (version 2.8.16) that came with OpenWRT version
> 19.07, has only one process for mwan3rtmon running for both IPv4 and
Sure? Or did only use the proto ipv4.
> This has caused an increased memory usage on OpenWRT version 22.03 by
> 3 times when compared to OpenWRT version 19.07.
> This is a huge concern for us as we have limited memory on our router
Because of the fact, that mwan3 is written in shell I would not
recommend to use this on small devices.
> On debugging further, we see that mwan3rtmon script is invoking a
> child process, the reason behind observing two processes per each IP
> Refer(line number 155) at
> Can we know the reason behind creating child processes?
Before that we polled for changes in the routing table. Now we use a
patter to update the routing table on routing changes. Because of this
a subshell to get the events.
> To reduce memory usage, if we disable creation of child process, what
> functionality of mwan3 will be affected?
This is not recommended. However, you can use the old mwan3rtmon for an
to poll for changes. So you do not have a subshell for event handling.
> Also, is it recommended to use mwan3 (version 2.8.16) with OpenWRT
> version 22.03 as this has no child processes and only one mwan3rtmon
> process for both IPv4 and IPv6?
I can't say anything about that because I haven't tried it yet.
More information about the openwrt-devel