From: James Mansion <james@mansionfamily.plus.com>
To: pgsql-performance@postgresql.org
Subject: POSIX file updates
Date: Mon, 31 Mar 2008 20:53:31 +0100
Message-ID: <47F1413B.40109@mansionfamily.plus.com> (raw)
(Declaration of interest: I'm researching for a publication
on OLTP system design)
I have a question about file writes, particularly on POSIX.
This arose while considering the extent to which cache memory
and command queueing on disk
drives can help improve performance.
Is it correct that POSIX requires that the updates to a single
file are serialised in the filesystem layer?
So, if we have a number of dirty pages to write back to a single
file in the database (whether a table or index) then we cannot
pass these through the POSIX filesystem layer into the TCQ/NCQ
system on the disk drive, so it can reorder them?
I have seen suggestions that on Solaris this can be relaxed.
I *assume* that PostgreSQL's lack of threads or AIO and the
single bgwriter means that PostgreSQL 8.x does not normally
attempt to make any use of such a relaxation but could do so if the
bgwriter fails to keep up and other backends initiate flushes.
Does anyone know (perhaps from other systems) whether it is
valuable to attempt to take advantage of such a relaxation
where it is available?
Does the serialisation for file update apply in the case
where the file contents have been memory-mapped and we
try an msync (or equivalent)?
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: james@mansionfamily.plus.com
Subject: Re: POSIX file updates
In-Reply-To: <47F1413B.40109@mansionfamily.plus.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