Re: Vacuum, Freeze and Analyze: the big picture

From: Andres Freund <andres(at)2ndquadrant(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Kevin Grittner <kgrittn(at)ymail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Ants Aasma <ants(at)cybertec(dot)at>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Josh Berkus <josh(at)agliodbs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Vacuum, Freeze and Analyze: the big picture
Date: 2013-06-04 00:04:59
Message-ID: 20130604000459.GB12323@alap2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2013-06-03 16:41:32 -0700, Peter Geoghegan wrote:
> On Mon, Jun 3, 2013 at 3:16 PM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:
> >> But it seems like the kernel is disposed to cache large amounts
> >> of dirty data for an unbounded period of time even if the I/O
> >> system is completely idle,
> >
> > It's not unbounded time. Last I heard, the default was 30 seconds.
>
> I'm pretty sure it is unbounded. The VM documentation is a bit vague
> on what dirty_expire_centisecs actually means, which is I presume
> where this number comes from. It says:
>
> "This tunable is used to define when dirty data is old enough to be eligible
> for writeout by the pdflush daemons. It is expressed in 100'ths of a second.
> Data which has been dirty in-memory for longer than this interval will be
> written out next time a pdflush daemon wakes up."
>
> So I think the a pdflush daemon won't necessarily wake up until
> dirty_background_bytes or dirty_background_ratio have been exceeded,
> regardless of this threshold. Am I mistaken?

Without having it checked again, afair it should wakeup every
dirty_writeback_centisecs which is something like 5seconds.

All that has pretty significantly changed - and imo improved! - in the
last year or so of kernel development. Unfortunately it will take a
while till we commonly see those kernels being used :(

Greetings,

Andres Freund

--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-06-04 00:19:24 Re: Vacuum, Freeze and Analyze: the big picture
Previous Message Craig Ringer 2013-06-03 23:45:19 Re: Vacuum, Freeze and Analyze: the big picture