

free does not show all my memory?ĭue to some peculiarities of our older VPS environments, free may not accurately reflect the total allocated VPS memory, although it should be pretty close. If you are seeing some slowness, and RAM looks ok but tight, adding more RAM (or reducing the amount used by applications) is a good idea.

Note that the kernel does need some RAM for caching, to help improve system performance of some subsystems, for example disk writes. This is the total memory (2008) - the actual used (1234). If you wish to quickly see how much memory is free look at the buffers/cache row free value (774). To prevent out of memory errors, it needs to be less than the total memory (2008) and swap space (3812). For best performance, this number should be less than your total (2008) memory. This is how much space your applications are currently using. The most important 'used' figure to look at is the buffers/cache row used value (1234). Since Linux likes to use any spare memory to cache disk blocks. The top row 'used' (1951) value will almost always nearly match the top row total value (2008). To see how much memory you are currently using, run free -m. Some good background on how linux uses RAM is available on Interpreting Free Then your programs need more memory than they can get. Or (on a pre-2.4.23 kernel): Dec 7 23:49:03 Swapper: page allocation failure. If you see (on a 2.4.23 kernel): Dec 11 10:21:43 www kernel: _alloc_pages: 0-order allocation failed (gfp=0x1d2/0)ĭec 11 10:21:44 www kernel: _alloc_pages: 0-order allocation failed (gfp=0x1f0/0) Processing dying unexpectedly? Want to know if you need more memory?Ĭheck your /var/log/messages or /var/log/syslog log file.

In it, you can see that the amount of free memory is 168 MB whereas the cached processes are using 1261 MB of RAM. The common utilities in Linux to check free memory explain it a bit differently. Check out the screenshot below. Whenever an application needs more memory, a chunk is borrowed immediately and it is returned once the function is complete. It acts like a “bank” which keeps all the memory and a chunk of it is released when the need arises. This makes memory to be apparently consumed by the operating system, but in real essence it is not “eating up RAM.”īut, the question stands: Why do we think Linux is mean when it devours RAM? What happens in Linux OS is that it borrows unused memory for disk caching. There is a saying in Linux community: “Free memory is the waste of memory.” In all fairness, it is not uncommon for an operating system to occupy the memory and release it when required. Follow my experience, as a system administrator, I have been asked a lot of questions about system eating up all the memory.
