pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <gsmith@gregsmith.com>
To: Stef Telford <stef@ummon.com>
Cc: Mark Kirkwood <markir@paradise.net.nz>
Cc: Scott Carey <scott@richrelevance.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Raid 10 chunksize
Date: Wed, 1 Apr 2009 12:08:15 -0400 (EDT)
Message-ID: <alpine.GSO.2.01.0904011144270.23835@westnet.com> (raw)
In-Reply-To: <49D37CAA.6080100@ummon.com>
References: <C5F14970.3CA1%scott@richrelevance.com>
	<49D31E85.8050405@paradise.net.nz>
	<49D37CAA.6080100@ummon.com>

On Wed, 1 Apr 2009, Stef Telford wrote:

> I have -explicitly- enabled sync in the conf...In fact, if I turn -off- 
> sync commit, it gets about 200 -slower- rather than faster.

You should take a look at 
http://www.postgresql.org/docs/8.3/static/wal-reliability.html

And check the output from "hdparm -I" as suggested there.  If turning off 
fsync doesn't improve your performance, there's almost certainly something 
wrong with your setup.  As suggested before, your drives probably have 
write caching turned on.  PostgreSQL is incapable of knowing that, and 
will happily write in an unsafe manner even if the fsync parameter is 
turned on.  There's a bunch more information on this topic at 
http://www.westnet.com/~gsmith/content/postgresql/TuningPGWAL.htm

Also:  a run to run variation in pgbench results of +/-10% TPS is normal, 
so unless you saw a consistent 200 TPS gain during multiple tests my guess 
is that changing fsync for you is doing nothing, rather than you 
suggestion that it makes things slower.

> Curiously, I think with SSD's there may have to be an 'off' flag
> if you put the xlog onto an ssd. It seems to complain about 'too
> frequent checkpoints'.

You just need to increase checkpoint_segments from the tiny default if you 
want to push any reasonable numbers of transactions/second through pgbench 
without seeing this warning.  Same thing happens with any high-performance 
disk setup, it's not specific to SSDs.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD



view thread (59+ messages)  latest in thread

Message-ID: <alpine.GSO.2.01.0904011144270.23835@westnet.com>
Permalink:  ../alpine.GSO.2.01.0904011144270.23835@westnet.com/
Also on:    postgresql.org/message-id/alpine.GSO.2.01.0904011144270.23835@westnet.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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsmith@gregsmith.com, stef@ummon.com, markir@paradise.net.nz, scott@richrelevance.com
  Subject: Re: Raid 10 chunksize
  In-Reply-To: <alpine.GSO.2.01.0904011144270.23835@westnet.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