PostgreSQL Memory consumption is too high

From: Siraj G <tosiraj(dot)g(at)gmail(dot)com>
To: Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: PostgreSQL Memory consumption is too high
Date: 2025-03-14 11:54:07
Message-ID: CAC5iy63fZWRMC-dguaxBp6dH1WQ3pfy7ORKNbrVx+nSmAVeWog@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello -

I need help in determining what is consuming so much memory in the cloud
SQL (GCP managed) instance running with "PostgreSQL 16.6 on
x86_64-pc-linux-gnu, compiled by Debian clang version 12.0.1, 64-bit".

Server spec: 16 vcpu and 128GB

Consistently, CACHE % is 59 - 60% and USAGE is around 39 - 40%. Therefore
we have just around 0.5% free available memory.

I ran queries to get shared_buffers and other values.
Here are the details:
shared_buffers: 42GB
work_mem: 4MB
maintenance_work_mem: 64MB
max_connections: 5900 (however, most of the times we have under 150
concurrent sessions)
There are no extensions installed.

Thank you in advance!
Regards
Siraj

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Ron Johnson 2025-03-14 12:19:01 Re: PostgreSQL Memory consumption is too high
Previous Message Joe Conway 2025-03-13 02:35:17 Re: Getting out ahead of OOM