linux swappiness
1. 基础概念
swappiness:https://www.kernel.org/doc/Documentation/sysctl/vm.txt
============================================================== swappiness This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase aggressiveness, lower values decrease the amount of swap. A value of 0 instructs the kernel not to initiate swap until the amount of free and file-backed pages is less than the high water mark in a zone. The default value is 60. ==============================================================

源码地址:https://elixir.

本文详细介绍了Linux中的swappiness参数,它用于控制内存回收策略,特别是在匿名页和文件缓存页之间的优先级。swappiness值的设置影响着Linux何时以及如何进行页面交换。当设置为0时,系统会尽可能避免交换,而值为100时,两种类型的页面将被同等对待。此外,文章还提到了drop_caches选项,用于回收文件缓存和内核对象缓存。
最低0.47元/天 解锁文章
9079

被折叠的 条评论
为什么被折叠?



