X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 87C4011F6474 for ; Fri, 28 Apr 2006 01:43:43 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 25881-05 for ; Fri, 28 Apr 2006 01:43:32 -0300 (ADT) X-Greylist: delayed 22:12:02.081086 by SQLgrey- Received: from ns2.nec.com.au (ns2.nec.com.au [147.76.180.2]) by postgresql.org (Postfix) with ESMTP id A9DE111F6483 for ; Fri, 28 Apr 2006 01:43:31 -0300 (ADT) Received: from ns2.nec.com.au ([127.0.0.1]) by localhost (ns2.nec.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30409-01-21 for ; Fri, 28 Apr 2006 14:43:28 +1000 (EST) Received: from smtp1.nec.com.au (unknown [172.31.8.18]) by ns2.nec.com.au (Postfix) with ESMTP id C74193B6B4 for ; Fri, 28 Apr 2006 14:43:28 +1000 (EST) Received: from eddy (eddy.ssd.neca.nec.com.au [147.76.48.116]) by warp.ssd.neca.nec.com.au (8.12.10+Sun/8.12.10) with SMTP id k3S4hRuP026162; Fri, 28 Apr 2006 14:43:27 +1000 (EST) Reply-To: From: "Guoping Zhang" To: "'Tom Lane'" Cc: , "'Guoping Zhang (E-mail)'" Subject: Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql Date: Fri, 28 Apr 2006 14:43:26 +1000 Message-ID: <004101c66a7e$4ab95000$74304c93@eddy> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: <11093.1146149608@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/658 X-Sequence-Number: 18742 Hi, Tom, Thanks for the reply. a) The tests consists of ten thousands very small transactions, which are not grouped, that is why so slow with compare to set fsync off. b) we are using Solaris 10 on a SUN Fire 240 SPARC machine with a latest postgresql release (8.1.3) c) wal_sync_method is set to 'open_datasync', which is fastest among the four, right? d) wal_buffers set to 32 Looks like, if we have to set fsync be true, we need to modify our application. Thanks and regards, Guoping -----Original Message----- From: pgsql-performance-owner@postgresql.org [mailto:pgsql-performance-owner@postgresql.org]On Behalf Of Tom Lane Sent: 2006Äê4ÔÂ28ÈÕ 0:53 To: guoping.zhang@nec.com.au Cc: pgsql-performance@postgresql.org; Guoping Zhang (E-mail) Subject: Re: [PERFORM] how unsafe (or worst scenarios) when setting fsync OFF for postgresql "Guoping Zhang" writes: > Our application has a strict speed requirement for DB operation. Our tests > show that it takes about 10secs for the operation when setting fsync off, > but takes about 70 seconds when setting fsync ON (with other WAL related > parametered tuned). I can't believe that a properly tuned application would have an fsync penalty that large. Are you performing that "operation" as several thousand small transactions, or some such? Try grouping the operations into one (or at most a few) transactions. Also, what wal_buffers and wal_sync_method settings are you using, and have you experimented with alternatives? What sort of platform is this on? What PG version? regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend