My processor is using a big part of my RAM memory as cache and I want to clean it up because of that; will it prejudice something?
|
|
There is no need to do this, the kernel manages RAM efficiently by using it for caches and buffers if it is not needed by processes. If processes request more RAM the kernel will deallocate caches and buffers if necessary to satisfy the request. This ServerFault answer explains how to interpret the memory usage reported by |
|||
|
|
|
You don't need to do so. There are two possiblities, if there is something in the cache:
In the first case, it is better if it remains in RAM as long as possible, which means: another process needs the RAM. Then it is discarded automatically without your intervention. In the second case, it doesn't disturb. It's unnecessary work to clean the cache, and can only have negative consequences. |
|||
|
|
Another issue is why would you want to do this? |
|||||||||
|
Yes, much of what is currently in cache will need to fetched from disk. Access from disk used to be 100 of times slower than memory access. Memory speed has increased, much faster than disk speed, so it is likely 10s of thousands of times slower. As a result anything that requires something that is now in cache will be slower the first time you access the flushed data. Whether it it humanly perceptible depends on how much needs to be retrieved. RAM is a relatively expensive commodity compared to disk, but still quite cheap. Cache is not permanent, and the oldest stuff in cache will be released if needed for something like running a program, or caching something more recently used. |
|||
|
|
