1 / 29

Rethink the Sync

Rethink the Sync. Ed Nightingale, Kaushik Veeraraghavan , Peter Chen, Jason Flinn University of Michigan Speaker : Kim Seongcheol , Sun Kyungmoon Dankook University. Rethink the Sync. Rethink the Sync. Ed Nightingale Kaushik Veeraraghavan Peter Chen Jason Flinn

reed
Download Presentation

Rethink the Sync

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. Rethink the Sync Ed Nightingale, KaushikVeeraraghavan, Peter Chen, Jason Flinn University of Michigan Speaker: Kim Seongcheol, Sun Kyungmoon Dankook University Kim Seongcheol, Dankook University

  2. Rethink the Sync Kim Seongcheol, Dankook University

  3. Rethink the Sync Ed Nightingale KaushikVeeraraghavan Peter Chen Jason Flinn University of Michigan

  4. Introduction • File systems serve two opposing masters Durability Performance Synchronous Asynchronous Kim Seongcheol, Dankook University

  5. Problem • Asynchronous I/O is a poor abstraction for: • Reliability • Ordering • Durability • Ease of programming • Synchronous I/O is superior but 100xslower • Caller blocked until operation is complete University of Michigan

  6. Solution • Synchronous I/O can be fast • New model for synchronous I/O • External synchrony • Same guarantees as synchronous I/O • Only 8% slower than asynchronous I/O University of Michigan

  7. When a sync() is really async • On sync() data written only to volatile cache • 10x performance penalty and data NOT safe Disk OperatingSystem VolatileCache Cylinders • 100x slower than asynchronous I/O if disable cache University of Michigan

  8. Design Principles • The design of external synchrony is based on two principles • externally observable behavior rather than by its implementation • application state is an internal property of the computer system Kim Seongcheol, Dankook University

  9. OS Kernel To whom are guarantees provided? • Synchronous I/O definition: • Caller blocked until operation completes App App App Network Disk Screen • Guarantee provided to application University of Michigan

  10. To whom are guarantees provided? • Guarantee really provided to the user App App App OS Kernel Network Disk Screen University of Michigan

  11. Providing the user a guarantee • User observes operation has completed • User may examine screen, network, disk… • Guarantee provided by synchronous I/O • Data durable when operation observed to complete • To observe output it must be externally visible • Visible on external device University of Michigan

  12. App App App Disk Screen Why do applications block? • Since application external we block on syscall External OS Kernel Internal Network External • Application is internal therefore no need to block University of Michigan

  13. A new model of synchronous I/O • Provide guarantee directly to user • Rather than via application • Called externally synchronous I/O • Indistinguishable from traditional sync I/O • Approaches speed of asynchronous I/O University of Michigan

  14. Example: Synchronous I/O Application blocks 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); Application blocks %work done% % Disk OS Kernel TEXT Process University of Michigan

  15. Observing synchronous I/O 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); • Sync I/O externalizes output based on causal ordering • Enforces causal ordering by blocking an application • Ext sync: Same causal ordering without blocking applications Depends on 1st write Depends on 1st & 2nd write University of Michigan

  16. Example: External synchrony 101 write(buf_1); 102 write(buf_2); 103 print(“work done”); 104 foo(); %work done% % Disk OS Kernel TEXT Process University of Michigan

  17. Deciding when to commit • To trigger commits • An externally synchronous file system uses the causal relationship between external output and file modifications Kim Seongcheol, Dankook University

  18. Tracking causal dependencies • Applications may communicate via IPC • Socket, pipe, fifo etc. • Need to propagate dependencies through IPC • We build upon Speculator [SOSP ’05] • Track and propagate causal dependencies • Buffer output to screen and network University of Michigan

  19. Commit Dep 1 Tracking causal dependencies Process 1 Process 2 101 print (“hello”); 102 read(file1); 103 print(“world”); 101 write(file1); 102 do_something(); %hello% % TEXT TEXT Process 2 Process 2 OS Kernel world Disk Process 1 Process 1 University of Michigan

  20. Output triggered commits • Maximize throughput until output buffered • When output buffered, trigger commit • Minimize latency only when important %work done% % Disk OS Kernel TEXT Process University of Michigan

  21. Evaluation • Our evaluation answers the following questions: • How does the durability of xsyncfs compare to current file systems? • How does the performance of xsyncfs compare to current file systems? • How does xsyncfs affect the performance of applications that synchronize explicitly? • How much do Output-triggered commits improve the performance of xsyncfs? Kim Seongcheol, Dankook University

  22. Evaluation • Implemented ext sync file system Xsyncfs • Based on the ext3 file system • Use journaling to preserve order of writes • Use write barriers to flush volatile cache • Compare Xsyncfs to 3 other file systems • Default asynchronous ext3 • Default synchronous ext3 • Synchronous ext3 with write barriers University of Michigan

  23. When is data safe? University of Michigan

  24. Postmark benchmark • Xsyncfs within 7% of ext3 mounted asynchronously University of Michigan

  25. The MySQL benchmark • Xsyncfs can group commit from a single client University of Michigan

  26. Specweb99 throughput • Xsyncfs within 8% of ext3 mounted asynchronously University of Michigan

  27. Specweb99 latency • Xsyncfs adds no more than 33 ms of delay University of Michigan

  28. Conclusion • Synchronous I/O can be fast • External synchrony performs with 8% of async • Questions? University of Michigan

  29. Rethink Q&A Rethink the Sync Sink Kim Seongcheol, Dankook University

More Related