Linux 内核参数:drop_caches
源码基于:Linux 5.15
节点针对:
/proc/sys/vm/drop_caches
0. 官方描述
drop_caches
===========Writing to this will cause the kernel to drop clean caches, as well as
reclaimable slab objects like dentries and inodes. Once dropped, their
memory becomes free.To free pagecache::echo 1 > /proc/sys/vm/drop_cachesTo free reclaimable slab objects (includes dentries and inodes)::echo 2 > /proc/sys/vm/drop_cachesTo free slab objects and pagecache::echo 3 > /proc/sys/vm/drop_cachesThis is a non-destructive operation and will not free any dirty objects.
To increase the number of objects freed by this operation, the user may run
`sync` prior to writing