1

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!

1
  • 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, 2011 at 20:38

3 Answers 3

1

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.

1
  • 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. Jan 10, 2011 at 20:58
0

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.

0

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

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