DEV Community

loading...

Discussion on: Surviving the Linux OOM Killer

Collapse
iloveeclipse profile image
Andrey Loskutov

We've found an interesting issue: specific oom_score_adj values in the range [942,999] seem to produce "unexpected" oom_adj values of 16, which seem to be out of range [-17, 15].

That is at least unexpected, any idea where it is coming from and if that could affect the oom_killer behavior (e.g. task with oom_score_adj=940 will be killed before the task with oom_score_adj=999)? At least /proc/<pid>/oom_score seem to be "OK" and is higher for oom_score_adj=1000...

sudo echo "999" > /proc/<pid>/oom_score_adj
cat /<pid>/oom_score_adj
999
cat /<pid>/oom_adj
16
cat /proc/<pid>/oom_score
1008

sudo echo "1000" > /proc/<pid>/oom_score_adj
cat /<pid>/oom_score_adj
1000
cat /<pid>/oom_adj
15
cat /proc/<pid>/oom_score
1009