相关疑难解决方法(0)

设置 /proc/sys/vm/drop_caches 以清除缓存

作为进行一些冷缓存计时的一部分,我正在尝试释放操作系统缓存。该内核文档(检索2019日)说:

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_caches
To free reclaimable slab objects (includes dentries and inodes):
    echo 2 > /proc/sys/vm/drop_caches
To free slab objects and pagecache:
    echo 3 > /proc/sys/vm/drop_caches

This is a non-destructive operation and will not free any dirty objects.
To increase the number of objects freed …
Run Code Online (Sandbox Code Playgroud)

linux virtual-memory

104
推荐指数
1
解决办法
21万
查看次数

标签 统计

linux ×1

virtual-memory ×1