doc: Document Linux cgroup memory limits - Mailing list pgsql-hackers

From Joao Detomini
Subject doc: Document Linux cgroup memory limits
Date
Msg-id CABH8dKwkp1_TzR7nxfvSpRSLD1b33xw7N_VLMLy3MiaEjAEPNw@mail.gmail.com
Whole thread
List pgsql-hackers
Hi,

The "Linux Memory Overcommit" section of the docs only talks about
host-wide behavior (vm.overcommit_memory, oom_score_adj), but a lot of
installations now run Postgres in containers, where a cgroup memory
limit is what actually triggers the OOM killer, regardless of the
host's overcommit settings.

The attached patch adds a short subsection covering this: how
memory.max behaves with cgroup v2, what happens when a backend is
killed, what counts towards the limit (including the huge pages
caveat), and a pointer to the kernel documentation.

The patch is against master, and the docs build cleanly here.  This is
my first contribution, so I'd appreciate any feedback on the wording or
on things I should add or drop.

Thanks,
João Marcelo
Attachment

pgsql-hackers by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: [Patch] Batch fsyncs when recycling WAL segments
Next
From: Andres Freund
Date:
Subject: Re: Partial indexes on system catalogs