From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kevin Brown <kevin@sysexperts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ...
Date: Fri, 15 Oct 2004 01:13:36 -0400
Message-ID: <5235.1097817216@sss.pgh.pa.us> (raw)
In-Reply-To: <20041014202531.GD665@filer>
References: <200410081443.16109.josh@agliodbs.com>
<m31xg8zlo4.fsf@wolfe.cbbrowne.com>
<20041009112048.GA665@filer>
<27696.1097334448@sss.pgh.pa.us>
<20041009203710.GB665@filer>
<4859.1097363137@sss.pgh.pa.us>
<20041014202531.GD665@filer>
Kevin Brown <kevin@sysexperts.com> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, kevin@sysexperts.com
Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ...
In-Reply-To: <5235.1097817216@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox