Re: How to monitor Postgres real memory usage - Mailing list pgsql-performance

From Justin Pryzby
Subject Re: How to monitor Postgres real memory usage
Date
Msg-id 20220527175647.GG19626@telsasoft.com
Whole thread Raw
In response to How to monitor Postgres real memory usage  (徐志宇徐 <xuzhiyuster@gmail.com>)
List pgsql-performance
On Sat, May 28, 2022 at 01:40:14AM +0800, 徐志宇徐 wrote:
> vm.swappiness=0

I think this is related to the problem.

swappiness=0 means to *never* use swap, even if that means that processes are
killed.

If you really wanted that, you should remove the swap space.

Swap is extremely slow and worth avoiding, but this doesn't let you use it at
all.  You can't even look at your swap usage as a diagnostic measure to tell if
things had been paged out at some point.

I *suspect* the problem will go away if you set swappiness=1 in /proc (and in
sysctl.conf).

-- 
Justin



pgsql-performance by date:

Previous
From: 徐志宇徐
Date:
Subject: Re: How to monitor Postgres real memory usage
Next
From: Tom Lane
Date:
Subject: Re: rows selectivity overestimate for @> operator for arrays