At cPanel, we sometimes get inquiries about how and where memory is being used. To help with this we wanted to provide some more general information.
Sometimes you may notice your server reports very little "Free Memory," however, this may not mean that your server is actually low on memory.
To see your server's memory, first, log into the WHM interface with your root user information, then go to Home >> Server Status >> Server Information and then scroll down to "Current Memory Usage" and you will see something like this for the server's output:
# free -m total used free shared buff/cache available Mem: 1838 906 126 105 804 651 Swap: 0 0 0
In some cases, this can cause confusion or falsely indicate the system is low on memory. In the case of Linux, the section that you will want to look at in the server is the available column because Linux will allocate your free memory and use it for disk caching. This will cause different values to be reported between the used memory column and the available column.
Looking at each column, we can see that the server has a total of 1838 MiB of memory, the server is currently using 906 MiB and then 126 MiB free. For the actual free memory, we will look at the available memory which is 651 MiB.
What is disk caching?
Disk caching is managed through the Linux kernel, which stores common requests and processes in memory so that the server's IO wait is lower. This helps applications run smoother, and if more memory is needed for other processes, the kernel will release the memory from the disk cache. If the memory is needed for other processes, the system will release the memory from the disk caching so that it may be used normally.
Q: Can Disk Caching be disabled?
A: No, since this is a kernel level operation there isn't a way to disable disk caching.
Q: What is the difference between MB and MiB?
MB stands for megabyte and is 10 to the power of 6 bytes. MiB stands for mebibyte and is 2 to the power of 20 bytes.
1 MB = 1,000,000 bytes
1 MiB = 1,048,576 bytes
MB=220 and MiB=106
1. Tutorial - Troubleshooting high server loads on Linux servers