Desative apenas o OOM Killer
para o processo específico com:
for p in $(pidof kvm qemu-system32_x64); do
echo -n '-17' > /proc/$p/oom_adj
done
ou pelo sabor oom_score adj
.
No entanto:
Out of memory: Kill process 25086 (kvm) score 192 or sacrifice child
No seu caso, é também definir 192
.
Veja também Domando o Assassino OOM
Em qualquer caso, você deve verificar também o que causa o estouro de memória, já que o OOM Killer mata outros processos importantes.
Freqüentemente é observado um fenômeno chamado overtuning
. Neste caso, o overcommit_memory
como descrito aqui .
Fonte sistemas de arquivos proc :
oom_adj:
For backwards compatibility with previous kernels, /proc/<pid>/oom_adj may also
be used to tune the badness score. Its acceptable values range from -16
(OOM_ADJUST_MIN) to +15 (OOM_ADJUST_MAX) and a special value of -17
(OOM_DISABLE) to disable oom killing entirely for that task. Its value is
scaled linearly with /proc/<pid>/oom_score_adj.
oom_score_adj:
The value of /proc/<pid>/oom_score_adj is added to the badness score before it
is used to determine which task to kill. Acceptable values range from -1000
(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX). This allows userspace to
polarize the preference for oom killing either by always preferring a certain
task or completely disabling it. The lowest possible value, -1000, is
equivalent to disabling oom killing entirely for that task since it will always
report a badness score of 0.