webmin Virtual Memory explained?

When I reboot my server, the Virtual Memory, according to the webmin home screen, is 0, but thereafter it only increases. I would expect that the figure would fluxuate in relation to server load, but it doesn’t seem to.

As I’m writing this, my real memory is only about 50% utilised, yet my virtual memory isn’t 0.

I’ve tried using a number of command line tools to try and determine what the webmin figure is comprised of but without success. I’m obviously concerned about running out of memory over time.

Can anyone help with explaining how the Virtual Memory figure is determined? (I couldn’t find anything in the Wiki about this.) I would like to see if I can tweak some settings to improve the server’s performance.


(Ubuntu 14.04 LTS, Apache 2.4.7, MySQL 5.5.38, PHP 5.5.9, Webmin, PureFTP & Quota, phpMyAdmin, postfix, dovecot, amavis, clamav, spamassassin, awstats, fail2ban, Jailkit, bind9, vlogger, webalizer)

/proc/meminfo seems to be the source of the data used in the calculations displayed on the “System Information” page.

(Please correct if this is inaccurate.)

“I would expect that the figure would fluxuate in relation to server load, but it doesn’t seem to.”

That’s an incorrect assumption. Memory usage pretty much always increases on a Linux system, because Linux caches everything it can in RAM. Even shutting down a large process won’t cause “free” memory to increase, even though it does become readily available to new processes.

There’s a reasonably good explanation of Linux memory usage here: http://www.linuxatemyram.com/

Thanks for the link.

I was referring to the Virtual Memory (ie SWAP). I understand that Linux allocates as much as it can to buffers and caching, which makes the Real Memory usage more difficult to determine.

So, swap usage behaves similarly the other types of memory usage patterns. When something large starts up and pushes some things into swap, they won’t be moved out of swap unless there is a need for that swap space. In other words, swap usage also pretty much only grows. It doesn’t necessarily mean anything is wrong or that there’s not enough memory (sometimes big processes come and go…yum or apt-get can grow quite large for example, as can backup and anti-virus scanning processes).

Thanks Joe!

So generally this is harmless, is there anything that we should watch or monitor for?