From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Smith <greg@2ndquadrant.com>
Cc: James Mansion <james@mansionfamily.plus.com>
Cc: Kevin Grittner <Kevin.Grittner@wicourts.gov>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: jd@commandprompt.com, Scott Marlowe <scott.marlowe@gmail.com>
Cc: Steve Crawford <scrawford@pinpointresearch.com>
Cc: pgsql-performance@postgresql.org, Ben Chobot <bench@silentmedia.com>
Subject: Re: BBU Cache vs. spindles
Date: Sun, 24 Oct 2010 16:40:19 -0400
Message-ID: <16724.1287952819@sss.pgh.pa.us> (raw)
In-Reply-To: <4CC46479.2050206@2ndquadrant.com>
References: <4CC04EA50200002500036C5E@gw.wicourts.gov>
<201010211935.o9LJZTM21744@momjian.us>
<4CC0513E0200002500036C68@gw.wicourts.gov>
<4CC3E8BF.4090409@mansionfamily.plus.com>
<4CC46479.2050206@2ndquadrant.com>
Greg Smith <greg@2ndquadrant.com> writes:
> James Mansion wrote:
>> When I looked at the internals of TokyoCabinet for example, the design
>> was flawed but
>> would be 'fairly robust' so long as mmap'd pages that were dirtied did
>> not get persisted
>> until msync, and were then persisted atomically.
> If TokyoCabinet presumes that's true and overwrites existing blocks with
> that assumption, it would land onto my list of databases I wouldn't
> trust to hold my TODO list. Flip off power to a server, and you have no
> idea what portion of the blocks sitting in the drive's cache actually
> made it to disk; that's not even guaranteed atomic to the byte level.
The other and probably worse problem is that there's no application
control over how soon changes to mmap'd pages get to disk. An msync
will flush them out, but the kernel is free to write dirty pages sooner.
So if they're depending for consistency on writes not happening until
msync, it's broken by design. (This is one of the big reasons we don't
use mmap'd space for Postgres disk buffers.)
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, greg@2ndquadrant.com, james@mansionfamily.plus.com, Kevin.Grittner@wicourts.gov, bruce@momjian.us, scott.marlowe@gmail.com, scrawford@pinpointresearch.com, bench@silentmedia.com
Subject: Re: BBU Cache vs. spindles
In-Reply-To: <16724.1287952819@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