public inbox for [email protected]
help / color / mirror / Atom feedRequest for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment
4+ messages / 2 participants
[nested] [flat]
* Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment
@ 2026-05-25 17:16 mahamood hussain <[email protected]>
2026-05-25 21:03 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment Laurenz Albe <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: mahamood hussain @ 2026-05-25 17:16 UTC (permalink / raw)
To: Pgsql-admin <[email protected]>
Hi Team,
We are currently migrating our database environments from IBM Db2 to
PostgreSQL 17.6 on AlmaLinux and would like some guidance/best practices
around recommended ulimit (open file descriptor) settings for PostgreSQL.
Environment details:
- OS: AlmaLinux
- PostgreSQL Version: 17.6
- Deployment Model: Multiple PostgreSQL clusters (~10 clusters) running
on the same server
- All PostgreSQL instances are managed through systemd services using a
template service ([email protected])
- Workload includes ETL, PgBouncer
Current DB2 Setting:
Max open files = 65535
We would like clarification on:
1. Is increasing the open file limit (ulimit -n) recommended/required
for PostgreSQL in such multi-cluster production environments?
2. What would be the recommended LimitNOFILE value for PostgreSQL
considering:
- multiple clusters on same host
- production workloads
- PgBouncer usage
- ETL-heavy processing
Current PostgreSQL service template:
[Unit]
Description=PostgreSQL 17 database server instance %i
After=network.target
[Service]
Type=forking
User=postgres
Group=postgres
EnvironmentFile=/etc/postgresql/%i.env
ExecStart=/volumes/pg/pgsql-17/bin/pg_ctl start -D ${PGDATA} -o "-p
${PGPORT}" -l ${PGLOG}/postgresql.log -s -w -t 300
ExecStop=/volumes/pg/pgsql-17/bin/pg_ctl stop -D ${PGDATA} -s -m fast
ExecReload=/volumes/pg/pgsql-17/bin/pg_ctl reload -D ${PGDATA} -s
[Install]
WantedBy=multi-user.target
Reg,
Hussain
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment
2026-05-25 17:16 Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
@ 2026-05-25 21:03 ` Laurenz Albe <[email protected]>
2026-05-26 05:36 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: Laurenz Albe @ 2026-05-25 21:03 UTC (permalink / raw)
To: mahamood hussain <[email protected]>; Pgsql-admin <[email protected]>
On Mon, 2026-05-25 at 22:46 +0530, mahamood hussain wrote:
> Current DB2 Setting:
> Max open files = 65535
> We would like clarification on:
> 1. Is increasing the open file limit (ulimit -n) recommended/required for PostgreSQL in such
> multi-cluster production environments?
65535 will be more than you need, unless you plan to use thousands of partitions or processes,
which is a bad idea anyway.
> 2. What would be the recommended LimitNOFILE value for PostgreSQL considering:multiple clusters
> on same hostproduction workloadsPgBouncer usageETL-heavy processing
It all depends on how many files (tables, indexes) you plan to use. If you are worried,
just set the limit higher.
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment
2026-05-25 17:16 Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
2026-05-25 21:03 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment Laurenz Albe <[email protected]>
@ 2026-05-26 05:36 ` mahamood hussain <[email protected]>
2026-05-26 07:57 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment Laurenz Albe <[email protected]>
0 siblings, 1 reply; 4+ messages in thread
From: mahamood hussain @ 2026-05-26 05:36 UTC (permalink / raw)
To: Pgsql-admin <[email protected]>
Thank you for your response.
How can I determine whether the current setting is sufficient and verify
that I’m not hitting any limits with the existing value?
On Tue, May 26, 2026 at 2:33 AM Laurenz Albe <[email protected]>
wrote:
> On Mon, 2026-05-25 at 22:46 +0530, mahamood hussain wrote:
> > Current DB2 Setting:
> > Max open files = 65535
> > We would like clarification on:
> > 1. Is increasing the open file limit (ulimit -n) recommended/required
> for PostgreSQL in such
> > multi-cluster production environments?
>
> 65535 will be more than you need, unless you plan to use thousands of
> partitions or processes,
> which is a bad idea anyway.
>
> > 2. What would be the recommended LimitNOFILE value for PostgreSQL
> considering:multiple clusters
> > on same hostproduction workloadsPgBouncer usageETL-heavy processing
>
> It all depends on how many files (tables, indexes) you plan to use. If
> you are worried,
> just set the limit higher.
>
> Yours,
> Laurenz Albe
>
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment
2026-05-25 17:16 Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
2026-05-25 21:03 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment Laurenz Albe <[email protected]>
2026-05-26 05:36 ` Re: Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
@ 2026-05-26 07:57 ` Laurenz Albe <[email protected]>
0 siblings, 0 replies; 4+ messages in thread
From: Laurenz Albe @ 2026-05-26 07:57 UTC (permalink / raw)
To: mahamood hussain <[email protected]>; Pgsql-admin <[email protected]>
On Tue, 2026-05-26 at 11:06 +0530, mahamood hussain wrote:
> How can I determine whether the current setting is sufficient and verify
> that I’m not hitting any limits with the existing value?
By watching out for nasty errors from your SQL statements...
Why don't you set the limit to "unlimited" and stop worrying?
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2026-05-26 07:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-25 17:16 Request for Guidance on Recommended ulimit/Open File Settings for PostgreSQL 17 Multi-Cluster Environment mahamood hussain <[email protected]>
2026-05-25 21:03 ` Laurenz Albe <[email protected]>
2026-05-26 05:36 ` mahamood hussain <[email protected]>
2026-05-26 07:57 ` Laurenz Albe <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox