echo 1 > /proc/sys/vm/drop_caches 内在逻辑
时间: 2023-08-21 12:03:02 浏览: 180
linux 内存清理/释放命令总结
引用\[1\]和\[2\]提到了使用命令"echo n > /proc/sys/vm/drop_caches"来清理缓存。其中,n的取值可以是0、1或3。当n为0时,表示不清理任何缓存;当n为1时,表示清理页缓存;当n为3时,表示清理页缓存、目录项和inode。引用\[3\]中也提到了使用类似的命令来释放buff/cache的内存。因此,"echo 1 > /proc/sys/vm/drop_caches"的内在逻辑是清理页缓存,即释放被缓存的文件页,以便将内存空间变为可用状态。
#### 引用[.reference_title]
- *1* [Linux shell:echo N > /proc/sys/vm/drop_caches清理缓存](https://blog.csdn.net/weixin_44498318/article/details/120028843)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [解决echo 0 > /proc/sys/vm/drop_caches报错](https://blog.csdn.net/Hassang/article/details/130067999)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [释放linux缓存 echo 1 > /proc/sys/vm/drop_caches](https://blog.csdn.net/qq_44625080/article/details/125233579)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文