I have two VPS servers but they have drastically different amounts of memory usage and processes running. I'm still new to running linux servers so I'm having trouble figuring out what is going on and what I can do to fix it.
Both are Debian 5 32bit installs.
On one server with 128MB of ram and a single CPU core I have a full server running in only 84MB of RAM. The other server has 512MB (quad core CPU) and it has nothing running but core processes yet its still using 94MB of RAM.
Does one have a different kind of virtualization technology that requires more linux core processes or what?
Best Answer
You are seeing normal behavior. Don't confuse used memory with unavailable memory. Many structures held in memory can be quickly downsized when memory is required. Expect your usage to increase as long as the system is up and lots of memory is available.
Space used for disk cache counts as used. Once you read or write a file, the data tends to be cached until this space is needed. Log files tend to be write only, but get cached as they are generated. A few things that are noticeable from my usage graph:
If you have any tmpfs file systems, it will use available memory. As memory use goes up, some of this data may be paged into the swap file.
Web server processes often run with a master process to accept incoming connections, and many child processes to handle the requests. The child processes typically have the same PPID (parent process id). One of your servers appears to be running
nginx
andphp-cgi
to handle web requests, using a significant number of processes. The commandpstree
, if available, is useful to see this kind of setup.