Debian squeeze high memory usage

debianlampmemory usage

I am quite new in the Linux / Server environment. I installed Debian Squeeze on vmWare Server to run LAMP. After I had the LAMP configured and running I decided to check on the memory usage of the server, and I found it to be high. I am not familiar with Linux, so I might be wrong to think that it is high. I noticed that Apache and MySQL uses a lot of memory.

I have posted the output of the memory usage. Maybe someone could take a look at it and tell me that the memory usage is fine or that it's not and maybe give me some idea as to why it's that high.

Best Answer

What you probably want to know is "How much free RAM can my computer get if it needs them?". The answer is, from your top output:

Mem-Free = 36780k
Mem-Buffers = 5456k
Swap-Cached = = 360700k

That's 364MB of RAM, out of 512MB total available in your system, which is pretty good.

One common source confusion is that "Swap:Cached" in the top output is not actually related to the swap space at all. That's RAM space used for block cache ("hard disk content cache").

See also the "Memory Usage" from this tutorial I wrote for my former employer.