Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database.

From: Mohammed Siddiqui <msiddiqui(at)net32(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Cc: Ken Sollars <Ken(at)net32(dot)com>, Matt Elliott <melliott(at)net32(dot)com>
Subject: Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database.
Date: 2024-07-22 14:46:59
Message-ID: PH0PR22MB3810DDCBB930DABE9BBF16C5B8A82@PH0PR22MB3810.namprd22.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

We have been seeing intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of free RAM. We have a 100 GB database with 256 GB RAM on the server so there is no shortage of RAM nor shortage in PostgreSQL buffer cache. Our swappiness setting is set to "1".

What else can we do as far as PostgreSQL settings are concerned to make sure no/minimal swap is used. SWAP space is set at 8 GB. Is there a BUG related to this for which there has been a fix. Making changes to the application is too big of an effort which we cannot undertake at the moment.

Our PostgreSQL environment is as follows ...
PostgreSQL 14.7 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-16), 64-bit

Red Hat environment details ...
NAME="Red Hat Enterprise Linux"
VERSION="8.8 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.8 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL=https://www.redhat.com/
DOCUMENTATION_URL=https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8
BUG_REPORT_URL=https://bugzilla.redhat.com/
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.8
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"

Hardware details ...
[root(at)newdb ~]# lshw -short
H/W path Device Class Description
============================================================
system PowerEdge R750 (SKU=090E;ModelName=PowerEdge R750)
/0 bus 01J4WF
/0/1 memory 64KiB BIOS
/0/400 processor Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz
/0/400/700 memory 1280KiB L1 cache
/0/400/701 memory 20MiB L2 cache
/0/400/702 memory 36MiB L3 cache
/0/401 processor Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz
/0/401/703 memory 1280KiB L1 cache
/0/401/704 memory 20MiB L2 cache
/0/401/705 memory 36MiB L3 cache
/0/1000 memory 256GiB System Memory
/0/1000/0 memory 32GiB DIMM DDR4 Synchronous Registered (Buffered) 3200 MHz (0.3 ns)
/0/1000/1 memory 32GiB DIMM DDR4 Synchronous Registered (Buffered) 3200 MHz (0.3 ns)
/0/1000/2 memory 32GiB DIMM DDR4 Synchronous Registered (Buffered) 3200 MHz (0.3 ns)
/0/1000/3 memory 32GiB DIMM DDR4 Synchronous Registered (Buffered) 3200 MHz (0.3 ns)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-07-22 16:07:56 BUG #18549: Support ipv6 link-local addresses in the inet type
Previous Message Tom Lane 2024-07-22 14:31:21 Re: BUG #18546: Attempt to insert default into a non-updatable column of a view fails with a dubious error