Tuning server performance with memory management and swap
Regardless of how you look at it, the question of memory usage remains critical to the life cycle of a system, and whether you are maintaining system health or troubleshooting a particular service or application, you will always need to remember that the use of memory is a critical resource to your system. For this reason, we will begin by calling the free
command in the following way:
# free -m
The main elements of the preceding command will look similar to this:
Total used free shared buffers cached Mem: 1837 274 1563 8 0 108 -/+ buffers/cache: 164 1673 Swap: 2063 0 2063
In the example shown, I have used the -m
option to ensure that the output is formatted in megabytes. This makes it easier to read, but for the sake of troubleshooting, rather than trying to understand every numeric value shown, let's reduce the scope of the original output to highlight...