CentOS system cache Memory

Cache Memory on Linux system what is Cache Memory? When you read and write files when the Linux kernel in order to improve read and write performance and speed will be caching files in memory, this memory is Cache Memory (cache memory). Even if your program is running after the Cache Memory is not automatically released. This will lead you to program frequently read and write files in a Linux system, you‘ll find very little physical memory is available.
This cache memory (Cache Memory) automatically releases when you need to use memory, so you don’t have to worry about no memory is available. If you want to manually release the Cache Memory is also a way.
Command to view the memory status:
Method one:
[root@sky9896 /]# more /proc/meminfo
MemTotal:1921696 kB # total physical memory
MemFree:106016 kB # free memory
Buffers:176380 kB # caching is mainly used for directory
Cached:696016 kB # caching for files that have been opened
SwapCached:33176 kB # Exchange cached
……
Method two:
[root@sky9896 /]# free -m
total used free shared buffers cached
Mem: 1876 1723 152 0 173 618
-/+ buffers/cache: 931 944
Swap: 2023 138 1885
Comments:
Total: total physical memory
Used: memory used
Free: totally unused memory
Shared: application to share memory
Buffers: cached, mainly used for directories, inodevalue
Cached: caching for files that have been opened
-Buffers/cache: memory used by the application, and used less cache value
+Buffers/cache: all the amount of memory available for applications to use, free and cache values
Of which:
total = used + free
-Buffers/cache=used-buffers-cached, this is true for the application to use memory size (931M)
+Buffers/cache=free+buffers+cached, this is the real available memory size of the server (944M)
Method three: cacti monitoring the cache memory, see from the diagram, cache is full.
To clear things up by, namely, the implementation of two commands.
[Root@sky9896/]# sync # prevent data loss
[Root@sky9896/]# echo 1 >/proc/sys/VM/drop_caches # release page cache
[Release root@sky9896/]# echo 2>/proc/sys/VM/drop_caches # directory and node
[Root@sky9896/]# echo 3>/proc/sys/VM/drop_caches # clear all cache
After performing, and then view the memory status, as follows:
[root@sky9896 /]# free -m
total used free shared buffers cached
Mem: 1876 756 1119 0 0 36
-/+ buffers/cache: 719 1156
Swap: 2023 138 1885
Cacti monitoring for cached memory, from 619.46M to 62.36M
Instructions, via Linux cache successfully cleared manually.