Re: Spreading full-page writes

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>
Subject: Re: Spreading full-page writes
Date: 2014-05-30 03:39:46
Message-ID: CA+TgmoYtQy=oq_MMzxHuoAditVeo5fkV3zQXH9xPeiXifrRdmg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 27, 2014 at 8:15 AM, Heikki Linnakangas
<hlinnakangas(at)vmware(dot)com> wrote:
> Since you will be flushing the buffers one "redo partition" at a time, you
> would want to allow the OS to do merge the writes within a partition as much
> as possible. So my even-odd split would in fact be pretty bad. Some sort of
> striping, e.g. mapping each contiguous 1 MB chunk to the same partition,
> would be better.

I suspect you'd actually want to stripe by segment (1GB partition).
If you striped by 1MB partitions, there might still be writes to the
parts of the file you weren't checkpointing that would be flushed by
the fsync(). That would lead to more physical I/O overall, if those
pages were written again before you did the next half-checkpoint.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2014-05-30 03:42:21 Re: postgres_fdw and connection management
Previous Message Robert Haas 2014-05-30 03:35:49 Re: fix worker_spi to run as non-dynamic background worker