pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tim Ellis <Tim.Ellis@gamet.com>
To: Curt Sampson <cjs@cynic.net>
Cc: stigmata@blackangel.net
Cc: pgsql-admin@postgresql.org
Subject: Re: memory strangeness (fwd)
Date: Tue, 9 Jul 2002 10:19:47 -0700
Message-ID: <20020709101947.3bd8e3d0.Tim.Ellis@gamet.com> (raw)
In-Reply-To: <Pine.NEB.4.44.0207091117510.21914-100000@angelic.cynic.net>
References: <20020708112304.733fbe30.Tim.Ellis@gamet.com>
	<Pine.NEB.4.44.0207091117510.21914-100000@angelic.cynic.net>

> > Is there not a method of reading a disk block and instructing the OS
> > not to buffer it, or am I hallucinating?
> 
> Yes. Read the block from a raw device. Of course, it's up to you to deal
> with an filesystem issues or whatever. :-)
> 
> FreeBSD also has the O_DIRECT flag, but that's not guaranteed not to
> buffer the read. A much smarter way to do this is just to let the OS
> deal with the caching, and use the mmap system call to map blocks you
> want to modify into your processes' address space. This will also let
> you buffer more than 2GB of data, since the number of blocks buffered
> will not be limited by the maximum address space of a single process.

A very diplomatic way to say: "Essentially you are hallucinating" :)

I've always been a proponent of letting the OS do what it does best, so
this letting-the-OS-buffer-for-you concept, to me, is very appealing.

You still must know when the OS-buffered data has truly made it to disk
while not needing to submit lots of sync() calls. Part of that nasty
requirement that databases should guarantee data consistency and
integrity, while still performing well...

--
Tim Ellis
DBA, Gamet



view thread (13+ messages)  latest in thread

Message-ID: <20020709101947.3bd8e3d0.Tim.Ellis@gamet.com>
Permalink:  ../20020709101947.3bd8e3d0.Tim.Ellis@gamet.com/
Also on:    postgresql.org/message-id/20020709101947.3bd8e3d0.Tim.Ellis@gamet.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: Tim.Ellis@gamet.com, cjs@cynic.net, stigmata@blackangel.net
  Subject: Re: memory strangeness (fwd)
  In-Reply-To: <20020709101947.3bd8e3d0.Tim.Ellis@gamet.com>
  References: <20020708112304.733fbe30.Tim.Ellis@gamet.com> <Pine.NEB.4.44.0207091117510.21914-100000@angelic.cynic.net> <20020709101947.3bd8e3d0.Tim.Ellis@gamet.com>

* 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