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 3ACF211F6228 for ; Fri, 28 Apr 2006 02:58:23 -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 41021-08-3 for ; Fri, 28 Apr 2006 02:58:12 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ns2.nec.com.au (ns2.nec.com.au [147.76.180.2]) by postgresql.org (Postfix) with ESMTP id 1EB7E11F6232 for ; Fri, 28 Apr 2006 02:58:10 -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 30619-01-35 for ; Fri, 28 Apr 2006 15:58:09 +1000 (EST) Received: from smtp1.nec.com.au (unknown [172.31.8.18]) by ns2.nec.com.au (Postfix) with ESMTP id 8FACA3B7A4 for ; Fri, 28 Apr 2006 15:58:09 +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 k3S5w7uP027789; Fri, 28 Apr 2006 15:58:08 +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 15:58:06 +1000 Message-ID: <004901c66a88$b909edd0$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: <25291.1146200208@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200604/663 X-Sequence-Number: 18747 Hi, Tom Many thanks for quick replies and that helps a lot. Just in case, anyone out there can recommend a good but cost effective battery-backed write cache SCSI for Solaris SPARC platform? How well does it work with UFS or newer ZFS for solaris? Cheers and regards, Guoping -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: 2006Äê4ÔÂ28ÈÕ 14:57 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: > 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. Yup. > c) wal_sync_method is set to 'open_datasync', which is fastest among the > four, right? Well, is it? You shouldn't assume that without testing. > Looks like, if we have to set fsync be true, we need to modify our > application. Yes, you should definitely look into batching your operations into larger transactions. On normal hardware you can't expect to commit transactions faster than one per disk revolution (unless they're coming from multiple clients, where there's a hope of ganging several parallel commits per revolution). Or buy a disk controller with battery-backed write cache and put your faith in that cache surviving a machine crash. But don't turn off fsync if you care about your data. regards, tom lane