1 / 33

Journaling vs Soft Updates: Asynchronous Metadata Protection in File Systems

Journaling vs Soft Updates: Asynchronous Metadata Protection in File Systems. Margo I. Seltzer, Harvard, Gregory R. Ganger CMU, M. Kirk McKusick , Keith A. Smith, Harvard, Craig A.N. Soules CMU, Christopher A. Stein, Harvard Presenters: Arjumand Younus and Muhammad Atif Qureshi.

reed
Télécharger la présentation

Journaling vs Soft Updates: Asynchronous Metadata Protection in File Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Journaling vs Soft Updates: Asynchronous Metadata Protection in File Systems Margo I. Seltzer, Harvard, Gregory R. Ganger CMU, M. Kirk McKusick, Keith A. Smith, Harvard, Craig A.N. Soules CMU, Christopher A. Stein, Harvard Presenters: ArjumandYounus and Muhammad AtifQureshi

  2. Outline • Introduction: The Problem • Solutions • Synchronous Writes • Soft Updates • Journaling • Comparative Evaluation • Feature Comparison • Measurements • Conclusion

  3. Problem Statement • File system meta-data update problem • Interdependencies must be cared for during disk updates

  4. Metadata Operations • Metadata operations modify the structure of the file system • Creating, deleting or renaming files, directories or special files • Data must be written to disk in such a way that the file system can be recovered to a consistent state after a system crash

  5. Deleting a File (1/3) i-node-1 abc def i-node-2 ghi i-node-3 Assume we want to delete file “def”

  6. Deleting a File (2/3) i-node-1 abc ? def ghi i-node-3 Cannot delete i-node before directory entry “def”

  7. Deleting a File (3/3) • Correct sequence is • Write to disk directory block containing deleted directory entry “def” • Write to disk i-node block containing deleted i-node • Leaves the file system in a consistent state

  8. Creating a File (1/3) i-node-1 abc ghi i-node-3 Assume we want to create new file “tuv”

  9. Creating a File (2/3) i-node-1 abc ghi i-node-3 tuv ? Cannot write directory entry “tuv” before i-node

  10. Creating a File (3/3) • Correct sequence is • Write to disk i-node block containing new i-node • Write to disk directory block containing new directory entry • Leaves the file system in a consistent state

  11. Approaches to Metadata Management • Synchronous Writes • FFS • Ordered Writes • Soft Updats • Logged Writes • Journaling

  12. Synchronous Writes • Soft Updates • Journaling • LFFS-file • LFFS-wafs

  13. Synchronous Writes • Used by FFS to guarantee consistency of metadata: • All metadata updates are done through blocking writes • Increases the cost of metadata updates • Can significantly impact the performance of whole file system

  14. Soft Updates • Uses delayed writes (write back) • Maintain dependency informationabout cached pieces of metadata: • This i-node must be updated before/after this directory entry • Guarantees that metadata blocks are written to disk in the required order

  15. Problems in Soft Updates (1/2) • Soft Updates guarantee that file system will recover into a consistent state but not necessarily the most recent one • Some updates could be lost • Cyclical dependencies: • Same directory block contains entries to be created and entries to be deleted • These entries point to i-nodes in the same block

  16. Problems in Soft Updates (2/2) Block B Block A def --- i-node-2 ---------- • Cannot write block A before block B: • Block A contains a new directory entry pointing to block B • Cannot write block B before block A: • Block A contains a deleted directory entry pointing to block B NEW xyz NEW i-node-3 We want to delete file “def”andcreate new file “xyz”

  17. def Solution to Soft Update Problem (1/2) • Roll back metadata in one of the blocks to an earlier, safe state • (Safe state does not contain new directory entry) Block A

  18. Solution to Soft Update Problem (2/2) • Write first block with metadata that were rolled back (block A’ of example) • Write blocks that can be written after first block has been written (block B of example) • Roll forward block that was rolled back • Write that block • Breaks the cyclical dependency but must nowwrite twice block A

  19. Journaling • Logs metadata operations • Writes metadata in-place asynchronously • Write-ahead logging (WAL) protocol guarantees recoverability. • Journaling systems can provide • same durability semantics as FFS if log is forced to disk after each meta-data operation • the laxer semantics of Soft Updates if log writes are buffered until entire buffers are full • Will discuss two implementations • LFFS-file • LFFS-wafs

  20. LFFS-file • Maintains a circular log in a pre-allocated file in the FFS (about 1% of file system size) • Buffer header of each modified block in cache identifies the first and last log entries describing an update to the block • LFFS-file maintains its log asynchronously • Maintains file system integrity, but does not guarantee durability of updates

  21. LFFS-wafs (1/2) • Implements its log in an auxiliary file system:Write Ahead File System (WAFS) • Can be mounted and unmounted • Can append data • Can return data by sequential or keyed reads • Same checkpointing scheme and write-ahead logging protocol as LFFS-file

  22. LFFS-wafs (2/2) • Major advantage of WAFS is additional flexibility: • Can put WAFS on separate disk drive to avoid I/O contention • Can even put it in NVRAM • LFS-wafs normally usessynchronous writes • Metadata operations are persistent upon return from the system call • Same durability semantics as FFS

  23. Properties of Metadata Operations • Feature Comparison • Experimental Setup & Measurements

  24. Properties of Metadata Operations • Integrity • The file system is always recoverable • Durability • Updates are persistent once the call returns • Atomicity • No partial metadata operations are visible after recovery

  25. Feature Comparison

  26. Experimental Setup • Software • Modified FreeBSD kernel and 2 journaling file system implementations (LFFS-wafs, LFFS-file) • Hardware • 500 MHz Xeon Pentium III • 512 MB RAM • 3 x 9GB 10,000 RPM Seagate Cheetahs • Compared performances of • Standard FFS • FFS mounted with the async option • FFS mounted with Soft Updates • FFS augmented with a file log using asynchronous log writes • FFS augmented with a WAFS log using • Synchronous /asynchronous log writes • WAFS log on same/different drive

  27. Microbenchmark

  28. Comments on Microbenchmark Results • FFS-async performsbest • Original FFS, LFFS-wafs-2sync andLFFS-wafs-1sync performworst • Synchronous log updates are costly • LFFS-file outperforms LFFS-wafs-2async and LFFS-wafs-1async • LFFS-file uses bigger block clustersfor log writes • Additional Results • Read/write performance identical for all systems • All async systems have similar create throughput • Soft updates has great delete performance due to its ability to do background work

  29. Macrobenchmarks • SSH-build • Unpacks, configures and builds ssh • NetNews • Simulates the work of a news server • SDET • Emulates user interactive software development workload • Postmark • Designed to model the workload seen by ISPs under heavy load: combination of email, news and e-commerce transactions

  30. SSH Benchmark

  31. NetNews Benchmark

  32. Conclusions • Journaling alone is not sufficient to “solve” the meta-data update problem • Cannot realize its full potential when synchronous semantics are required • When that condition is relaxed, journaling and Soft Updates perform comparably in most cases

  33. Problems • Only a single file system with a single write-ordering model and a single approach to writing the journal was evaluated. • Under what circumstances will soft update perform better and where will Journaling perform better were not close ended. • It looks more of survey paper than conclusive stance over issues at hands. • High performance applicants will find it too naive to accept as practioners guide (Who will be its first implementer). • Work load taken were too sparse and were too high level to close end a discussion in particular discipline and does not offer a final say. • Survey was good, but analysis lacked to comprehend a pin pointed viewpoint. • Performance over array (disks) must have appealed high performance applicants, but paper does not provide any knowledge for such meaningful debate.

More Related