Re: open pgsql files (was Re: [GENERAL] Mime-Version: 1.0)

From: Ed Loehr <eloehr(at)austin(dot)rr(dot)com>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Serge Sozonoff <serge(at)globalbeach(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: open pgsql files (was Re: [GENERAL] Mime-Version: 1.0)
Date: 2000-02-28 15:52:26
Message-ID: 38BA99BA.645FA078@austin.rr.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bruce Momjian wrote:
>
> > > If I have 40 tables and each table is made up of 6-7 files including
> > > index's etc then that
> > > means that per process I could be opening up to 200-240 !!
> > >
> > > This means that with 64 db connections I could be hitting 12800-15360 open
> > > files
> > > on my system!!! What is the current Linux limit without kernel re-compile?
> > > What is the Linux
> > > limit with kernel re-compile?
> > >
> > > Why can't I just tell postgres to close thos files say 2 minutes after he
> > > is done with them
> > > and they have been idle?
> >
> > Take a look at /pg/backend/storage/file/fd.c::pg_nofile(). If you
> > change the line:
>
> This actually brings up a good point. We currently cache all
> descriptors up to the limit the OS will allow for a process.
>
> Is this too aggressive? Should we limit it to 50% of the maximum?

Seems difficulty to guess correctly on one setting for all. How
difficult would it be to make the limit configurable so that folks
could set it as a hard limit (eg. 100 open files per backend or 1000
per server) or a percentage of OS max? SET would seem most convenient
from a user point of view, but even something for configure would be
very useful in managing resources.

Cheers,
Ed Loehr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ross J. Reedstrom 2000-02-28 15:59:40 Re: RES: [GENERAL] Stored procedures returning multiple values... ?
Previous Message Chris Bitmead 2000-02-28 14:58:33 Re: [GENERAL] limit select question