Super User is a question and answer site for computer enthusiasts and power users. 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 have a computer with 16GB of ram. At the moment, top shows all the RAM is taken, (NOT by cache), but the RAM used by the various processes is very far from 16GB.

I have seen this problem several times, but I don't understand what is happening. Any clues? My only remedy so far has been to reboot the machine.

share|improve this question
Can you please post the top few lines of your top output? – Majenko Mar 18 '11 at 9:38
mmm, unfortunately the problem seems to have magically disappeared ... for now! I'll post again if it appears again. – Peltier Mar 18 '11 at 10:14
up vote 7 down vote accepted

As I understand it, on Linux 'used' memory is split into 'active' and 'inactive'.

Active memory is memory which is currently allocated to a process and in use by it.

Inactive is memory that has been allocated to a process but is no longer in use by it (it has been free()d). The allocator puts this memory on one side for later use, but doesn't empty it. If the same data that is in that memory block is requested again it just re-allocates that memory block to the process. If a block of memory is requested and there is no 'clean' memory left it starts re-allocating this 'dirty' memory.

Examining /proc/meminfo can show you how much of your 'used' memory is active and how much is inactive.

share|improve this answer
Thanks for your answer. Next time I'll check out /proc/meminfo, and post more relevant information if I can't solve the problem myself. – Peltier Mar 18 '11 at 12:53
But what are the practical implications of this? E.g., how do I get it back? Or, do I not worry about it in that the OS will take back the inactive memory as needed? Is that inactive memory still "taken"? Further, if it's inactive, can I find which program has it? /proc/meminfo is helpful, but it's global. – James Madison May 18 '15 at 23:07

Ensure some swap is enabled and swappiness is nonzero. Swap utilization usually signifies whether there is actual pressure on memory instead of just buffers/cache temporarily occupying what's available.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .