Swap Memory leak on stock Ubuntu 20.04 installation

OS type and version Ubuntu 20.04
Webmin version 1.990
Virtualmin version 6.17-3
Related packages SUGGESTED

We have a stock installation of Virtualmin. I mean, I pressed almost every setting at default. I’m particularly careful not to change anything.

Yet, in spite of that, it appears that swap file space is being depleted.

When we set up the machine, it only had 2 GB of RAM.
RAM ran out, and MySQL stopped.
So we made it 3 GB.
Same problem, but we added a 4 GB swap file.
Then 4 GB RAM, and 12 GB swap file.

Please see below, there is a pattern. What’s really interesting is at 00:00 the problem just “goes away”. All that happens at 00:00 are the backups.

Any tips? As a gambler I’m putting my money on CLAMAV but at this point it could literally be anything.

I would not call this a memory leak. The graph you posted indicates a recurring activity (probably initiated by a cron job) that requires memory. When that activity is initiated, all caches and buffers are deleted, freeing up available memory which you see as the spike on your graph.

Then in the next few hours, buffers and caches are built up again and you see a gradual decrease in available memory till the recurring activity is triggered.

I have no issue with near 100% of available memory being used. The question you have to ask is this: is your system operating effectively most of the time and is the OOM reaper killing any processes?

Thanks @calport for the reply

The graph you posted indicates a recurring activity…

I wish I knew what this recurring activity was, and why it would suddently be released at 00:00. There is nothing extra or strange or special on this server.

OOM reaper killing any processes

On my Ubuntu 20.04 servers I have this problem with Usermin just going away… @Joe suggested also checking OOM but thus far nobody has given me sound commands to check this on Ubuntu 20.04.

The last set of commands I googled doesn’t appear to work:

dmesg | grep invoked

grep killed /var/log/kern.log

So perhaps someone can tell me where to find the reaper?

I can reduce the RAM and trash the swap file then see again for OOM, but it’s a client’s production server so I’d have to get their buy-in…

this is not a leak…whatever you are doing requires more than 4 gigs of ram. What are you running in terms of how many domains? if you are using that much swap I would increase your system ram to no less than 16GB. Frankly, most likely 32Gb is more likely to last you a while longer.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.