Re: PG8 Tuning

From: Michael Stone <mstone+postgres(at)mathom(dot)us>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: PG8 Tuning
Date: 2005-08-11 23:54:44
Message-ID: 20050811235444.GO19080@mathom.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Michael Stone 2005-08-12 00:30:31 Re: Mostly read performance
Previous Message John A Meinel 2005-08-11 23:30:28 Re: Odd Locking Problem