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

This question already has an answer here:

Please, the memory and the cache are getting to the full level quite quickly under my linux mint 9 - isadora system. I used Ubuntu and Debian before, and it was not causing this issue at all. At the current time i typing the following command frequently to empty the cache "echo 3 > /proc/sys/vm/drop_caches".

Please any way around this? or do you know what's going wrong? | I am only programming on this machine; no graphics, no games nothing.

Thanks in advance for your help!

share|improve this question

migrated from Jan 10 '11 at 20:34

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

marked as duplicate by Michael Hampton Aug 6 '14 at 4:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

What does free output as your memory usage/available? And what issue exactly is this causing? Are you getting out of memory errors? Excessive swapping? – DerfK Jan 10 '11 at 20:38

The kernel uses an algorithm that attempts to fill the cache with as much stuff as possible. Its a cache, that is what its there for and the more stuff in cache the less stuff we potentially have to go back to disk for. Remember disk can be 100 times slower than the cache.

Why is this a problem or what issue are you experiencing? What are you using to see how "full" the memory is? You should be using the +/- buffers/cache column of free:

$ free
             total       used       free     shared    buffers     cached
Mem:        968304     922820      45484          0     318792     205404
-/+ buffers/cache:     398624     569680
Swap:            0          0          0

This system has more than half its memory free. Its in a pretty happy state.

A system with lots of memory free on the Mem column generally means it has so much memory the kernel can't even find a use for it (e.g. more memory than the size of the database). This means you have wasted memory.

share|improve this answer
Note that the "used" and "free" values in the "-/+ buffers/caches" line are the true values for how much ram you're actually using, ignoring the buffers and cache. – Daniel Lawson Jan 10 '11 at 20:58

Linux will use as much memory as it can, as a cache. If it didn't, there would be more disc traffic to re-read info from disk all the time. As soon as it's required for something more useful, it will be used for that. Don't worry, it knows what it is doing.

share|improve this answer

This is by design. Most Linux systems cache as much as possible and free up memory on an as-needed basis.

share|improve this answer

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