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 833B7D1B45A; Fri, 12 Dec 2003 20:55:54 +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 92295-10; Fri, 12 Dec 2003 16:55:25 -0400 (AST) Received: from dbl.q-ag.de (dbl.q-ag.de [80.146.160.66]) by svr1.postgresql.org (Postfix) with ESMTP id 6555DD1D8B4; Fri, 12 Dec 2003 16:55:19 -0400 (AST) Received: from colorfullife.com (dbl [127.0.0.1]) by dbl.q-ag.de (8.12.3/8.12.3/Debian-6.6) with ESMTP id hBCKsYN9021076; Fri, 12 Dec 2003 21:54:36 +0100 Message-ID: <3FDA2B0A.1060709@colorfullife.com> Date: Fri, 12 Dec 2003 21:54:34 +0100 From: Manfred Spraul User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bruce Momjian Cc: Mark Kirkwood , pgsql-performance@postgresql.org, PostgreSQL-development Subject: Re: [HACKERS] fsync method checking References: <200312120649.hBC6nQR15608@candle.pha.pa.us> In-Reply-To: <200312120649.hBC6nQR15608@candle.pha.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200312/233 X-Sequence-Number: 5093 Bruce Momjian wrote: > write 0.000360 > write & fsync 0.001391 > write, close & fsync 0.001308 > open o_fsync, write 0.000924 > > That's 1 milliseconds vs. 1.3 milliseconds. Neither value is realistic - I guess the hw cache on and the os doesn't issue cache flush commands. Realistic values are probably 5 ms vs 5.3 ms - 6%, not 30%. How large is the syscall latency with BSD/OS 4.3? 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. -- Manfred