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 0F4F19DC8E1 for ; Wed, 15 Mar 2006 05:43:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 62246-09 for ; Wed, 15 Mar 2006 05:43:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by postgresql.org (Postfix) with ESMTP id 8E5F99DC891 for ; Wed, 15 Mar 2006 05:43:40 -0400 (AST) Received: from [213.162.97.75] (helo=mail.metronet.co.uk) by ptb-relay02.plus.net with esmtp (Exim) id 1FJSXI-0004YB-Qh; Wed, 15 Mar 2006 09:43:21 +0000 Received: from mainbox.archonet.com (unknown [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id 5F69E40DBCA; Wed, 15 Mar 2006 09:26:10 +0000 (GMT) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id BC3A915EA4; Wed, 15 Mar 2006 09:26:09 +0000 (GMT) Message-ID: <4417DDB1.8000308@archonet.com> Date: Wed, 15 Mar 2006 09:26:09 +0000 From: Richard Huxton User-Agent: Thunderbird 1.5 (X11/20051201) MIME-Version: 1.0 To: "Jim C. Nasby" Cc: David Lang , Joost Kraaijeveld , pgsql-performance@postgresql.org Subject: Re: x206-x225 References: <441181C6.3040401@archonet.com> <1142063378.6634.13.camel@localhost> <20060314203253.GT45250@pervasive.com> <4417379D.9020801@archonet.com> <20060314220817.GA45250@pervasive.com> In-Reply-To: <20060314220817.GA45250@pervasive.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.123 required=5 tests=[AWL=0.123] X-Spam-Score: 0.123 X-Spam-Level: X-Archive-Number: 200603/206 X-Sequence-Number: 17643 Jim C. Nasby wrote: >> I think you mean this... >> >> http://www.postgresql.org/docs/8.1/static/runtime-config-wal.html >> >> commit_delay (integer) > > No, that's not what I mean at all. On a system doing a large number of > WAL-generating transactions per second, it's certainly possible for > multiple transactions to commit in the period of time it takes for the > platter to rotate back into position to allow for writing of the WAL > data. What I don't know is if those multiple transactions would actually > make it to the platter on that rotation, or if they'd serialize, > resulting in one commit per revolution. I do know that there's no > theoretical reason that they couldn't, it's just a matter of putting > enough intelligence in the drive. > > Perhaps this is something that SCSI supports and (S)ATA doesn't, since > SCSI allows multiple transactions to be 'in flight' on the bus at once. SCSI Command queueing: http://www.storagereview.com/guide2000/ref/hdd/if/scsi/protCQR.html SATA "native command queuing": http://www.tomshardware.com/2004/11/16/can_command_queuing_turbo_charge_sata/ > But since you mention commit_delay, this does lead to an interesting > possible use: set it equal to the effective rotational period of the > drive. If you know your transaction load well enough, you could possibly > gain some benefit here. But of course a RAID controller with a BBU would > be a better bet... I suppose as long as you always have several transactions trying to commit, have a separate spindle(s) for the WAL then you could improve throughput at the cost of the shortest transaction times. Of course, it might be that the increase in lock duration etc. might outweigh any benefits. I'd suspect the cost/gain would be highly variable with changes in workload, and as you say write-cache+BBU seems more sensible. -- Richard Huxton Archonet Ltd