Usually the memory usage is checked for with the help of free command. The most common being “free -m” which shows the memory usage in MB.
Here I will explain to you guys the output of memory usage in a Linux server.
Consider the following example:
[root@test ~]$ free -m total used free shared buffers cached Mem: 48143 47704 438 103 1051 42693 -/+ buffers/cache: 3959 44183 Swap: 45055 2 45053
First line is quite straight forward. Total available memory of the system is 48 GB. The total used memory is 47 GB. This includes the buffers and cache size of the machine. Shared memory usually indicates the amount of RAM available for new applications to run.
Cached memory is practically free memory. It can be used if any new process requests memory. This is called disk cache. This is used because if a file is accessed redundantly then it will load up faster from the cache rather than the HDD. This results in faster operations and hey, Free RAM is waste RAM right?
Buffers and Cache
Buffers and Cache are types of temporary storage. Cache is used to save frequently used data so that its served at a much faster rate. Buffers are kind of temporary storage used to save data that is in the process of transfer.
It behaves exactly like a disk, but avoid the disk transfer at the last moment.
Hope guys got a basic idea. If you have any doubts do comment.
Have questions? Click here for any server assistance. We are available at 24*7*324 🙂