* oom killer and long-waiting processes
@ 2010-06-10 7:17 Ryan Wang
2010-06-10 16:56 ` Mulyadi Santosa
2010-06-10 20:32 ` David Rientjes
0 siblings, 2 replies; 4+ messages in thread
From: Ryan Wang @ 2010-06-10 7:17 UTC (permalink / raw)
To: linux-kernel, linux-mm, kernelnewbies
Hi all,
I have one question about oom killer:
If many processes dealing with network communications,
but due to bad network traffic, the processes have to wait
for a very long time. And meanwhile they may consume
some memeory separately for computation. The number
of such processes may be large.
I wonder whether oom killer will kill these processes
when the system is under high pressure?
thanks,
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: oom killer and long-waiting processes
2010-06-10 7:17 oom killer and long-waiting processes Ryan Wang
@ 2010-06-10 16:56 ` Mulyadi Santosa
2010-06-10 20:32 ` David Rientjes
1 sibling, 0 replies; 4+ messages in thread
From: Mulyadi Santosa @ 2010-06-10 16:56 UTC (permalink / raw)
To: Ryan Wang; +Cc: linux-kernel, linux-mm, kernelnewbies
Hi
On Thu, Jun 10, 2010 at 14:17, Ryan Wang <openspace.wang@gmail.com> wrote:
> Hi all,
>
> I have one question about oom killer:
> If many processes dealing with network communications,
> but due to bad network traffic, the processes have to wait
> for a very long time. And meanwhile they may consume
> some memeory separately for computation. The number
> of such processes may be large.
Please refer to my article here :
http://linuxdevcenter.com/pub/a/linux/2006/11/30/linux-out-of-memory.html
Right now, I can not recall entirely about the rules, but IIRC the
processes that do I/O get lower "score". But that doesn't mean it
won't be killed if free memory amount is really low...
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: oom killer and long-waiting processes
2010-06-10 7:17 oom killer and long-waiting processes Ryan Wang
2010-06-10 16:56 ` Mulyadi Santosa
@ 2010-06-10 20:32 ` David Rientjes
2010-06-11 0:34 ` Ryan Wang
1 sibling, 1 reply; 4+ messages in thread
From: David Rientjes @ 2010-06-10 20:32 UTC (permalink / raw)
To: Ryan Wang; +Cc: linux-kernel, linux-mm, kernelnewbies
On Thu, 10 Jun 2010, Ryan Wang wrote:
> Hi all,
>
> I have one question about oom killer:
> If many processes dealing with network communications,
> but due to bad network traffic, the processes have to wait
> for a very long time. And meanwhile they may consume
> some memeory separately for computation. The number
> of such processes may be large.
>
> I wonder whether oom killer will kill these processes
> when the system is under high pressure?
>
The kernel can deal with "high pressure" quite well, but in some cases
such as when all of your RAM or your memory controller is filled with
anonymous memory and cannot be reclaimed, the oom killer may be called to
kill "something". It prefers to kill something that will free a large
amount of memory to avoid having to subsequently kill additional tasks
when it kills something small first.
If there are tasks that you'd either like to protect from the oom killer
or always prefer in oom conditions, you can influence its decision-making
from userspace by tuning /proc/<pid>/oom_adj of the task in question.
Users typically set an oom_adj value of "-17" to completely disable oom
killing of pid (the kernel will even panic if it can't find anything
killable as a result of this!), a value of "-16" to prefer that pid gets
killed last, and a value of "15" to always prefer pid gets killed first.
Lowering a /proc/<pid>/oom_adj value for a pid from its current value (it
inherits its value from the parent, which is usually 0) is only allowed by
root, more specifically, it may only be done by the CAP_SYS_RESOURCE
capability.
You can refer to Documentation/filesystems/proc.txt for information on
oom_adj.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: oom killer and long-waiting processes
2010-06-10 20:32 ` David Rientjes
@ 2010-06-11 0:34 ` Ryan Wang
0 siblings, 0 replies; 4+ messages in thread
From: Ryan Wang @ 2010-06-11 0:34 UTC (permalink / raw)
To: rientjes, mulyadi.santosa; +Cc: linux-kernel, linux-mm, kernelnewbies
2010/6/11 David Rientjes <rientjes@google.com>:
> On Thu, 10 Jun 2010, Ryan Wang wrote:
>
>> Hi all,
>>
>> I have one question about oom killer:
>> If many processes dealing with network communications,
>> but due to bad network traffic, the processes have to wait
>> for a very long time. And meanwhile they may consume
>> some memeory separately for computation. The number
>> of such processes may be large.
>>
>> I wonder whether oom killer will kill these processes
>> when the system is under high pressure?
>>
>
> The kernel can deal with "high pressure" quite well, but in some cases
> such as when all of your RAM or your memory controller is filled with
> anonymous memory and cannot be reclaimed, the oom killer may be called to
> kill "something". It prefers to kill something that will free a large
> amount of memory to avoid having to subsequently kill additional tasks
> when it kills something small first.
>
> If there are tasks that you'd either like to protect from the oom killer
> or always prefer in oom conditions, you can influence its decision-making
> from userspace by tuning /proc/<pid>/oom_adj of the task in question.
> Users typically set an oom_adj value of "-17" to completely disable oom
> killing of pid (the kernel will even panic if it can't find anything
> killable as a result of this!), a value of "-16" to prefer that pid gets
> killed last, and a value of "15" to always prefer pid gets killed first.
>
> Lowering a /proc/<pid>/oom_adj value for a pid from its current value (it
> inherits its value from the parent, which is usually 0) is only allowed by
> root, more specifically, it may only be done by the CAP_SYS_RESOURCE
> capability.
>
> You can refer to Documentation/filesystems/proc.txt for information on
> oom_adj.
>
Thanks all!
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-11 0:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-10 7:17 oom killer and long-waiting processes Ryan Wang
2010-06-10 16:56 ` Mulyadi Santosa
2010-06-10 20:32 ` David Rientjes
2010-06-11 0:34 ` Ryan Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox