Re: Changing the default configuration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, scott(dot)marlowe(at)ihs(dot)com, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Changing the default configuration
Date: 2003-02-12 16:48:57
Message-ID: 5061.1045068537@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-hackers pgsql-performance

Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
> Had this happen at a previous employer, and it definitely is bad. I
> believe we had to do a reboot to clear it up. And we saw the problem a
> couple of times since the sys admin wasn't able to deduce what had
> happened the first time we got it. IIRC the problem hit somewhere around
> 150 connections, so we ran with 128 max. I think this is a safe number
> on most servers these days (running linux as least) though out of the
> box I might be more inclined to limit it to 64. If you do hit a file
> descriptor problem, *you are hosed*.

If you want to run lots of connections, it's a real good idea to set
max_files_per_process to positively ensure Postgres won't overflow
your kernel file table, ie, max_connections * max_files_per_process
should be less than the file table size.

Before about 7.2, we didn't have max_files_per_process, and would
naively believe whatever sysconf() told us was an okay number of files
to open. Unfortunately, way too many kernels promise more than they
can deliver ...

regards, tom lane

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message scott.marlowe 2003-02-12 18:26:49 Re: Changing the default configuration (was Re:
Previous Message Rod Taylor 2003-02-12 16:43:15 Re: [HACKERS] Changing the default configuration (was Re:

Browse pgsql-hackers by date

  From Date Subject
Next Message Teodor Sigaev 2003-02-12 17:01:01 Re: Q about InsertIndexResult
Previous Message Andrew Sullivan 2003-02-12 16:45:27 Re: Changing the default configuration (was Re:

Browse pgsql-performance by date

  From Date Subject
Next Message scott.marlowe 2003-02-12 18:26:49 Re: Changing the default configuration (was Re:
Previous Message Rod Taylor 2003-02-12 16:43:15 Re: [HACKERS] Changing the default configuration (was Re: