Virtual Memory Use

This is a question, not a problem. My old Virtualmin server v3.94 running on a Debian 5.0 server with a single core processor and 1 gig of RAM. It was consistently using between 300 - 700 meg of RAM. Even though it was a lightweight it ran pretty much flawlessly. However, from time to time it would start hitting the virtual memory and slow way down.

So, I’ve upgraded it to Virtualmin server v3.94 running on a Debian 6.0 server with a quadcore and 4 gig ram. Right now both servers are sitting side by side running exactly the same websites. (thanks to your supper easy backup and restore process) The new and old server are using:

 new 4 gig server:  using 780 meg of RAM and 10 meg virtual 

old 1 gig server: using 340 meg RAM and 170 meg virtual

My question are why?
Why would the new one be using so much more RAM and 10 meg virtual?
With 3 gig of unused RAM why is the new server swapping anything?

This isn’t a problem, just for my education. Both servers deliver the pages at about the same speed, with maybe a slight advantage to the new one.


What is the architecture of the two servers? Is one by chance 32 bit, and the other 64 bit?

A 64 bit server will use a lot more RAM than a 32 bit server.

Now, a 64 bit server can also be faster than a similarly spec’d 32 bit server… but that speed comes at the cost of some RAM.

There’s some other things that can make a difference – the number and type of Apache modules that are loaded can contribute to memory usage. Same thing with PHP modules.

There could also be a difference in how MySQL is configured.

When you first install Virtualmin, the first-time wizard will ask you which MySQL configuration to use. If you told it to use the MySQL config designed for 2+ GB of RAM, that would cause MySQL to use more RAM. That’s a good thing though, as it’s better able to cache your data and queries.

I hope that helps!