This is a discussion on Intent logging (journalling) within the Sco Unix forums, part of the Unix Operating Systems category; --> All, I know this is enabled by default (ROOTLOG) in the kernel, my question is a very simple one. ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| All, I know this is enabled by default (ROOTLOG) in the kernel, my question is a very simple one. 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. The reason for disabling it is that we're currently getting a small number of file corruptions -- and someone has suggested turning it off. I'd welcome your comments. Regards, Stuart. |
| ||||
| 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/ |