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 92FB432C91F for ; Fri, 15 Oct 2004 06:13:40 +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 76884-10 for ; Fri, 15 Oct 2004 05:13:37 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 8672D32C91E for ; Fri, 15 Oct 2004 06:13:37 +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 i9F5DaWu005236; Fri, 15 Oct 2004 01:13:36 -0400 (EDT) To: Kevin Brown Cc: pgsql-performance@postgresql.org Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ... In-reply-to: <20041014202531.GD665@filer> References: <200410081443.16109.josh@agliodbs.com> <20041009112048.GA665@filer> <27696.1097334448@sss.pgh.pa.us> <20041009203710.GB665@filer> <4859.1097363137@sss.pgh.pa.us> <20041014202531.GD665@filer> Comments: In-reply-to Kevin Brown message dated "Thu, 14 Oct 2004 13:25:31 -0700" Date: Fri, 15 Oct 2004 01:13:36 -0400 Message-ID: <5235.1097817216@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/206 X-Sequence-Number: 8682 Kevin Brown writes: > Hmm...something just occurred to me about this. > Would a hybrid approach be possible? That is, use mmap() to handle > reads, and use write() to handle writes? Nope. Have you read the specs regarding mmap-vs-stdio synchronization? Basically it says that there are no guarantees whatsoever if you try this. The SUS text is a bit weaselly ("the application must ensure correct synchronization") but the HPUX mmap man page, among others, lays it on the line: It is also unspecified whether write references to a memory region mapped with MAP_SHARED are visible to processes reading the file and whether writes to a file are visible to processes that have mapped the modified portion of that file, except for the effect of msync(). It might work on particular OSes but I think depending on such behavior would be folly... regards, tom lane