pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Smith <greg@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Scott Carey <scott@richrelevance.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Kenneth Cox <kenstir@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: Advice configuring ServeRAID 8k for performance
Date: Tue, 17 Aug 2010 04:29:10 -0400
Message-ID: <4C6A4856.2050103@2ndquadrant.com> (raw)
In-Reply-To: <20100816210552.GC3911@anarazel.de>
References: <201008131817.o7DIH1b03550@momjian.us>
	<4C6591D9.1080206@2ndquadrant.com>
	<5687A8AD-CA70-4272-A32C-6AE5F491CEA4@richrelevance.com>
	<4C69796D.9000408@2ndquadrant.com>
	<20100816200227.GA3911@anarazel.de>
	<4C699BE2.50606@2ndquadrant.com>
	<20100816201838.GB3911@anarazel.de>
	<4C69A57B.80605@2ndquadrant.com>
	<20100816210552.GC3911@anarazel.de>

Andres Freund wrote:
> An fsync() equals a barrier so it has the effect of stopping
> reordering around it - especially on systems with larger multi-disk
> arrays thats pretty expensive.
> You can achieve surprising speedups, at least in my experience, by
> forcing the kernel to start writing out pages *without enforcing
> barriers* first and then later enforce a barrier to be sure its
> actually written out.

Standard practice on high performance systems with good filesystems and 
a battery-backed controller is to turn off barriers anyway.  That's one 
of the first things to tune on XFS for example, when you have a reliable 
controller.  I don't have enough data on ext4 to comment on tuning for 
it yet.

The sole purpose for the whole Linux write barrier implementation in my 
world is to flush the drive's cache, when the database does writes onto 
cheap SATA drives that will otherwise cache dangerously.  Barriers don't 
have any place on a serious system that I can see.  The battery-backed 
RAID controller you have to use to make fsync calls fast anyway can do 
some simple write reordering, but the operating system doesn't ever have 
enough visibility into what it's doing to make intelligent decisions 
about that anyway. 

-- 
Greg Smith  2ndQuadrant US  Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com   www.2ndQuadrant.us




view thread (33+ messages)  latest in thread

Message-ID: <4C6A4856.2050103@2ndquadrant.com>
Permalink:  ../4C6A4856.2050103@2ndquadrant.com/
Also on:    postgresql.org/message-id/4C6A4856.2050103@2ndquadrant.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: greg@2ndquadrant.com, andres@anarazel.de, scott@richrelevance.com, bruce@momjian.us, kenstir@gmail.com
  Subject: Re: Advice configuring ServeRAID 8k for performance
  In-Reply-To: <4C6A4856.2050103@2ndquadrant.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