Unix Technical Forum

7.4 Checkpoint Question

This is a discussion on 7.4 Checkpoint Question within the Pgsql Performance forums, part of the PostgreSQL category; --> I have a legacy system still on 7.4 (I know, I know...the upgrade is coming soon). I have a ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Performance

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 11:42 AM
Brad Nicholson
 
Posts: n/a
Default 7.4 Checkpoint Question

I have a legacy system still on 7.4 (I know, I know...the upgrade is
coming soon).

I have a fairly big spike happening once a day, every day, at the same
time. It happens during a checkpoint, no surprise there. I know the
solution to the problem (upgrade to a modern version), but what I'm
looking for as an explanation as to why one particular checkpoint would
be so bad on a low volume system, so I can appease certain management
concerns.

This is a _really _low volume system, less than 500 writes/hour. Normal
operation sees checkpoint related spikes of around 200-300 milliseconds.
We always checkpoint at the checkpoint timeout (every 5 minutes).
During this one checkpoint, I'm seeing transactions running 2-3 seconds.
During this time, writes are < 5/minute.

Relevant settings:
shared_buffers = 10000

checkpoint_segments = 30
checkpoint_timeout = 300

What gives?

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 11:42 AM
Andrew Sullivan
 
Posts: n/a
Default Re: 7.4 Checkpoint Question

On Thu, Nov 29, 2007 at 10:10:54AM -0500, Brad Nicholson wrote:
> This is a _really _low volume system, less than 500 writes/hour. Normal
> operation sees checkpoint related spikes of around 200-300 milliseconds.
> We always checkpoint at the checkpoint timeout (every 5 minutes).
> During this one checkpoint, I'm seeing transactions running 2-3 seconds.
> During this time, writes are < 5/minute.


> What gives?


pg_dump? Remember that it has special locks approximately equivalent
(actually eq? I forget) with SERIALIZABLE mode, which makes things rather
different.

A

--
Andrew Sullivan
Old sigs will return after re-constitution of blue smoke

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-19-2008, 11:42 AM
Simon Riggs
 
Posts: n/a
Default Re: 7.4 Checkpoint Question

On Thu, 2007-11-29 at 10:10 -0500, Brad Nicholson wrote:
> I have a legacy system still on 7.4 (I know, I know...the upgrade is
> coming soon).
>
> I have a fairly big spike happening once a day, every day, at the same
> time. It happens during a checkpoint, no surprise there. I know the
> solution to the problem (upgrade to a modern version), but what I'm
> looking for as an explanation as to why one particular checkpoint would
> be so bad on a low volume system, so I can appease certain management
> concerns.
>
> This is a _really _low volume system, less than 500 writes/hour. Normal
> operation sees checkpoint related spikes of around 200-300 milliseconds.
> We always checkpoint at the checkpoint timeout (every 5 minutes).
> During this one checkpoint, I'm seeing transactions running 2-3 seconds.
> During this time, writes are < 5/minute.
>
> Relevant settings:
> shared_buffers = 10000
>
> checkpoint_segments = 30
> checkpoint_timeout = 300
>
> What gives?


If the timing is regular, its most likely a human-initiated action
rather then a behavioural characteristic.

VACUUM runs in background at that time, updates loads of blocks which
need to be written out at checkpoint time. That slows queries down at
that time but not others.

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-19-2008, 11:42 AM
Brad Nicholson
 
Posts: n/a
Default Re: 7.4 Checkpoint Question


On Thu, 2007-11-29 at 16:14 +0000, Simon Riggs wrote:
> On Thu, 2007-11-29 at 10:10 -0500, Brad Nicholson wrote:
> > I have a legacy system still on 7.4 (I know, I know...the upgrade is
> > coming soon).
> >
> > I have a fairly big spike happening once a day, every day, at the same
> > time. It happens during a checkpoint, no surprise there. I know the
> > solution to the problem (upgrade to a modern version), but what I'm
> > looking for as an explanation as to why one particular checkpoint would
> > be so bad on a low volume system, so I can appease certain management
> > concerns.
> >
> > This is a _really _low volume system, less than 500 writes/hour. Normal
> > operation sees checkpoint related spikes of around 200-300 milliseconds.
> > We always checkpoint at the checkpoint timeout (every 5 minutes).
> > During this one checkpoint, I'm seeing transactions running 2-3 seconds.
> > During this time, writes are < 5/minute.
> >
> > Relevant settings:
> > shared_buffers = 10000
> >
> > checkpoint_segments = 30
> > checkpoint_timeout = 300
> >
> > What gives?

>
> If the timing is regular, its most likely a human-initiated action
> rather then a behavioural characteristic.
>
> VACUUM runs in background at that time, updates loads of blocks which
> need to be written out at checkpoint time. That slows queries down at
> that time but not others.


Bingo. Big vacuum daily vacuum completes shortly before this chckpoint.

Thanks.

--
Brad Nicholson 416-673-4106
Database Administrator, Afilias Canada Corp.



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:31 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com