X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 3DC5811F6668 for ; Mon, 3 Apr 2006 23:11:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52208-03-2 for ; Mon, 3 Apr 2006 23:10:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from linda-5.paradise.net.nz (bm-5a.paradise.net.nz [203.96.152.184]) by postgresql.org (Postfix) with ESMTP id 75A8D11F665E for ; Mon, 3 Apr 2006 23:10:55 -0300 (ADT) Received: from smtp-2.paradise.net.nz (tclsnelb1-src-1.paradise.net.nz [203.96.152.172]) by linda-5.paradise.net.nz (Paradise.net.nz) with ESMTP id <0IX600FBWE1K14@linda-5.paradise.net.nz> for pgsql-performance@postgresql.org; Tue, 04 Apr 2006 14:10:32 +1200 (NZST) Received: from [192.168.1.11] (218-101-29-132.dsl.clear.net.nz [218.101.29.132]) by smtp-2.paradise.net.nz (Postfix) with ESMTP id 719AD15812AA; Tue, 04 Apr 2006 14:10:32 +1200 (NZST) Date: Tue, 04 Apr 2006 14:10:25 +1200 From: Mark Kirkwood Subject: Re: freebsd/softupdates for data dir In-reply-to: <4431C4B4.4090300@123.com.sv> To: Miguel Cc: pgsql-performance@postgresql.org Message-id: <4431D591.30500@paradise.net.nz> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 1.0.6 (X11/20051106) References: <4431C4B4.4090300@123.com.sv> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.168 required=5 tests=[AWL=0.168] X-Spam-Score: 0.168 X-Spam-Level: X-Archive-Number: 200604/39 X-Sequence-Number: 18123 Miguel wrote: > Hi, reading the archives i cant find a clear answer about softupdates in > freebsd, is it recommended to enable it for the data directory? > There is a pretty good article about softupdates and journelling here: http://www.usenix.org/publications/library/proceedings/usenix2000/general/full_papers/seltzer/seltzer_html/index.html and in the freebsd docs here: http://www.freebsd.org/doc/handbook/configtuning-disk.html Postgres does not do a lot of file meta-data operations (unless you do a *lot* of CREATE/DROP INDEX/TABLE/DATABASE), so the performance gains associated with softupdates will probably be minimal. I've always left them on, and never had any issues...(even after unscheduled power loss - which happened here yesterday). As I understand it, the softupdate code reorders *metadata* operations, and does not alter data operations - so the effect of fysnc(2) on a preexisting file is not changed by softupdates being on or off. Cheers Mark