(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



Best of the Newsgroups: intent logging filesystem htfs


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From: stephen@stevedunn.ca (Stephen M. Dunn)
Subject: Re: Intent logging (journalling)
Date: Thu, 29 Jan 2004 21:13:06 GMT
Message-ID: <Hs9s9u.6w5@stevedunn.ca> 
References: <bvavjl$p39t8$1@ID-142465.news.uni-berlin.de> 

In article <bvavjl$p39t8$1@ID-142465.news.uni-berlin.de> Stuart Marshall <stuart@spidersoft.co.uk> writes:
$What actual advantage to this offer, is turning it off a bad idea? My
$initial thoughts are, yes - it's a bad idea, but I'll be honest and
$say I don't exactly know why.

   Logging writes the metadata changes (not the actual file data, but
the information the OS uses to keep track of the file - the type of
stuff you find in the inode) to a log file before making the changes.
After the changes are made, another market is written to the logfile
to indicate that the changes have been written to disk.



   Without logging, fsck has to look at all of the metadata, and
ensure that it is all consistent, so even if you were only writing
to one file when the system crashed, fsck has to check everything.
This can take many seconds or minutes, particularly on large
filesystems.

   With logging, fsck can look at the log and see if there were
any changes that were logged but not marked complete.  If so, it
simply completes them; the log contains all of the information needed
to replay the changes.  This is a heck of a lot faster than the
old way, as the time required depends only on the volume of changes
that were in progress at the time the system crashed and not on
the size of the filesystem.

   Note that we're talking about metadata only.  The actual file
data is not affected by whether or not you use intent logging;
it is still written asynchronously according to the kernel parameters
you've set for flushing the buffer cache (or it can be written
synchronously if the application requests this by means such as
fsync()).

   In theory, at least, turning logging off should not help a
data corruption issue, unless you have some weird hardware issue
that is triggered by the extra writes for logging - and in that
case, it's not logging that's at the root of the problem.  Neither
should it hurt to turn off logging, if you're prepared to accept
the need to run a full fsck should the system go down uncleanly.

   In general - and I don't recall whether this applies specifically
to OSR5's HTFS or not - journalling can improve performance in some
cases.  Without it, metadata changes are often written synchronously,
to improve reliability, but this means that the read/write heads have
to hit several places (e.g. superblock, inodes, directory entries)
which can require some amount of seeking.  With journalling, metadata
changes are first written to the log, which doesn't require changes
to be written in multiple places so it's quicker; since the required
changes are now logged, the metadata can then be written asynchronously.
As I said, I don't recall whether the OSR5 implementation works this
way, so unless someone comes up with an authoritative answer, don't
assume that this is applicable.
-- 
Stephen M. Dunn                             <stephen@stevedunn.ca>
>>>----------------> http://www.stevedunn.ca/ <----------------<<<
------------------------------------------------------------------
     Say hi to my cat -- http://www.stevedunn.ca/photos/toby/




Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



ad

/Bofcusm/2434.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress