Re: Remove the limit on the number of entries allowed in

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Remove the limit on the number of entries allowed in
Date: 2006-06-15 17:20:31
Message-ID: 1150392031.2587.10.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, 2006-06-15 at 17:50 +0800, Qingqing Zhou wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> wrote
> >
> > Can we do the same for the file descriptors in fd.c?
> >
> > Very often the total number of file descriptors is much less than the
> > maximum, so it would make sense to only maintain the LRU when we are
> > using more than 50%-75% of the maximum.
> >
>
> I am not against doing it but AFAIR the LRU file operations is

> (1) not frequent;

The LRU moves each time we do FileRead or FileWrite, not just on
open/close operations.

> (2) the cost is only several CPU circles if we do not run out of
> fds;

So its not really likely ever to show high on oprofile, but if its an
avoidable operation that isn't always needed, why do it?

> (3) the LRU lseek/close/open big cost is still not avoidable when we
> really run out of fds.

Agreed, but the limit is reasonably high, so this isn't anywhere near
being something we always hit otherwise we would be more worried.

--
Simon Riggs
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2006-06-15 17:38:26 pgsql: Move list of supported to_ascii() encodings from footnote to main
Previous Message Bruce Momjian 2006-06-15 17:17:41 pgsql: Add: > > o Fix memory leak from exceptions > >

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2006-06-15 17:49:05 Re: Re-thing PG_MODULE_MAGIC
Previous Message Josh Berkus 2006-06-15 17:18:26 Re: Re-thing PG_MODULE_MAGIC