On Fri, 2021-06-11 at 09:06 +0200, Johannes Truschnigg wrote: > On Fri, Jun 11, 2021 at 08:56:13AM +0200, Laurenz Albe wrote: > > [...] > > I recommend setting > > > > vm.overcommit_memory = 2 > > Be careful with this though, most applications no not allocate memory as > thoughtfully as Postgres - so if your server is running any other kind of > service/software in addition to Postgres, you should make sure that can > survive Linux not overcommitting like there's no tomorrow, too. On the contrary: if there is some software that allocates memory like crazy, you want to disable overcommit, so that you get a nice OOM error rather than killed processes, which result in PostgreSQL going through crash recovery. But I think that running such a misbehaving program on a database machine is a bad idea. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com