Log-Structured File System (LFS)

  • Growing system memories: With growing disk sizes, the amount of data that can be cached also increases. Since reads are serviced by the cache, the file system performance begins to depend solely on its write performance.
  • Sequential I/O performance trumps over random I/O performance: Over the years, the bandwidth of accessing bits off the hard drive has increased because more bits can be accommodated over the same area. However, it is physically difficult for the small rotors to move the disk more quickly. Therefore, sequential access can improve disk performance significantly.
  • Inefficiency of existing file systems: Existing file systems perform a large number of writes for as much as creating a new file, including inode, bitmap and data block writes and subsequent updates. The short seeks and rotational delays incurred reduces bandwidth.
  • File systems are not RAID-aware: Further, file systems do not have any mechanism to counter the small-write problem in RAID-4 and RAID-5.
segment
  • Inodes: As in Unix, inodes contain physical block pointers to files.
  • Inode Map: This table indicates the location of each inode on the disk. The inode map is written in the segment itself.
  • Segment Summary: This maintains information about each block in the segment.
  • Segment Usage Table: This tells us the amount of data on a block.
Sequential Writing to Disk:


Efficient Sequential Writing to Disk:


The Process in a Nutshell:
  • Every write causes new blocks to be added to the current segment buffer in memory.
  • When the segment is full, it is written onto the disk.
Challenges: