Re: Checkpoint Tuning Question

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Dan Armbrust <daniel(dot)armbrust(dot)list(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Checkpoint Tuning Question
Date: 2009-07-14 08:26:30
Message-ID: 1247559990.11347.1258.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Mon, 2009-07-13 at 15:53 -0500, Dan Armbrust wrote:
> > So this thought leads to a couple of other things Dan could test.
> > First, see if turning off full_page_writes makes the hiccup go away.
> > If so, we know the problem is in this area (though still not exactly
> > which reason); if not we need another idea. That's not a good permanent
> > fix though, since it reduces crash safety. The other knobs to
> > experiment with are synchronous_commit and wal_sync_method. If the
> > stalls are due to commits waiting for additional xlog to get written,
> > then async commit should stop them. I'm not sure if changing
> > wal_sync_method can help, but it'd be worth experimenting with.
> >

> All of my testing to date has been done with synchronous_commit=off
>
> I just tried setting full_page_writes=off - and like magic, the entire
> hiccup went away.

OK, that seems clear.

I mistakenly referred to the CRC calculation happening while the lock
was held, which confused the discussion. The lock *is* held for longer
when we have backup blocks and the lock does need to be acquired twice
immediately after a checkpoint.

Neither of the above two effects appear, on their own, sufficient to
explain the delay. We should conjecture that a traffic jam exists and go
looking for it.

Propose a DTrace probe immediately after the "goto begin" at line 740 of
xlog.c, so we can start tracing from the first backend following
checkpoint, and turn off tracing when all backends have completed a
transaction.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2009-07-14 09:36:57 Re: Best practices for moving UTF8 databases
Previous Message Craig Ringer 2009-07-14 06:01:49 Re: How can I find out the space used on disk for a table/index