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 12D4911F61DE for ; Thu, 27 Apr 2006 11:53:46 -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 41270-01 for ; Thu, 27 Apr 2006 11:53:35 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 461A111F60BF for ; Thu, 27 Apr 2006 11:53:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k3RErS4r011094; Thu, 27 Apr 2006 10:53:28 -0400 (EDT) To: guoping.zhang@nec.com.au cc: pgsql-performance@postgresql.org, "Guoping Zhang (E-mail)" Subject: Re: how unsafe (or worst scenarios) when setting fsync OFF for postgresql In-reply-to: <003b01c669c4$34bbd7b0$74304c93@eddy> References: <003b01c669c4$34bbd7b0$74304c93@eddy> Comments: In-reply-to "Guoping Zhang" message dated "Thu, 27 Apr 2006 16:31:23 +1000" Date: Thu, 27 Apr 2006 10:53:28 -0400 Message-ID: <11093.1146149608@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/645 X-Sequence-Number: 18729 "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