Re: PANIC caused by open_sync on Linux - Mailing list pgsql-hackers

From Greg Smith
Subject Re: PANIC caused by open_sync on Linux
Date
Msg-id Pine.GSO.4.64.0710260037540.18630@westnet.com
Whole thread Raw
In response to PANIC caused by open_sync on Linux  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: PANIC caused by open_sync on Linux
List 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@gregsmith.com http://www.gregsmith.com Baltimore, MD


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: PANIC caused by open_sync on Linux
Next
From: Magnus Hagander
Date:
Subject: Re: 8.3 GSS Issues