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

From: Zaid Shabbir <zaidshabbir(at)gmail(dot)com>
To: Mohammed Siddiqui <msiddiqui(at)net32(dot)com>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database.
Date: 2024-07-30 13:41:36
Message-ID: CABCJe_VCWZs27VoHF56xD8mznzCur6n8377Yw7abjKvCqXCMMg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

It depends on many factors as per the user environment but for your
information you can check following useful links

https://pgtune.leopard.in.ua
https://www.enterprisedb.com/postgres-tutorials/introduction-postgresql-performance-tuning-and-optimization
https://www.postgresql.org/docs/current/runtime-config.html

Thanks & Regards
Zaid
Bitnine Global Inc.

On Tue, Jul 30, 2024 at 6:35 PM Mohammed Siddiqui <msiddiqui(at)net32(dot)com>
wrote:

> Zaid … Thanks for your feedback. Pls recommend exact changes so that we
> can try it out.
>
>
>
> Regards.
>
>
>
> Mohammed M Siddiqui
>
>
>
> *From:* Zaid Shabbir <zaidshabbir(at)gmail(dot)com>
> *Sent:* Tuesday, July 30, 2024 9:16 AM
> *To:* Mohammed Siddiqui <msiddiqui(at)net32(dot)com>
> *Cc:* Aleksander Alekseev <aleksander(at)timescale(dot)com>;
> pgsql-bugs(at)lists(dot)postgresql(dot)org; Ken Sollars <Ken(at)net32(dot)com>; Matt
> Elliott <melliott(at)net32(dot)com>
> *Subject:* Re: Intermittent aggressive use of SWAP space by PostgreSQL
> despite availability of HUGE amounts of RAM for a small database.
>
>
>
> Hello Mohammed,
>
>
>
> I reviewed your attached postgresql.conf file and observed some concerning
> points. As you mentioned you have 256 GB RAM with 100 GB database size.
> In your configuration file you use higher ranges as compared to your system
> resources like ..
>
>
>
> shared_buffers = 120000MB
>
> ...
>
> work_mem = 2048MB
>
> ...
>
> maintenance_work_mem = 2048MB
>
> ...
>
> effective_cache_size = 120000MB
>
> ...
>
>
>
> max_connection = 3000
>
>
>
> The above configuration looks too much as per your available system
> resources. It looks like you need some expert review to evaluate your
> system resources and configure the server accordingly.
>
>
>
>
>
>
>
> Thanks & Regards
>
> Zaid
>
> Bitnine Global Inc.
>
>
>
> On Thu, Jul 25, 2024 at 5:01 PM Mohammed Siddiqui <msiddiqui(at)net32(dot)com>
> wrote:
>
> Configuration file is attached.
>
> -----Original Message-----
> From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
> Sent: Tuesday, July 23, 2024 4:33 AM
> To: pgsql-bugs(at)lists(dot)postgresql(dot)org
> Cc: Mohammed Siddiqui <msiddiqui(at)net32(dot)com>; Ken Sollars <Ken(at)net32(dot)com>;
> Matt Elliott <melliott(at)net32(dot)com>
> Subject: Re: Intermittent aggressive use of SWAP space by PostgreSQL
> despite availability of HUGE amounts of RAM for a small database.
>
> Hi,
>
> > 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”.
> > [...]
>
> Please provide your postgresql.conf.
>
> Also, why do you need a swap on such a setup? I seriously doubt that it
> serves any purpose.
>
> --
> Best regards,
> Aleksander Alekseev
>
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message PG Bug reporting form 2024-07-30 13:47:15 BUG #18559: Crash after detaching a partition concurrently from another session
Previous Message Mohammed Siddiqui 2024-07-30 13:34:21 RE: Intermittent aggressive use of SWAP space by PostgreSQL despite availability of HUGE amounts of RAM for a small database.