X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF56832A1BF for ; Sat, 9 Oct 2004 22:01:13 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 55961-09 for ; Sat, 9 Oct 2004 21:01:04 +0000 (GMT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by svr1.postgresql.org (Postfix) with ESMTP id 4330032A143 for ; Sat, 9 Oct 2004 22:01:03 +0100 (BST) Received: from sysexperts.com (c-24-6-183-218.client.comcast.net[24.6.183.218]) by comcast.net (rwcrmhc11) with ESMTP id <2004100921010201300c3se8e>; Sat, 9 Oct 2004 21:01:02 +0000 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by filer with local; Sat, 09 Oct 2004 14:01:02 -0700 id 000064D1.4168518E.0000554D Date: Sat, 9 Oct 2004 14:01:02 -0700 From: Kevin Brown To: pgsql-performance@postgresql.org Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ... Message-ID: <20041009210102.GC665@filer> Mail-Followup-To: Kevin Brown , pgsql-performance@postgresql.org References: <200410081443.16109.josh@agliodbs.com> <20041009112048.GA665@filer> <27696.1097334448@sss.pgh.pa.us> <20041009203710.GB665@filer> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20041009203710.GB665@filer> Organization: Frobozzco International User-Agent: Mutt/1.5.6+20040818i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/123 X-Sequence-Number: 8599 I wrote: > That said, if it's typical for many changes to made to a page > internally before PG needs to commit that page to disk, then your > argument makes sense, and that's especially true if we simply cannot > have the page written to disk in a partially-modified state (something > I can easily see being an issue for the WAL -- would the same hold > true of the index/data files?). Also, even if multiple changes would be made to the page, with the page being valid for a disk write only after all such changes are made, the use of mmap() (in conjunction with an internal buffer that would then be copied to the mmap()ed memory space at the appropriate time) would potentially save a system call over the use of write() (even if write() were used to write out multiple pages). However, there is so much lower-hanging fruit than this that an mmap() implementation almost certainly isn't worth pursuing for this alone. So: it seems to me that mmap() is worth pursuing only if most internal buffers tend to be written to only once or if it's acceptable for a partially modified data/index page to be written to disk (which I suppose could be true for data/index pages in the face of a rock-solid WAL). -- Kevin Brown kevin@sysexperts.com