Skip to contentSkip to conversation

Linux killed Kenny, bastard!

DISCUSSION Bodo Eggert 2 participants 4 messages Jan 17, 2009 – Jan 18, 2009 11 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw
Quoted 4 lines · Evgeniy Polyakov

The only sane way to use oom_adj is
to disable oom killer for the task or make its score very small or very big, there is really no way to make a finegrained tuning, since score changes and userspace does not know the algorithm.

It does not need to know, it just has to tune until it's about level with the other normal processes if it's to be a normal process, and add or substract one or two to oom_adj if it's avery (un)important process.

#12 lore raw
Quoted 8 lines · Bodo Eggert
Quoted 4 lines

The only sane way to use oom_adj is
to disable oom killer for the task or make its score very small or very big, there is really no way to make a finegrained tuning, since score changes and userspace does not know the algorithm.

It does not need to know, it just has to tune until it's about level with the other normal processes if it's to be a normal process, and add or substract one or two to oom_adj if it's avery (un)important process.

Did you try such tuning yourself? I submitted documentation update on how score is calculated, there is really no way admin can do that in some script or manually, and relying on oom_score content is not very precise since it jumps all over the range depending on the read time.

So, forget that you can tune oom_adj system-wide, it is only possible to effectively enable or disable it. If there are two identical processes, it is possible in theory to tune them against each other, but practice and theory are the same only in theory, in practice one of the processes will suddenly start doing different things and all your calculus immediately become wrong.

OOM scores can not be reliably tuned system-wide.

Signature · 1 line
	Evgeniy Polyakov
#13 lore raw
Quoted 7 lines · Evgeniy Polyakov
Quoted 5 lines · Bodo Eggert
Quoted 4 lines

The only sane way to use oom_adj is
to disable oom killer for the task or make its score very small or very big, there is really no way to make a finegrained tuning, since score changes and userspace does not know the algorithm.

Quoted 5 lines
Quoted 3 lines

It does not need to know, it just has to tune until it's about level with the other normal processes if it's to be a normal process, and add or substract one or two to oom_adj if it's avery (un)important process.

Did you try such tuning yourself?

No, I just designed the oom_adj mechanism and left the implementation to experienced people.

Quoted 4 lines

I submitted documentation update on
how score is calculated, there is really no way admin can do that in some script or manually, and relying on oom_score content is not very precise since it jumps all over the range depending on the read time.

The value is expeted to vary with the read time, since memory usage does vary, too. If your sshd goes berserk and starts eating memory, it may be smart to kill it. If it doesn't, the score should remain about the same.

Quoted 2 lines

So, forget that you can tune oom_adj system-wide, it is only possible to effectively enable or disable it.

It is, as long as the score varies with the badness of a process.

Quoted 6 lines

If there are two identical processes,
it is possible in theory to tune them against each other, but practice and theory are the same only in theory, in practice one of the processes will suddenly start doing different things and all your calculus immediately become wrong.
OOM scores can not be reliably tuned system-wide.

As I said, if a program starts misbehaving, it's mostly not sane to keep it alive. Besides that, the oom_adj allows you to special case some processes to be immortal or to be kenny, but you should be prepared for trouble then.

Signature · 2 lines
A Purple Heart just goes to prove that were you smart enough to think of a
plan, stupid enough to try it, and lucky enough to survive.
#14 lore raw
Quoted 6 lines · Bodo Eggert
Quoted 1 line

OOM scores can not be reliably tuned system-wide.

As I said, if a program starts misbehaving, it's mostly not sane to keep it alive. Besides that, the oom_adj allows you to special case some processes to be immortal or to be kenny, but you should be prepared for trouble then.

oom_adj can turn off the oom-killer for given PID and make it essentially immortal, it practically can not faingrainely tune this. But even than can only be achieved with lots of problems, that's the main point of the patch: to make things simple for the people who know what they are doing.

Signature · 1 line
	Evgeniy Polyakov