Re: Advice configuring ServeRAID 8k for performance

From: Greg Smith <greg(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Scott Carey <scott(at)richrelevance(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Kenneth Cox <kenstir(at)gmail(dot)com>, "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Advice configuring ServeRAID 8k for performance
Date: 2010-08-17 08:29:10
Message-ID: 4C6A4856.2050103@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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(at)2ndQuadrant(dot)com www.2ndQuadrant.us

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2010-08-17 08:42:25 Re: Advice configuring ServeRAID 8k for performance
Previous Message fiala_marek 2010-08-17 07:26:19 Search query is curious