Soft updates

from Wikipedia, the free encyclopedia

Under Soft Updates is meant an extension to the Unix File System (UFS), which has two main objectives:

  • Guarantee of the consistency of the file system metadata without journaling
  • To keep losses in writing speed as low as possible through this measure

This functionality is achieved in that entire blocks of metadata to be written, for example for an entire directory, are kept in RAM , processed and sorted on the medium (e.g. the hard disk ) in a specific order .

As an effect, after an unscheduled restart, caused, for example, by a power failure or system crash , it basically looks as if the writing of the metadata to the hard disk either completely or not at all , in other words, meta-updates are atomic (indivisible). The file system is always in a consistent state. The only possible error that can occur are blocks in the file system that are still marked as occupied, although they should already be free. For this reason, it is necessary to check the file system for its block allocation.

In contrast to earlier implementations, however, the FreeBSD operating system version 5.x or higher allows this file system check (fsck) to run in the background. In the case of very large file systems, this significantly reduces the time it takes to start the system.

In practice, soft updates work most reliably if the hard disk's write cache is switched off, which results in significant performance losses on most hard disks. This feature is shared by soft updates and journaling .

The extension Softupdates for UFS is currently available in two of the free BSD variants:

  • OpenBSD 2.3 (November 1997) and newer versions
  • FreeBSD 4.0 (March 1998) and newer versions

Web links