From: Michael Stone <mstone+postgres@mathom.us>
To: pgsql-performance@postgresql.org
Subject: Re: PG8 Tuning
Date: Thu, 11 Aug 2005 19:54:44 -0400
Message-ID: <20050811235444.GO19080@mathom.us> (raw)
In-Reply-To: <1123780724.14573.108.camel@archimedes>
References: <1536.217.45.209.171.1123763001.squirrel@www.gradwell.com>
<1123836428.19976.26.camel@amd64-laptop-spoe>
<1123780724.14573.108.camel@archimedes>
On Thu, Aug 11, 2005 at 10:18:44AM -0700, Mark Lewis wrote:
>Actually, it seems to me that with the addition of the WAL in PostgreSQL
>and the subsequent decreased need to fsync the data files themselves
>(only during checkpoints?), that the only time a battery-backed write
>cache would make a really large performance difference would be on the
>drive(s) hosting the WAL.
Write cache on a raid array helps in the general case too, because
it allows the controller to aggregate & reorder write requests. The OS
probably tries to do this to some degree, but it can't do as well as the
raid controller because it doesn't know the physical disk layout.
>Hmmm, on second thought, now I think I understand the rationale behind
>having a non-zero commit delay setting-- the problem with putting
>pg_xlog on a single disk without a write cache is that frequent fsync()
>calls might cause it to spend most of its time seeking instead of
>writing (as seems to be happening to Paul here). Then again, the OS IO
>scheduler should take care of this for you, making this a non-issue.
The OS can't do anything much in terms of IO scheduling for synchronous
writes. Either it handles them in suboptimal order or you get hideous
latency while requests are queued for reordering. Neither option is
really great.
Mike Stone
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: mstone+postgres@mathom.us
Subject: Re: PG8 Tuning
In-Reply-To: <20050811235444.GO19080@mathom.us>
* 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