pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Brown <kevin@sysexperts.com>
To: pgsql-performance@postgresql.org
Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ...
Date: Sat, 9 Oct 2004 13:37:12 -0700
Message-ID: <20041009203710.GB665@filer> (raw)
In-Reply-To: <27696.1097334448@sss.pgh.pa.us>
References: <200410081443.16109.josh@agliodbs.com>
	<m31xg8zlo4.fsf@wolfe.cbbrowne.com>
	<20041009112048.GA665@filer>
	<27696.1097334448@sss.pgh.pa.us>

Tom Lane wrote:
> Kevin Brown <kevin@sysexperts.com> writes:
> > This is why I sometimes wonder whether or not it would be a win to use
> > mmap() to access the data and index files -- 
> 
> mmap() is Right Out because it does not afford us sufficient control
> over when changes to the in-memory data will propagate to disk.  The
> address-space-management problems you describe are also a nasty
> headache, but that one is the showstopper.

Huh?  Surely fsync() or fdatasync() of the file descriptor associated
with the mmap()ed region at the appropriate times would accomplish
much of this?  I'm particularly confused since PG's entire approach to
disk I/O is predicated on the notion that the OS, and not PG, is the
best arbiter of when data hits the disk.  Otherwise it would be using
raw partitions for the highest-speed data store, yes?

Also, there isn't any particular requirement to use mmap() for
everything -- you can use traditional open/write/close calls for the
WAL and mmap() for the data/index files (but it wouldn't surprise me
if this would require some extensive code changes).

That said, if it's typical for many changes to made to a page
internally before PG needs to commit that page to disk, then your
argument makes sense, and that's especially true if we simply cannot
have the page written to disk in a partially-modified state (something
I can easily see being an issue for the WAL -- would the same hold
true of the index/data files?).



-- 
Kevin Brown					      kevin@sysexperts.com



view thread (41+ messages)  latest in thread

Message-ID: <20041009203710.GB665@filer>
Permalink:  ../20041009203710.GB665@filer/
Also on:    postgresql.org/message-id/20041009203710.GB665@filer

 · 

reply

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: kevin@sysexperts.com
  Subject: Re: First set of OSDL Shared Mem scalability results, some wierdness ...
  In-Reply-To: <20041009203710.GB665@filer>

* 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