webmin Virtual Memory explained?

7 posts / 0 new
Last post
#1 Sat, 01/31/2015 - 02:11
Nap

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.

Cheers, Nap

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

Sat, 01/31/2015 - 08:40
Nap

/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.)

Sat, 01/31/2015 - 18:20
Joe
Joe's picture

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

--

Check out the forum guidelines!

Sat, 01/31/2015 - 19:33
Nap

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.

Sat, 01/31/2015 - 19:48 (Reply to #4)
Joe
Joe's picture

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

--

Check out the forum guidelines!

Wed, 03/09/2016 - 20:20 (Reply to #5)
Mark Gilbert
Mark Gilbert's picture

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

Sat, 01/31/2015 - 21:00
Nap

Thanks Joe!

Topic locked