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