I have a debian system. It has 8GB memory. When I do top it shows 7.9 GB memory used and rest free. I add up the memory usage of all the programs running from top and they hardly sum up to around 50 MB. So, where is rest of the memory being used? Can I have a better detailed info of the memory usage? What is a better way to check the memory usage?

  • also if you want to see how much memory a process has mapped you can use 'pmap $PID' – feniix May 28 '10 at 21:49

See: Help! Linux ate my RAM!


Answered in other questions, but the short answer is that what you want for used memory is the following number from the output of the command free:

-/+ buffers/cache: 557896


I commonly run into this problem on various UXIX flavors. Unless otherwise configured, they buffer everything they read. Free memory goes to near zero eventually, and will stay there forever. Unless the memory is used for something else, all the startup scripts remain buffered forever.

Administrators who don't understand that most buffers are relatively memory may refuse to increase the size of memory structures. This can (severely) degrade performance of some applications.

cat /proc/meminfo

will give you the kernel's idea of how your memory is being used. The appropriate man page about it will help you understand what you're looking at.

  • another command is 'free -tmo' – feniix May 28 '10 at 21:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.