linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Denys Vlasenko <vda.linux@googlemail.com>
To: Pavel Ivanov <paivanof@gmail.com>
Cc: Mahmood Naderan <nt_mahmood@yahoo.com>,
	David Rientjes <rientjes@google.com>,
	Randy Dunlap <rdunlap@xenotime.net>,
	"\"linux-kernel@vger.kernel.org\"" <linux-kernel@vger.kernel.org>,
	"\"linux-mm@kvack.org\"" <linux-mm@kvack.org>
Subject: Re: running of out memory => kernel crash
Date: Fri, 19 Aug 2011 00:25:27 +0200	[thread overview]
Message-ID: <201108190025.27444.vda.linux@googlemail.com> (raw)
In-Reply-To: <CAG1a4rus+VVhhB3ayuDF2pCQDusLekGOAxf33+u_uzxC1yz1MA@mail.gmail.com>

On Thursday 18 August 2011 16:26, Pavel Ivanov wrote:
> On Thu, Aug 18, 2011 at 8:44 AM, Denys Vlasenko
> <vda.linux@googlemail.com> wrote:
> >> I have a little concern about this explanation of yours. Suppose we
> >> have some amount of more or less actively executing processes in the
> >> system. Suppose they started to use lots of resident memory. Amount of
> >> memory they use is less than total available physical memory but when
> >> we add total size of code for those processes it would be several
> >> pages more than total size of physical memory. As I understood from
> >> your explanation in such situation one process will execute its time
> >> slice, kernel will switch to other one, find that its code was pushed
> >> out of RAM, read it from disk, execute its time slice, switch to next
> >> process, read its code from disk, execute and so on. So system will be
> >> virtually unusable because of constantly reading from disk just to
> >> execute next small piece of code. But oom will never be firing in such
> >> situation. Is my understanding correct?
> >
> > Yes.
> >
> >> Shouldn't it be considered as an unwanted behavior?
> >
> > Yes. But all alternatives (such as killing some process) seem to be worse.
> 
> Could you elaborate on this? We have a completely unusable server
> which can be revived only by hard power cycling (administrators won't
> be able to log in because sshd and shell will fall victims of the same
> unending disk reading).

You can ssh into it. It will just take VERY, VERY LONG.

> And as an alternative we can kill some process 
> and at least allow administrator to log in and check if something else
> can be done to make server feel better. Why is it worse?
> 
> I understand that it could be very hard to detect such situation

Exactly. Server has no means to know when the situation is
bad enough to start killing. IIRC now the rule is simple:
OOM killing starts only when allocations fail.

Perhaps it is possible to add "start OOM killing if less than N free
pages are available", but this will be complex, and won't be good enough
for some configs with many zones (thus, will require even more complications).

-- 
vda

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-08-18 22:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1312872786.70934.YahooMailNeo@web111712.mail.gq1.yahoo.com>
2011-08-09  7:06 ` running of out memory => kernel crash Randy Dunlap
     [not found]   ` <1312874259.89770.YahooMailNeo@web111704.mail.gq1.yahoo.com>
2011-08-09 16:03     ` David Rientjes
2011-08-10  8:14       ` Mahmood Naderan
2011-08-11  4:09         ` David Rientjes
2011-08-11  7:07           ` Mahmood Naderan
2011-08-11  7:13             ` David Rientjes
2011-08-11  8:02               ` Mahmood Naderan
2011-08-11 12:47                 ` Denys Vlasenko
2011-08-11 15:13                   ` Mahmood Naderan
2011-08-11 17:38                     ` Denys Vlasenko
2011-08-17  8:50                       ` Mahmood Naderan
2011-08-18  2:18                       ` Pavel Ivanov
2011-08-18 12:44                         ` Denys Vlasenko
2011-08-18 14:26                           ` Pavel Ivanov
2011-08-18 22:25                             ` Denys Vlasenko [this message]
2011-08-19 19:21                               ` David Rientjes
2011-08-19 19:29                             ` Bryan Donlan
2011-08-19 21:19                               ` Chris Friesen
2011-08-19 21:38                                 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201108190025.27444.vda.linux@googlemail.com \
    --to=vda.linux@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nt_mahmood@yahoo.com \
    --cc=paivanof@gmail.com \
    --cc=rdunlap@xenotime.net \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).