pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Crawford <scrawford@pinpointresearch.com>
To: gjm@caledoncard.com
To: pgsql-admin@postgresql.org
Subject: Re: hanging for 30sec when checkpointing
Date: Thu, 12 Feb 2004 14:57:59 -0800
Message-ID: <200402121457.59468.scrawford@pinpointresearch.com> (raw)
In-Reply-To: <a806dcd9.0402110625.3190f48c@posting.google.com>
References: <40202216.4010608@shanewright.co.uk>
	<a806dcd9.0402110625.3190f48c@posting.google.com>

> > I'm running a reasonable sized (~30Gb) 7.3.4 database on Linux
> > and I'm getting some weird performance at times.
<snip>
> I am having a similar problem and this is what I've found so far:
>
> During the checkpoint the volume of data that's written isn't very
> high and it goes on for a fairly long time (up to 20 seconds) at a
> rate that appears to be well below our disk array's potential.  The
> volume of data written is usually 1-5 MB/sec on an array that we've
> tested to sustain over 50 MB/sec  (sequential writes, of course).
>
> It turns out that what's going on is that the command queue for the
> RAID array (3Ware RAID card) is filling up during the checkpoint
> and is staying at the max (254 commands) for most of the
> checkpoint.  The odd lucky insert appears to work, but is extremely
> slow.  In our case, the WAL files are on the same array as the data
> files, so everything grinds to a halt.

I spoke with some 3Ware reps at a trade show and they recommended 
adding the following to /etc/sysctl.conf:
vm.max-readahead = 256
vm.min-readahead = 128

These settings take effect at boot. To change on a running system:
echo 256 > /proc/sys/vm/max-readahead
echo 128 > /proc/sys/vm/min-readahead

This advice was specific to the 3Ware card on Linux.

Cheers,
Steve




view thread (33+ messages)  latest in thread

Message-ID: <200402121457.59468.scrawford@pinpointresearch.com>
Permalink:  ../200402121457.59468.scrawford@pinpointresearch.com/
Also on:    postgresql.org/message-id/200402121457.59468.scrawford@pinpointresearch.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: scrawford@pinpointresearch.com, gjm@caledoncard.com
  Subject: Re: hanging for 30sec when checkpointing
  In-Reply-To: <200402121457.59468.scrawford@pinpointresearch.com>
  References: <40202216.4010608@shanewright.co.uk> <a806dcd9.0402110625.3190f48c@posting.google.com> <200402121457.59468.scrawford@pinpointresearch.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox