if I run
top
on a Linux system, I can see a lot of information about memory usage.
Mem: 15736360k total, 8415332k used, 7321028k free, 174876k buffers
Swap: 0k total, 0k used, 0k free, 2630508k cached
I was wondering: What is the “cached” attribute telling me? Seems like this is not being freed at all – is this normal behavior?
We’re running memcached for our web apps. Has this anything to do with it?
Matt
You can (and maybe should) also use the
freecommand to print memory status:The “buffers/cache” line tells you how much RAM the kernel has currently used for various buffers and caches, mainly for disk I/O I think. This memory is available to programs if they need it, but until they do, it’s better utilized if the kernel uses it to buffer I/O than if just left to idle.