mwan3 memory usage

Ravi Paluri (QUIC) quic_rpaluri at
Mon Jun 19 04:51:54 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.

-----Original Message-----
From: Florian Eckert <fe at>
Sent: Thursday, June 15, 2023 6:00 PM
To: Ravi Paluri (QUIC) <quic_rpaluri at>
Cc: openwrt-devel at
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.


> 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:

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
> 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


More information about the openwrt-devel mailing list