how to prevent lowmemorykiller from killing processes

Hi there,

I've upgraded a number of test systems to the latest Saucy beta. I've seen quite a few cases of processes being killed by lowmemorykiller with the following entries being logged:

[ 291.565121] lowmemorykiller: send sigkill to 4476 (python), adj 0, size 8864
[23515.006794] lowmemorykiller: send sigkill to 944 (update-apt-xapi), adj 0, size 44175

The systems where this happens are kvm virtual machines with relatively modest amounts of RAM allocated (256 or 512 MB) with 2 GB swap. The swap is mostly unused when the kills occur.

I searched around and could only find references to Android for lowmemorykiller and nothing on how to disable it. I tried the following without success:

echo '9999,9999' > /sys/module/lowmemorykiller/parameters/adj

Any ideas on how to disable lowmemorykiller or at least prevent processes to be killed rather than swapped?

==

Answer:

cat /sys/module/lowmemorykiller/parameters/minfree
cat /sys/module/lowmemorykiller/parameters/adj
echo '9999' > /sys/module/lowmemorykiller/parameters/adj
echo '1' > /sys/module/lowmemorykiller/parameters/minfree
cat /sys/module/lowmemorykiller/parameters/minfree
cat /sys/module/lowmemorykiller/parameters/adj

https://answers.launchpad.net/ubuntu/+question/236764

原文地址:https://www.cnblogs.com/bittorrent/p/3465081.html