Article Title: LinuxCacheMemory (cache memory ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Different from windows, linux has Cache Memory, which is usually called Cache Memory. Sometimes you will find that no program is running, but the top or free command shows that the available Memory is very small. In this case, you can view the Linux system/proc/meminfo file and find a Cached Memory:
#>> Cat/proc/meminfo
MemTotal: 16414004 kB
MemFree: 10278960 kB
Buffers': 65588 kB
Cached: 1273692 kB
SwapCached: 15552 kB
Active: 5349400 kB
Inactive: 597340 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 16414004 kB
LowFree: 10278960 kB
SwapTotal: 33551744 kB
SwapFree: 33315872 kB
Dirty: 64 kB
Writeback: 0 kB
Mapped: 4662772 kB
Slab: 134212 kB
CommitLimit: 41758744 kB
Committed_AS: 5048776 kB
PageTables: 14784 kB
VmallocTotal: 536870911 kB
VmallocUsed: 279436 kB
VmallocChunk: 536590975 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
What is Cache Memory ):
When you read and write files, the Linux kernel caches the files in the Memory to improve the Read and Write efficiency and speed. This part of the Memory is Cache Memory ). The Cache Memory will not be automatically released even after your program runs. This will cause your program to read and write files frequently in Linux, and you will find that there is very little available physical memory.
In fact, this Cache Memory will be automatically released when you need to use the Memory, so you do not have to worry about no Memory available. You can also manually release the Cache Memory.
Release Cache Memory (Cache Memory ):
Use the following command to release the Cache Memory:
Echo 3>/proc/sys/vm/drop_caches