Re: BufFreelistLock

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Jim Nasby <jim(at)nasby(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BufFreelistLock
Date: 2010-12-10 16:39:51
Message-ID: 1291998960-sup-5081@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Excerpts from Jeff Janes's message of vie dic 10 12:24:34 -0300 2010:
> On Fri, Dec 10, 2010 at 5:45 AM, Alvaro Herrera
> <alvherre(at)commandprompt(dot)com> wrote:
> > Excerpts from Jim Nasby's message of jue dic 09 16:54:24 -0300 2010:

> >> To do that I think we'd want the bgwriter to target there being X number of buffers on the free list instead of (or in addition to) targeting how many dirty buffers need to be written. This would mirror what operating systems do; they strive to keep X number of pages on the free list so that when a process needs memory it can get it quickly.
> >
> > Isn't it what it does if you set bgwriter_lru_maxpages to some very
> > large value?
>
> As far as I can tell, bgwriter never adds things to the freelist.
> That is only done at start up, and when a relation or a database is
> dropped. The clock sweep does the vast majority of the work.

AFAIU bgwriter runs the clock sweep most of the time (BgBufferSync).

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitriy Igrishin 2010-12-10 16:46:44 Re: Fwd: Extended query protocol and exact types matches.
Previous Message Dimitri Fontaine 2010-12-10 16:35:45 Re: Extensions, patch v16