From: Edward Chron <echron@arista.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Roman Gushchin <guro@fb.com>,
Johannes Weiner <hannes@cmpxchg.org>,
David Rientjes <rientjes@google.com>,
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
Shakeel Butt <shakeelb@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Ivan Delalande <colona@arista.com>
Subject: Re: [PATCH] mm/oom: Add killed process selection information
Date: Thu, 8 Aug 2019 12:21:30 -0700 [thread overview]
Message-ID: <CAM3twVT0_f++p1jkvGuyMYtaYtzgEiaUtb8aYNCmNScirE4=og@mail.gmail.com> (raw)
In-Reply-To: <20190808185119.GF18351@dhcp22.suse.cz>
[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]
It is helpful to the admin that looks at the kill message and records this
information. OOMs can come in bunches.
Knowing how much resource the oom selected process was using at the time of
the OOM event is very useful, these fields document key process and system
memory/swap values and can be quite helpful.
Also can't you disable printing the oom eligible task list? For systems
with very large numbers of oom eligible processes that would seem to be
very desirable.
We have some servers that have many thousands of processes and printing
them all, especially as there may be several oom events that occur can
occur in quick succession, this can be problematic and can result in print
rate limiting.
Having this information with this message is of extra value in that case.
We've included it on the many thousands of linux systems that we've shipped
and also on our internal linux systems and for us it has been helpful.
Also, on our systems we set the Killed process message to pr_err as opposed
pr_info as we want just that message being sent to the console.
Customers and our internal support people find this message in that format
valuable as they want to know when OOM events occur and so this message
gives them a decent amount to go on.
Very few messages go to the console, to avoid clutter, but this one that
people agree belongs there.
I'm not sure that change would be supported upstream but again in our
experience we've found it helpful, since you asked.
Thanks.
On Thu, Aug 8, 2019 at 11:51 AM Michal Hocko <mhocko@kernel.org> wrote:
> On Thu 08-08-19 11:32:47, Edward Chron wrote:
> > For an OOM event: print oomscore, memory pct, oom adjustment of the
> process
> > that OOM kills and the totalpages value in kB (KiB) used in the
> calculation
> > with the OOM killed process message. This is helpful to document why the
> > process was selected by OOM at the time of the OOM event.
> >
> > Sample message output:
> > Jul 21 20:07:48 yoursystem kernel: Out of memory: Killed process 2826
> > (processname) total-vm:1056800kB, anon-rss:1052784kB, file-rss:4kB,
> > shmem-rss:0kB memory-usage:3.2% oom_score:1032 oom_score_adj:1000
> > total-pages: 32791748kB
>
> A large part of this information is already printed in the oom eligible
> task list. Namely rss, oom_score_adj, there is also page tables
> consumption which might be a serious contributor as well. Why would you
> like to see oom_score, memory-usage and total-pages to be printed as
> well? How is that information useful?
> --
> Michal Hocko
> SUSE Labs
>
[-- Attachment #2: Type: text/html, Size: 3093 bytes --]
next prev parent reply other threads:[~2019-08-08 19:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-08 18:32 Edward Chron
2019-08-08 18:51 ` Michal Hocko
2019-08-08 19:21 ` Edward Chron [this message]
2019-08-08 20:07 ` Michal Hocko
2019-08-08 22:15 ` Edward Chron
2019-08-09 6:40 ` Michal Hocko
2019-08-09 22:15 ` Edward Chron
2019-08-12 11:42 ` Michal Hocko
2019-08-15 6:24 ` Edward Chron
2019-08-15 8:18 ` Michal Hocko
2019-08-15 6:06 Edward Chron
2019-08-15 8:24 ` Michal Hocko
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='CAM3twVT0_f++p1jkvGuyMYtaYtzgEiaUtb8aYNCmNScirE4=og@mail.gmail.com' \
--to=echron@arista.com \
--cc=akpm@linux-foundation.org \
--cc=colona@arista.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=rientjes@google.com \
--cc=shakeelb@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