Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Jul 2003 12:29:27 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        freebsd-performance@freebsd.org
Subject:   Re: Tuning for PostGreSQL Database
Message-ID:  <20030722122927.6ccfe953.Alexander@Leidinger.net>
In-Reply-To: <20030721202400.GG55392@nasby.net>
References:  <Pine.BSF.4.05.10307191344080.16986-100000@misery.sdf.com> <20030721043501.F14379-100000@walter> <20030721192645.GB61464@perrin.int.nxad.com> <20030721194519.GE55392@nasby.net> <20030721201645.GD61464@perrin.int.nxad.com> <20030721202400.GG55392@nasby.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Jul 2003 15:24:00 -0500
"Jim C. Nasby" <jim@nasby.net> wrote:

> Of course the *real* issue is ensuring that no matter what, the WAL hits
> the disk before the main table data does, so that you can do proper
> recovery (though I'm not as clear on how this works with MVCC). If the
> issue is only a matter of delayed writes across the board, I don't see
> that it should really matter... it's just as if the plug got pulled a
> little earlier.

SoftUpdates affects metadata updates. Simplified explanation: if you
don't use SU and delete more than one file in a directory, the changed
directory information gets written to disk after every deleted file,
with SU enabled it just writes the directory information after the last
deleted file (actually SU doesn't know what the last file is, so it uses
some heuristics, but for this example you can ignore this fact) to disk,
every change in between will happen in memory only. The same applies to
the metadata of files (access time, modification time, ...).

So if you replace a file with SU enabled you may get either the old one
or the new one, but no inconsistent state in between (this is possible
without SU).

Without SU the window of the race condition is smaller, but it's still
there. I'm not aware of a statistical measurement of the difference, but
I think the probability of "the plug gets pulled in the wrong moment" is
the same (Murphy's law applied to this: the probability is "1" ;-) ).

Bye,
Alexander.

-- 
              The best things in life are free, but the
                expensive ones are still worth a look.

http://www.Leidinger.net                       Alexander @ Leidinger.net
  GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030722122927.6ccfe953.Alexander>