Free / Cached / Available memory on Linux

Posted by pkoraca on Server Fault See other posts from Server Fault or by pkoraca
Published on 2012-06-02T11:55:29Z Indexed on 2012/06/03 10:42 UTC
Read the original article Hit count: 229

Filed under:
|
|
|

I have read that linux uses free memory for caching, to make system faster. However, both Nagios and Paessler PRTG monitoring system show me that my memory usage is critical.

I could change Nagios mem_usage script to sum free and cached memory, but would that be correct information? I doubt that they misunderstood Linux memory usage.

Lets say I have 8 GB RAM. 5 GB are used, 2 GB is cached, and I have 1 GB of free memory. Real available memory should be free+cached (3 GB)? If some new application would need additional 3 GB RAM, could it take everything from cache and free without using swap, or is there a minimum that should be in cache?

Real example:

$ cat /proc/meminfo
MemTotal:        5984256 kB
MemFree:          137052 kB
Buffers:          140484 kB
Cached:          3439616 kB
SwapCached:          244 kB
Active:          3148824 kB
Inactive:        2341768 kB
...

My monitoring tools show that I have 137 MB free RAM, however I have ~3,5 GB in Cache.

Thanks!

© Server Fault or respective owner

Related posts about linux

Related posts about memory