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@xxxxxxxxxx> 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