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 B6DB432C26C for ; Fri, 15 Oct 2004 10:19:48 +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 43938-01 for ; Fri, 15 Oct 2004 09:19:43 +0000 (GMT) Received: from rwcrmhc11.comcast.net (rwcrmhc11.comcast.net [204.127.198.35]) by svr1.postgresql.org (Postfix) with ESMTP id 49EB432C24C for ; Fri, 15 Oct 2004 10:19:44 +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 <2004101509194201300t513se>; Fri, 15 Oct 2004 09:19:42 +0000 Received: from localhost (localhost [127.0.0.1]) (uid 1000) by filer with local; Fri, 15 Oct 2004 02:19:41 -0700 id 0000AFFE.416F962D.0000335A Date: Fri, 15 Oct 2004 02:19:40 -0700 From: Kevin Brown To: pgsql-performance@postgresql.org Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ... Message-ID: <20041015091940.GF665@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> <4859.1097363137@sss.pgh.pa.us> <20041014202531.GD665@filer> <5235.1097817216@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <5235.1097817216@sss.pgh.pa.us> 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/210 X-Sequence-Number: 8686 Tom Lane wrote: > 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... Yeah, and at this point it can't be considered portable in any real way because of this. Thanks for the perspective. I should have expected the general specification to be quite broken in this regard, not to mention certain implementations. :-) Good thing there's a lot of lower-hanging fruit than this... -- Kevin Brown kevin@sysexperts.com