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 D886E9DCC36 for ; Tue, 14 Mar 2006 16:32:54 -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 13586-01 for ; Tue, 14 Mar 2006 16:32:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 8A9419DCB4C for ; Tue, 14 Mar 2006 16:32:52 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id CDDC756431; Tue, 14 Mar 2006 14:32:53 -0600 (CST) Received: (hashcash-sendmail, from uid 1001); Tue, 14 Mar 2006 14:32:53 -0600 Date: Tue, 14 Mar 2006 14:32:53 -0600 From: "Jim C. Nasby" To: David Lang Cc: Joost Kraaijeveld , Richard Huxton , pgsql-performance@postgresql.org Subject: Re: x206-x225 Message-ID: <20060314203253.GT45250@pervasive.com> References: <441181C6.3040401@archonet.com> <1142063378.6634.13.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 6.0-RELEASE-p4 amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060314:david@lang.hm::YcFS+ZH6qRsk0DBA:00000oMg X-Hashcash: 1:20:060314:j.kraaijeveld@askesis.nl::PTaCQFHI0wTYKkVw:0000000000000 00000000000000000000000002D1 X-Hashcash: 1:20:060314:dev@archonet.com::I3txaL7EmcLS1Iuc:006+Z X-Hashcash: 1:20:060314:pgsql-performance@postgresql.org::bZQiAjJUsbkVJQ92:00000 0000000000000000000000000HcK X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.109 required=5 tests=[AWL=0.109] X-Spam-Score: 0.109 X-Spam-Level: X-Archive-Number: 200603/197 X-Sequence-Number: 17634 On Fri, Mar 10, 2006 at 11:57:16PM -0800, David Lang wrote: > On Sat, 11 Mar 2006, Joost Kraaijeveld wrote: > > >On Fri, 2006-03-10 at 13:40 +0000, Richard Huxton wrote: > >>Your ATA disk is lying about disk caching being turned off. Assuming > >>each insert is in a separate transaction, then it's not going to do > >>10,000 / 6 = 1667 transactions/sec - that's faster than it's rotational > >>speed. > >Could you explain the calculation? Why should the number of transactions > >be related to the rotational speed of the disk, without saying anything > >about the number of bytes per rotation? > > each transaction requires a sync to the disk, a sync requires a real > write (which you then wait for), so you can only do one transaction per > rotation. But shouldn't it be possible to batch up WAL writes and syncs? In other words, if you have 5 transactions that all COMMIT at exactly the same time, it should be possible to get all 5 WAL pages (I'll assume each one generated a small enough change so as not to require multiple WAL pages) to the drive before the platter comes around to the right position. The drive should then be able to write all 5 at once. At least, theoretically... -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461