rethink the sync rethink the sync
play

Rethink the Sync! Rethink the Sync! Edmund B. Nightingale Kaushik - PowerPoint PPT Presentation

Rethink the Sync! Rethink the Sync! Edmund B. Nightingale Kaushik Veeraraghavan Peter M. Chen Jason Flinn University of Michigan Sync or Async Async? ? Sync or Desktop file systems typically use asynchronous I/O Advantages of


  1. Rethink the Sync! Rethink the Sync! Edmund B. Nightingale Kaushik Veeraraghavan Peter M. Chen Jason Flinn University of Michigan

  2. Sync or Async Async? ? Sync or • Desktop file systems typically use asynchronous I/O • Advantages of synchronous file I/O: – Cleaner abstraction – Any output seen by user is durable – Application programming is easier • Disadvantage of synchronous file I/O: Slow! • Need new model: visible synchrony Rethink the Sync!

  3. Visible Synchrony Visible Synchrony • Synchronous file operation guarantees: – Ordering: if A happens before B, effects of B not visible unless the effects of A also visible. – Durability: any operation that is observed to complete is already committed to disk. • Current OSes provide guarantees to applications. – Do not return from system call until data committed. Idea: provide guarantees to external observers instead! Rethink the Sync!

  4. Ordering and Durability Ordering and Durability • Ordering: commit operations in temporal order – Use ext3 in data journaling mode. • Durability: – File system operations return immediately but taint process. – OS buffers (uncommitted) output from tainted processes. – When data commits, OS removes taint, releases output. – OS tracks taint spread through IPC, shared memory, etc. Rethink the Sync!

  5. Synchronous I/O Synchronous I/O Application OS Write A Commit A Write B Commit B Output: “wrote B” Slow! Many synchronous disk writes Rethink the Sync!

  6. Visibly Synchronous I/O Visibly Synchronous I/O Application OS Write A Commit A Buffer until Write B committed Commit B Output: “Wrote B” Much faster (with a few more tricks) Rethink the Sync!

  7. Results: Linux 2.4 kernel Results: Linux 2.4 kernel Async Sync Sync Visible (default) (barriers) Synchrony Durable? No Not power loss Yes Yes after fsync? No Not power loss Yes Yes Apache Build 1:46 2:20 21:27 1:50 (overhead) --- (59%) 12x (4%) PostMark 8.1 s. 132 s. 1661 s. 8.8 s. (overhead) --- 16x 204x (8%) Visible synchrony: durability with low overhead! Users see behavior equivalent to synchronous I/O No application modification required. Rethink the Sync!

  8. Latency vs. Throughput Latency vs. Throughput Application OS Don’t commit yet! User not waiting Write A For output Buffer until Group commit when Write B committed output buffered Commit A+B Output: “Wrote B” Idea: Optimize for latency or throughput based upon visibility. Rethink the Sync!

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend