Scenario: Customer is concerned that only 100MB of their 2GB of memory is as unused or free when running the free command. However, no processes appear to be consuming large amounts of memory, and the server is not running slow.
Cause: This is not a problem, but rather a result of the way linux manages its memory. On boot linux will typically display a large amount of free memory, as no processes have started to address it yet. Once processes run, Linux will cache that memory so it is quickly addressed for the next session. What this means is that on *most* linux distros, you’ll notice that a very small amount of memory is free, even though the machine is having no problems processing data (unlike, for instance a Windows server that would be quite slow with 150K of “free” memory). The best way to judge if the server is running low on memory, is if the swap space is being addressed. If the swap is occasionally hit, using a very small amount of memory, there is no cause for concern as that space will still be addressed. However, if a large amount of swap space is being used (50% or more) then the client may want to consider a memory upgrade.
Basically, the free memory isn’t the amount of memory that is not doing something, it’s the sum total of LowMem and HiMem that he kernel has left to address.