max_files_per_processes vs others uses of file descriptors

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: max_files_per_processes vs others uses of file descriptors
Date: 2017-08-07 20:40:33
Message-ID: 20170807204033.h46pz5d26eeyjxog@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

currently the default max_files_per_process is 1000. fd.c uses close to
that many (- NUM_RESERVED_FDS/10). count_usable_fds() makes sure that at
server start there's at most that many fds available, but that doesn't
mean that much for runtime.

These days there's a number of other consumers of
fds. E.g. postgres_fdw, epoll, ... All these aren't accounted for by
fd.c.

Given how close max_files_per_process is to the default linux limit of
1024 fds, I wonder if we shouldn't increase NUM_RESERVED_FDS by quite a
bit?

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-08-07 20:52:42 Re: max_files_per_processes vs others uses of file descriptors
Previous Message Andrew Dunstan 2017-08-07 20:32:22 Re: pgsql: Record full paths of programs sought by "configure".