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 3FE72EAE58B for ; Sat, 23 Oct 2004 19:10:34 +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 11768-05 for ; Sat, 23 Oct 2004 18:10:43 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 59C6FEAE582 for ; Sat, 23 Oct 2004 19:10:29 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9NIB4Fc026468; Sat, 23 Oct 2004 14:11:04 -0400 (EDT) To: Curt Sampson Cc: Kevin Brown , pgsql-performance@postgresql.org Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ... In-reply-to: References: <200410081443.16109.josh@agliodbs.com> <20041009112048.GA665@filer> <27696.1097334448@sss.pgh.pa.us> <20041009203710.GB665@filer> <4859.1097363137@sss.pgh.pa.us> Comments: In-reply-to Curt Sampson message dated "Sat, 23 Oct 2004 16:33:40 +0900" Date: Sat, 23 Oct 2004 14:11:04 -0400 Message-ID: <26467.1098555064@sss.pgh.pa.us> From: Tom Lane 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/388 X-Sequence-Number: 8864 Curt Sampson writes: > Back when I was working out how to do this, I reckoned that you could > use mmap by keeping a write queue for each modified page. Reading, > you'd have to read the datum from the page and then check the write > queue for that page to see if that datum had been updated, using the > new value if it's there. Writing, you'd add the modified datum to the > write queue, but not apply the write queue to the page until you'd had > confirmation that the corresponding transaction log entry had been > written. So multiple writes are no big deal; they just all queue up in > the write queue, and at any time you can apply as much of the write > queue to the page itself as the current log entry will allow. Seems to me the overhead of any such scheme would swamp the savings from avoiding kernel/userspace copies ... the locking issues alone would be painful. regards, tom lane