io-blk commit levels

bridged with qdn.public.qnxrtp.os
Post Reply
inn.qnx.com

io-blk commit levels

Post by inn.qnx.com » Fri Nov 28, 2003 4:05 pm

Is there a detailed description of the various "commit" levels (none, low,
medium, high) for io-blk.so and the underlying filesystems, particularly
qnx4? The on-line documentation explains that "none" means "everything
async" and "high" means that all writes are synchronous, but there isn't a
lot of other information, such as the real differences between none, low,
and medium, as well as how that applies to file operations like fsync() and
close().

I recall seeing a nice matrix for this a long time ago, but can't find it
now.

Thanks,

lew

John Garvey

Re: io-blk commit levels

Post by John Garvey » Sat Dec 13, 2003 4:05 pm

inn.qnx.com <lew@perftech.com> wrote:
Is there a detailed description of the various "commit" levels (none, low,
medium, high) for io-blk.so and the underlying filesystems, particularly
qnx4? The on-line documentation explains that "none" means "everything
async" and "high" means that all writes are synchronous, but there isn't a
lot of other information, such as the real differences between none, low,
There are 4 write types: sync (start immediately and wait for completion),
async (start immediately but do not wait for completion), delayed (do not
start until after a timeout period and then perform as async), and a
only-if-you-have-to form. The "blk delwri=" option controls the timeout
for the delayed format.

There are 3 types of data: user (what you read()/write()), metadata
(things associated with stat() like times and ids), and filesystem
data (things like bitmaps, extents, etc).

If a file has no links then that last form is used, never going to disk
unless buffer/cache is needed (since the file has no links the data is
not expected to be accessable after a power-loss). If a file was
opened O_SYNC then the sync format is always used.

Otherwise the "blk commit=" level controls the type of write to use
for each level of data. If "none" then everything is delayed, if "high"
then everything is sync. The "low" and "medium" are very similar
except for metadata type, which is either async or sync respectively.
and medium, as well as how that applies to file operations like fsync()
and close().
close() may force a metadata update but does nothing to user data.
fsync() will always force out any delayed-write blocks for the file
(and so is only useful when commit != high).

Steve Reid

Re: io-blk commit levels

Post by Steve Reid » Mon Dec 15, 2003 3:14 pm

John Garvey <jgarvey@qnx.com> wrote:
There are 4 write types: sync (start immediately and wait for completion),
async (start immediately but do not wait for completion), delayed (do not
start until after a timeout period and then perform as async), and a
only-if-you-have-to form. The "blk delwri=" option controls the timeout
for the delayed format.
I'll add this information to the docs for io-blk.so.

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

John Garvey

Re: io-blk commit levels

Post by John Garvey » Mon Dec 15, 2003 8:01 pm

Steve Reid <stever@sreid.ott.qnx.com> wrote:
John Garvey <jgarvey@qnx.com> wrote:
async (start immediately but do not wait for completion), delayed (do not
I'll add this information to the docs for io-blk.so.
If you do that then perhaps also add a cautionary note against
"commit=none". Whilst it should be obvious that doing this loses
all write ordering (both for single multi-block updates and multiple
user operations) and hence means your chances of a useful recovery
following power-loss are a gamble, it can't hurt to explicitly say
that we recommened use of this option only when you have a UPS
(or don't mind re-diniting your filesystem as a recovery tool).

Steve Reid

Re: io-blk commit levels

Post by Steve Reid » Mon Dec 15, 2003 8:21 pm

John Garvey <jgarvey@qnx.com> wrote:
If you do that then perhaps also add a cautionary note against
"commit=none". Whilst it should be obvious that doing this loses
all write ordering (both for single multi-block updates and multiple
user operations) and hence means your chances of a useful recovery
following power-loss are a gamble, it can't hurt to explicitly say
that we recommened use of this option only when you have a UPS
(or don't mind re-diniting your filesystem as a recovery tool).
OK.

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

inn.qnx.com

Re: io-blk commit levels

Post by inn.qnx.com » Sat Dec 20, 2003 2:50 am

Thanks very much for the detailed explanation!

lew

Post Reply

Return to “qdn.public.qnxrtp.os”