X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id BBF6BD1B45A; Fri, 12 Dec 2003 21:29:34 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 98506-02; Fri, 12 Dec 2003 17:29:04 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 8CDDBD1B460; Fri, 12 Dec 2003 17:29:02 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id hBCLSl19022122; Fri, 12 Dec 2003 16:28:47 -0500 (EST) To: Manfred Spraul Cc: Bruce Momjian , Mark Kirkwood , pgsql-performance@postgresql.org, PostgreSQL-development Subject: Re: [HACKERS] fsync method checking In-reply-to: <3FDA2B0A.1060709@colorfullife.com> References: <200312120649.hBC6nQR15608@candle.pha.pa.us> <3FDA2B0A.1060709@colorfullife.com> Comments: In-reply-to Manfred Spraul message dated "Fri, 12 Dec 2003 21:54:34 +0100" Date: Fri, 12 Dec 2003 16:28:47 -0500 Message-ID: <22121.1071264527@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/206 X-Sequence-Number: 5066 Manfred Spraul writes: > One advantage of a seperate write and fsync call is better performance > for the writes that are triggered within AdvanceXLInsertBuffer: I'm not > sure how often that's necessary, but it's a write while holding both the > WALWriteLock and WALInsertLock. If every write contains an implicit > sync, that call would be much more expensive than necessary. Ideally that path isn't taken very often. But I'm currently having a discussion off-list with a CMU student who seems to be seeing a case where it happens a lot. (She reports that both WALWriteLock and WALInsertLock are causes of a lot of process blockages, which seems to mean that a lot of the WAL I/O is being done with both held, which would have to mean that AdvanceXLInsertBuffer is doing the I/O. More when we figure out what's going on exactly...) regards, tom lane