Memory usage and best practices

NethServer Version: 7.3.1611

My NethServer box serves as the gateway for my office network. It does DHCP, firewall, VPN, and content filtering. I have two internal lans (green and blue) and one external. The box serves an average of about 120 users a day, and it does so very well.

This machine runs 24/7 and handles network traffic 24/7, and as it runs, it gradually runs out of free memory. After about 3 weeks it’s at 98% and if I forget to reboot, it will crash. (I have 16Gb ram on this box and lots of empty hard drive space.)

This raises a basic question about best practices: how often should one reboot? I tend towards rarely or never, because it means briefly taking down Internet access.

I’m also interested to know what constitutes normal performance for such a gateway, and whether periodic reboots are typical. If not, I’m wondering how to track down what’s using up the memory. I’ve been reading the forum and see a number of things I might try, but wondered what someone dealing with a similar issue might recommend. Thanks in advance for thinking about this.

Something is definitely not right if it runs out of memory and swap like that.

I agree that you should only need to reboot in the event of some form of update or change (like a kernel update for example) which requires a reboot which would essentially would only then need to be done on the rare occasion.

My Nethserver box can quite happily stay up for 6-9 months with no issue without a reboot.

Not sure with regards to the best way to troubleshoot exactly what is eating up the memory like that

Some pointers to troubleshoot memory usage:

Some of the suggestions to fix the problems may be wrong, but you should find the culprit.

As you may know, I “supervise” a lot of NethServer and rarely found memory problems.

I’d start with top sorting for memory usage (press M, i.e. shift+m).

For reference, the 3 most memory hungry processes on our mail server running wentop5 (tomcat).

 2390 tomcat    20   0 3852848 861888   5144 S   0.3 10.9  16:35.44 java                                                            
 3666 amavis    20   0 1076392 602292   6152 S   0.0  7.6  43:08.39 clamd                                                           
 2493 root      20   0  923344 421356   3984 S   0.0  5.3 205:23.40 sssd_be

Thanks. I’ll try some of these things and get back with my findings. I believe this is a somewhat new behavior for the box, new in the past several months, so it did seem to me likely that it’s a bug not a feature.