Performance impact of lowering max_files_per_process - Mailing list pgsql-performance

From Thomas Kellerer
Subject Performance impact of lowering max_files_per_process
Date
Msg-id ae07644a-0e16-393c-3351-f1d0546b50d1@gmx.net
Whole thread Raw
Responses Re: Performance impact of lowering max_files_per_process
List pgsql-performance
We have a customer project where Postgres is using too many file handles during peak times (around 150.000)

Apart from re-configuring the operating system (CentOS) this could also be mitigated by lowering
max_files_per_process.

I wonder what performance implications that has on a server with around 50-100 active connections (through pgBouncer).

One of the reasons (we think) that Postgres needs that many file handles is the fact that the schema is quite large (in
termsof tables and indexes) and the sessions are touching many tables during their lifetime.
 

My understanding of the documentation is, that Postgres will work just fine if we lower the limit, it simply releases
thecached file handles if the limit is reached. But I have no idea how expensive opening a file handle is in Linux.
 

So assuming the sessions (and thus the queries) actually do need that many file handles, what kind of performance
impact(if any) is to be expected by lowering that value for Postgres to e.g. 500?
 

Regards
Thomas
  


pgsql-performance by date:

Previous
From: David Steele
Date:
Subject: Re: pgaudit and create postgis extension logs a lot inserts
Next
From: Magnus Hagander
Date:
Subject: Re: pgaudit and create postgis extension logs a lot inserts