The Design and Implementation of a Log-Structured File System
Notes by Thorsten von Eicken, Feb. 1998
Goals
- Improve file system performance over FFS. Also improve recovery time.
- In particular, improve the performance of small writes, including the updating of file
system meta data.
- Maintain standard Unix filesystem semantics
Key insights
- write updates to the disk in the form of a sequential log
- divide the disk into large segments, write segments from start to end, use cleaner
process to turn partially full segments into full and empty ones
- use the same on-disk data structures as for normal file systems, but add a level of
indirection to allow inode blocks to be placed at the end of the log instead of at a fixed
location on disk
Results
- LFS outperforms FFS in every respect, except for the case of random writes followed by
sequential reads.
- LFS recovers basically instantaneously
- cleaning process is non-obvious and may introduce some unpredictability into the FS
performance