Journaling I/O
- journals are not committed immediately to disk - they are batched in
memory.
- On ext3 - the journal is flushed to disk every 5 seconds (configurable)
- This avoids too many seeks...
- ...at the price of potential transactions loss on system crash.
- Journaling can be of several types:
- full data journal - the data will be written to disk twice - to
the journal and to the file system. Simpler to implement.
- meta-data only - data won't be written to disk before entered into
the journal - yet will be written to disk before the journal
is written to disk.
- Having an 'fsync()' call - requires flushing file-system blocks and
journal blocks:
- will cause seeks...
- ...unless the journal is kept on a separate disk (separate spindle).
Originally written by
guy keren