From: | Jeffrey Walton <noloader(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Properly handle OOM death? |
Date: | 2023-03-18 23:13:37 |
Message-ID: | CAH8yC8=+6-GkfgWe3j7Bn-7r-0gXhsNkW7xKkoLVgVjnitbY9w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Mar 18, 2023 at 6:02 PM Tomas Pospisek <tpo2(at)sourcepole(dot)ch> wrote:
>
> On 13.03.23 21:25, Joe Conway wrote:
>
> > Hmm, well big +1 for having swap turned on, but I recommend setting
> > "vm.overcommit_memory=2" even so.
>
> I've snipped out the context here, since my advice is very unspecific:
> do use swap only as a safety net. Once your system starts swapping
> performance goes down the toilet.
To use swap as a safety net, set swappiness to a low value, like 2.
Two will keep most data in RAM and reduce (but not eliminate) spilling
to the file system.
I have a bunch of old ARM dev boards that are resource constrained.
They use SDcards, which have a limited lifetime based on writes. I
give the boards a 1 GB swap file to avoid OOM kills when running the
compiler on C++ programs. And I configure them with a swappiness of 2
to reduce swapping.
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | shashidhar Reddy | 2023-03-19 02:26:48 | Re: Getting error while upgrading postgres from version 12 to 13 |
Previous Message | Tomas Pospisek | 2023-03-18 22:02:22 | Re: Properly handle OOM death? |