About how many days (GB of traffic ?) are you talking here ? Because of curiousity I have set up nlbwmon in a "generic" custom built image, 21.02.3, running on a low resource device (64MB RAM) for 3 days already, without issues. I can not recognize significant loss of free RAM.
To be honest i did not take notes of that. From now on after any change of above parameters i will delete DB so i will know how much traffic was recorded till service stucks and try to measure time between errors in syslog.
I have
Fam Host ( MAC ) Layer7 Conn. > Downld. ( > Pkts. ) Upload ( Pkts. )
IPv4 192.168.8.221 (xx:yy:zz) HTTPS 285.53 K 13.08 GB ( 11.05 M) 710.95 MB ( 6.88 M)
running for about a week now, no hanging, no OOMs. In a "standard" custom build, 21.02.03, ATH79 based small router, 64MB RAM. Only speciality: No firewall, no opkg support. Using few simple iptables rules, instead.
# cat /etc/sysctl.conf
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file
# nlbwmon
net.core.rmem_max = 3146752
net.core.wmem_max = 3146752
What would be the advantage to change those parameters to sych high values? I obviously still don't get what those parameters do even after reading about it.
On a router is it rather unlikely, that slightly increasing this value causes any harm. Since a router usually does not run a lot of applications that open multiple sockets to communcicate with other services. This is the max per socket buffer, if the application does not specify a size for it's buffer via set socket options.
It would be different if you run for example a torrent client on the router, which opens hundreds of connections without specifying any buffer sizes for receive/send. Then you risk running out of memory quickly if the app did not specifiy any buffer sizes. I'm not sure if unbound sets socket buffers, but if you don't use socket reuse option on unbound it could cause an issue as unbound can open a lot of connections for dns.
Thus in my optionen unless something stupid is done on the router it should not be an issue. And the current values would already cause issues if you have apps running, the would open a few hundreds sockets without properly setting receive/send buffer.
I also have this problem. I had bumped net.core.rmem_max to 524288 but still got:
Tue Nov 29 12:42:27 2022 daemon.err nlbwmon[3573]: Netlink receive failure: Out of memory
Tue Nov 29 12:42:27 2022 daemon.err nlbwmon[3573]: Unable to dump conntrack: No buffer space available