Re: First set of OSDL Shared Mem scalability results, some wierdness ...

From: Kevin Brown <kevin(at)sysexperts(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ...
Date: 2004-10-15 09:19:40
Message-ID: 20041015091940.GF665@filer
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Tom Lane wrote:
> Kevin Brown <kevin(at)sysexperts(dot)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...

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(at)sysexperts(dot)com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2004-10-15 12:15:11 Re: Strange code in initdb
Previous Message Simon Riggs 2004-10-15 07:55:59 Re: [Testperf-general] Re: First set of OSDL Shared Memscalability results, some wierdness ...

Browse pgsql-performance by date

  From Date Subject
Next Message Bernd 2004-10-15 10:25:26 Select with qualified join condition / Batch inserts
Previous Message Simon Riggs 2004-10-15 07:55:59 Re: [Testperf-general] Re: First set of OSDL Shared Memscalability results, some wierdness ...