kswapd reclaim内核线程的执行一般是由于硬件内存太小或者程序占用过大或者内存配置太小
与内存回收相关的几个系统参数
cat /proc/zoneinfo # 决定“什么情况下触发direct reclaim,什么情况下又会触发kswapd,是由内存的watermark决定的”
cat /proc/sys/vm/min_free_kbytes # 官方解释如下
min_free_kbytes: This is used to force the Linux VM to keep a minimum number of kilobytes free. The VM uses this number to compute a watermark[WMARK_MIN] value for each lowmem zone in the system. Each lowmem zone gets a number of reserved free pages based proportionally on its size. Some minimal amount of memory is needed to satisfy PF_MEMALLOC allocations; if you set this to lower than 1024KB, your system will become subtly broken, and prone to deadlock under high loads. Setting this too high will OOM your machine instantly.
cat /proc/meminfo # 系统内存状态
一、当前系统内存省下:150246k