Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently running a single GPU Cluster Compute node on Amazon EC2 which is listed as having 22 GB of RAM per instance. top confirms that the instance does indeed have 22 GB of RAM but on an idle systems it appears that 5-6 GB of RAM are consistently in use. Neither top nor ps aux can identify the processes to which this usage is attributable.

5-6 GB seems too large for the OS to me, but perhaps I am wrong. Could this be an overhead due to virtualization on Amazon? Any other ideas or suggestions as to how I could track this down?

share|improve this question

migrated from Oct 8 '11 at 16:51

This question came from our site for professional and enthusiast programmers.

Are you including the memory cache in this calculation? It might be useful to show the contents of proc meminfo. – Ray Vahey Oct 7 '11 at 18:08

The reason why you see a substantial amount of memory being used is that Linux is using much of it for file caching.

This would probably clarify things for you:

share|improve this answer

When you look at top, the free memory you see is the value before kernel caching.

top - 12:59:25 up 1 day, 15:47,  5 users,  load average: 0.04, 0.10, 0.12
Tasks: 161 total,   1 running, 160 sleeping,   0 stopped,   0 zombie
Cpu(s):  3.5%us,  1.8%sy,  0.0%ni, 94.2%id,  0.4%wa,  0.0%hi,  0.1%si,  0.0%st
Mem:   3985464k total,  3369908k used,   615556k free,   752964k buffers
Swap:  1951740k total,       12k used,  1951728k free,  1439160k cached

My laptop as 3985464 kilo-bytes of memory total. But the linux kernel would cache most of that internally, so top only shows 619748kB of free memory. But if you look at it using the free command, you understand that, in fact, most of the memory is available... in the cache.

$ free
             total       used       free     shared    buffers     cached
Mem:       3985464    3365716     619748          0     752796    1439152
-/+ buffers/cache:    1173768    2811696
Swap:      1951740         12    1951728

The real free memory is the one shown on the buffers/cache line.

             total       used       free     shared    buffers     cached
-/+ buffers/cache:    1173768    2811696

This machine as 2.8GB of free memory.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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