mwan3 memory usage
Ravi Paluri
rpaluri at qti.qualcomm.com
Sun Jun 18 23:56:27 PDT 2023
Thanks, Florian for the reply.
In our opinion, having single process to cater to both IPv4 and IPv6 would help in memory reduction, the same way as handled in mwan3 (version 2.8.16).
This would reduce the memory footprint from 4 processes to 2 processes.
Do you recommend we making changes to mwan3rtmon script as per above suggestion in OpenWRT version 22.03 or do you see any design flaws because of which handling for IPv4/IPv6 is separated?
Any insight as to why we have separate process for monitoring IPv4 and IPv6 would be helpful.
Thanks,
Ravi
-----Original Message-----
From: Florian Eckert <fe at dev.tdt.de>
Sent: Thursday, June 15, 2023 6:00 PM
To: Ravi Paluri (QUIC) <quic_rpaluri at quicinc.com>
Cc: openwrt-devel at lists.openwrt.org
Subject: Re: mwan3 memory usage
WARNING: This email originated from outside of Qualcomm. Please be wary of any links or attachments, and do not enable macros.
Hello,
> Hi,
> 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:
https://github.com/openwrt/packages/commit/566293d228a48d21a04ecbc815a7ae97e26eb319
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 during 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
> IPv6.
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
> product.
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
> type.
> Refer(line number 155) at
> https://github.com/openwrt/packages/blob/master/net/mwan3/files/usr/sb
> in/mwan3rtmon Can we know the reason behind creating child processes?
Before that we polled for changes in the routing table. Now we use a event driven patter to update the routing table on routing changes. Because of this we need 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 older version 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.
---
Kind regards
Florian
More information about the openwrt-devel
mailing list