Andy's Technotes Home |
Tip Jar |
free -m is the command most often used, and here are examples from two different servers
Example 1:
total used free shared buffers cached
Mem: 1880 1816 63 0 156 712
-/+ buffers/cache: 948 932
Swap: 2055 0 2055
Example 2:
total used free shared buffers cached
Mem: 5856 5003 852 0 19 1617
-/+ buffers/cache: 3366 2490
Swap: 2055 1388 667
Example 1 is happily using all its memory, but not swapping out which shows that it isn't needing any more.Lets put in labels and then try to explain them
total used free shared buffers cached
Mem: A B C D E F
-/+ buffers/cache: G H
Swap: I J K
There was an old 'best practice' that indicated that your swap space should be 1 to 2 times your RAM, but that was back in the 32-bit days with much lower RAM sizes than we have now. You don't want to endlessly grow your swap space unless poor performance and wasted electricity is acceptable (spinning harddrives takes more energy, a longer time to do anything than RAM).
| Last updated 2012-06-28 | Copyright © 1996-2026 Andy Konecny | andyweb @ konecnyconsulting.ca |