Linux – Server Memory Usage VERY high on new linux dedi box – How to find the issue

emaillinuxmemory

I have recently aquired a dedicated server running CentOS and Plesk for my applications.

These scripts were running on a 1.5GB ram VPS running CentOS and CPanel and worked very well.

Now they are on the new dedicated server the memory has gone down from 14.1 GB ram spare to 9.9GB. I can't see it being my scripts so presume there is something else using all my memory. How can I see what is eating all the resources?

Note: The only difference between these servers (from my point of view) is my crons were being checked every 5 minutes on the old server whereas now they are checked every minute and there are about 60 of them.

This is the information from "free" via SSH – Although, I am not entirely sure what its telling me:

[root@h31-3-244-194 ~]# free
             total       used       free     shared    buffers     cached
Mem:      16426796    9373260    7053536          0     390468    3471680
-/+ buffers/cache:    5511112   10915684
Swap:     18481144          0   18481144

EDIT: I have looked against all my cron processes and they have this: bin/qmail-queue against them. Could qmail be eating the memory?

If I have omitted some required information, please let me know.

Thanks.

Best Answer

The only number you care about here is this one:

[root@h31-3-244-194 ~]# free
             total       used       free     shared    buffers     cached
Mem:      16426796    9373260    7053536          0     390468    3471680
-/+ buffers/cache:    **5511112**   10915684
Swap:     18481144          0   18481144

This is the amount of memory used by userspace processes for their execution. The kernel will take any extra memory it can get it's hands on for disk caching and other performance reasons, but it will release it as userspace applications require it.

You probably want to run something like top and try to figure out (by using the %MEM field) what is consuming the memory.

Keep in mind that unused memory is wasted memory! :)