2 answers
- 210
Juan,
We will be revising that wiki page regarding the cached memory. You do not need to release cached memory.
Any memory showing as cached memory is being held by Linux for use by other processes, you do not need release this memory as it is ready to be used.
You can consider that memory shown as cached is included in available memory. Looking at the example below you will see that memory from the "Mem:" line free=588, buffers=370 and cached=1775, these add up to 2733 which is shown as free on the "-/+ buffers/cache:" line.
[keiths@thor ~]$ free -m total used free shared buffers cached Mem: 7984 7396 588 0 370 1775 -/+ buffers/cache: 5251 2733 Swap: 4095 196 3899
It is important to monitor memory usage if physical free memory is low and cached memory is low, the server is actively using memory.
I hope that helps.
Keith
Add your comment... - 10-1
expanding keiths' answer, here are some external documentation links that clarify linux memory management a little: redhat on memory usage, linuxatemyram and the linux system administrators guide.
Add your comment...
Good day,
I have a server with 40 GB of RAM, which always remained saturated with 39 GB of RAM in use. When reviewing the operating manuals I found the following process to free the cache.
https://community.opmantek.com/pages/viewpage.action?pageId=25985076
Which applied it and released the cache memory that was approximately 18 GB in size and is currently at 8 GB, which caused the RAM to be released enough since it has not increased 27GB. So I came up with the following questions.
1. Each time it is recommended that the cache be cleaned. Once a day, once a week or once a month?
2. In the procedure where it indicates how to make a script and a scheduled task to clean the cache. Indicates that the NMIS modules have to be restarted. Will there be any procedure that tells me how to send mail notifications in any case of these modules does not reset after the restart or tell me when one of this stop?
Thank you in advance for your attention and support.
Regards,