Re: PANIC caused by open_sync on Linux

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PANIC caused by open_sync on Linux
Date: 2007-10-26 05:19:35
Message-ID: Pine.GSO.4.64.0710260037540.18630@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 26 Oct 2007, ITAGAKI Takahiro wrote:

> My nearby Linux guy says mixed usage of buffered I/O and direct I/O
> could cause errors (EIO) on many version of Linux kernels.

I'd be curious to get some more information about this--specifically which
versions have the problems. I'd heard about some weird bugs in the sync
write code in versions between RHEL 4 (2.6.9) and 5 (2.6.18), but I wasn't
aware of anything wrong with those two stable ones in this area. I have a
RHEL 5 system here, will see if I can replicate this EIO error.

> Mixed usage of buffered and direct i/o is legal, but enforces complexity
> to kernels. If we simplify it, things would be more relaxed. For
> example, dropping zero-filling and only use direct i/o. Is it possible?

It's possible, but performance suffers considerably. I played around with
this at one point when looking into doing all database writes as sync
writes. Having to wait until the entire 16MB WAL segment made its way to
disk before more WAL could be written can cause a nasty pause in activity,
even with direct I/O sync writes. Even the current buffered zero-filled
write of that size can be a bit of a drag on performance for the clients
that get caught behind it, making it any sort of sync write will be far
worse.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2007-10-26 07:56:03 Re: 8.3 GSS Issues
Previous Message ITAGAKI Takahiro 2007-10-26 04:21:56 PANIC caused by open_sync on Linux