Re: Load distributed checkpoint V4

From: Greg Smith <gsmith(at)gregsmith(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Load distributed checkpoint V4
Date: 2007-04-24 04:16:38
Message-ID: Pine.GSO.4.64.0704232341400.7149@westnet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Thu, 19 Apr 2007, Heikki Linnakangas wrote:

> In the sync phase, we sleep between each fsync until enough time/segments
> have passed, assuming that the time to fsync is proportional to the file
> length. I'm not sure that's a very good assumption.

I've been making scatter plots of fsync time vs. amount written to the
database for a couple of months now, and while there's a trend there it's
not a linear one based on data written. Under Linux, to make a useful
prediction about how long a fsync will take you first need to consider how
much dirty data is already in the OS cache (the "Dirty:" figure in
/proc/meminfo) before the write begins, relative to the kernel parameters
that control write behavior. Combine that with some knowledge of the
caching behavior of the controller/disk combination you're using, and it's
just barely possible to make a reasonable estimate. Any less information
than all that and you really have very little basis on which to guess how
long it's going to take.

Other operating systems are going to give completely different behavior
here, which of course makes the problem even worse.

--
* Greg Smith gsmith(at)gregsmith(dot)com http://www.gregsmith.com Baltimore, MD

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-04-24 04:37:20 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Previous Message ITAGAKI Takahiro 2007-04-24 04:16:01 Any incompatibility in pg_enc between 8.2 and 8.3?

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-04-24 04:37:20 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect
Previous Message Tom Lane 2007-04-24 02:42:38 Re: BUG #3245: PANIC: failed to re-find shared loc k o b j ect