RE: Clearing of temp files is very slow in pg16

From: <msalais(at)msym(dot)fr>
To: "'Ramakrishna Reddy Nandyala'" <rkreddy(dot)n(at)gmail(dot)com>, <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: RE: Clearing of temp files is very slow in pg16
Date: 2025-08-18 21:21:46
Message-ID: 007501dc1086$1a5f5670$4f1e0350$@msym.fr
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi

You said : “We have configured 25% RAM as shared buffers,50% as effective cache.we have configured 50% RAM for Huge page settings”

So I can say that you are wasting about 25% of your RAM!

Apart from shared buffers (and dynamic shared memory), no other memory areas in PostgreSQL use huge pages.

Regards

Michel SALAIS

De : Ramakrishna Reddy Nandyala <rkreddy(dot)n(at)gmail(dot)com>
Envoyé : lundi 4 août 2025 18:10
À : pgsql-admin(at)lists(dot)postgresql(dot)org
Objet : Clearing of temp files is very slow in pg16

Hi Team

System details

We are using pg-16.8 on rhel 9.x

RAM-96GB

CPU-16

We have configured 25% RAM as shared buffers,50% as effective cache.we have configured 50% RAM for Huge page settings

Max connection set to 2000

Work-mem -4 mb

Maintenance work mem set to 1 GB

Issue details

1) we have an application that selects the data and will process in application and try to insert the data into an other table

During this process we are seeing so many temporary files been generated by the system,after some time we are seeing the application Connection is accumulating the memory at OS Level after reaching ~50%,we are getting Out Of Memory error and Kernel is killing the top memory consumer process ,here it is killing Postgres process that is doing the entire process.while automatic Postgres Service restart ,system status showing as activating and it is coming to Active state only after clearing of all the temporary files crated during the query running.The clearing of temp files are very slow such that it is causing unplanned outages to the system

how to fasten the Temp files removal?

How to get rid of this situation?

Any suggestions on the configuration to avoid the temp file generation

Thanks in advance

Ramakrishna

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Raj 2025-08-18 22:55:12 Sequence of objects to import - Ora2pg
Previous Message Fabrice Chapuis 2025-08-13 10:06:15 Re: pg_split_walfile_name