pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe Conway <mail@joeconway.com>
To: Israel Brewster <ijbrewster@alaska.edu>
Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Properly handle OOM death?
Date: Mon, 13 Mar 2023 15:42:52 -0400
Message-ID: <ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com> (raw)
In-Reply-To: <3E19F901-6C7D-44C1-BBFE-11F78F9EE38C@alaska.edu>
References: <E1525E23-A751-41C6-AD65-B3BF6C982B06@alaska.edu>
	<20230313174301.23n6crb5dpttozup@hjp.at>
	<B24D8C1B-E275-4E96-8D35-DFA494ECB0F2@alaska.edu>
	<03239776-b0c6-94a8-7bb3-a1af363d745f@joeconway.com>
	<9616AB47-E78B-49FD-81AE-41015E13AADC@alaska.edu>
	<b9b8d1df-08e2-2863-a2d6-48aec9e457f7@joeconway.com>
	<3E19F901-6C7D-44C1-BBFE-11F78F9EE38C@alaska.edu>

On 3/13/23 15:18, Israel Brewster wrote:
> root@novarupta:~# cat /sys/fs/cgroup/system.slice/system-postgresql.slice/postgresql@13-main.service/memory.max
> max
> root@novarupta:~# cat /sys/fs/cgroup/system.slice/system-postgresql.slice/postgresql@13-main.service/memory.high
> max
> root@novarupta:~#
> 
> which would presumably indicate that it’s a system level limit being
> exceeded, rather than a postgresql specific one?

Yep

> The syslog specifically says "Memory cgroup out of memory”, if that means
> something (this is my first exposure to cgroups, if you couldn’t
> tell).

I am not entirely sure, but without actually testing it I suspect that 
since memory.max = high (that is, the limit is whatever the host has 
available) the OOM kill is technically a cgroup OOM kill even though it 
is effectively a host level memory pressure event.

Did you try setting "vm.overcommit_memory=2"?

-- 
Joe Conway
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com






view thread (22+ messages)  latest in thread

Message-ID: <ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com>
Permalink:  ../ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com/
Also on:    postgresql.org/message-id/ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com

 · 

reply

Reply instructions:

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

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: mail@joeconway.com, ijbrewster@alaska.edu, hjp-pgsql@hjp.at
  Subject: Re: Properly handle OOM death?
  In-Reply-To: <ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com>
  References: <E1525E23-A751-41C6-AD65-B3BF6C982B06@alaska.edu> <20230313174301.23n6crb5dpttozup@hjp.at> <B24D8C1B-E275-4E96-8D35-DFA494ECB0F2@alaska.edu> <03239776-b0c6-94a8-7bb3-a1af363d745f@joeconway.com> <9616AB47-E78B-49FD-81AE-41015E13AADC@alaska.edu> <b9b8d1df-08e2-2863-a2d6-48aec9e457f7@joeconway.com> <3E19F901-6C7D-44C1-BBFE-11F78F9EE38C@alaska.edu> <ec109215-9538-7e13-14a7-dc220d17c44d@joeconway.com>

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

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox