Linux free command explanation, linuxfree Interpretation
$ free -m total used free shared buffers cachedMem: 1002 769 232 0 62 421-/+ buffers/cache: 286 715Swap: 1153 0 1153
Part 1 Mem row:
- Total memory: 1002 MB
- Used memory used: 769 MB
- Free idle memory: 232 MB
- Shared is no longer used. It is always 0.
- Buffers Buffer cache memory: 62 MB
- Cached Page cache memory: 421 MB
Link: total (1002 M) = used (769 M) + free (232 M)
Part 2 (-/+ buffers/cache ):
- (-Buffers/cache) used memory size: 286 MB (refers to used-buffers-cached in the first part of the Mem row)
- (+ Buffers/cache) free memory: 715 MB (refers to the first part of the Mem row free + buffers + cached)
It can be seen that-buffers/cache reflects the memory actually eaten by the program, while + buffers/cache reflects the total number of memories that can be used.
I think you are still dizzy after reading the above. The first part (Mem) and the second part (-/+ buffers/cache) are so strange about used and free.
In fact, we can explain it in two ways.
- For the operating system, it is the Mem parameter. buffers/cached are all used, so it is considered that free is only 232.
- For applications (-/+ buffers/cach ). buffers/cached is equivalent to available, because buffer/cached is used to improve the performance of program execution. When the program uses memory, buffer/cached will be quickly used.