Buffer and cache are collectively referred to as caches, and function and function differ:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/83/A5/wKiom1d5we_AQMiQAABDfsfBkPQ881.png "title=" The difference between buffer and cache. png "alt=" Wkiom1d5we_aqmiqaabdfsfbkpq881.png "/>
1) buffer, memory buffer, the file temporary storage area generated by each process, the unified write disk in a certain period of time, reduce disk fragmentation and hard disk repeatedly seek, thereby improving system performance;
2) cache, memory buffer, often used on disk I/O requests, if there are files frequently accessed, the system will be cached in the cache area for CPU processes, such as access, the CPU of the first-level cache, two-level cache, or even three-level cache is to solve the read memory speed bottleneck;
And how is the available memory in Linux calculated?
Linux uses the memory principle as much as possible, and memory applies the remaining space to the cache, and the cache does not belong to the free
When the system is running for a long time, we will find that the cache is very large, that's the truth.
Note that when we see the system memory usage is very high, free is almost 0 o'clock, does not mean that the system memory capacity bottleneck! Only the system has fully played the role of memory. When a process needs to request large file memory, the kernel reclaims some of the cache space, and the reclaimed memory is then allocated to the process program for use.
So ...
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/83/A5/wKioL1d5yFTAIegIAAAXcVVXoEs123.png "title=" QQ picture 20160704102138.png "alt=" Wkiol1d5yftaiegiaaaxcvvxoes123.png "/>
Available memory = Free + buffer + cache
Memory Availability =1-(buffer used/total) =1-(237/981) =76%
Instead of: 170/981=17%
The difference between buffer and cache