Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan Best Paper at SOSP 2005 Modified for CS739.

Slides:



Advertisements
Similar presentations
Remus: High Availability via Asynchronous Virtual Machine Replication
Advertisements

Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen Jason Flinn University of Michigan.
Speculative Execution In Distributed File System and External Synchrony Edmund B.Nightingale, Kaushik Veeraraghavan Peter Chen, Jason Flinn Presented by.
1 Cheriton School of Computer Science 2 Department of Computer Science RemusDB: Transparent High Availability for Database Systems Umar Farooq Minhas 1,
Bandwidth and latency optimizations Jinyang Li w/ speculator slides from Ed Nightingale.
Speculations: Speculative Execution in a Distributed File System 1 and Rethink the Sync 2 Edmund Nightingale 12, Kaushik Veeraraghavan 2, Peter Chen 12,
Other File Systems: LFS and NFS. 2 Log-Structured File Systems The trend: CPUs are faster, RAM & caches are bigger –So, a lot of reads do not require.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
Distributed File System: Design Comparisons II Pei Cao Cisco Systems, Inc.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Distributed File System: Design Comparisons II Pei Cao.
File Systems (2). Readings r Silbershatz et al: 11.8.
DESIGN AND IMPLEMENTATION OF THE SUN NETWORK FILESYSTEM R. Sandberg, D. Goldberg S. Kleinman, D. Walsh, R. Lyon Sun Microsystems.
Network File System (NFS) Brad Karp UCL Computer Science CS GZ03 / M030 6 th, 7 th October, 2008.
Transactions and Reliability. File system components Disk management Naming Reliability  What are the reliability issues in file systems? Security.
Operating System Support for Application-Specific Speculation Benjamin Wester Peter Chen and Jason Flinn University of Michigan.
CSC 456 Operating Systems Seminar Presentation (11/13/2012) Leon Weingard, Liang Xin The Google File System.
1 AutoBash: Improving Configuration Management with Operating System Causality Analysis Ya-Yunn Su, Mona Attariyan, and Jason Flinn University of Michigan.
Networked File System CS Introduction to Operating Systems.
Distributed Systems. Interprocess Communication (IPC) Processes are either independent or cooperating – Threads provide a gray area – Cooperating processes.
Distributed File Systems
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems CSCI-6140 – Computer Operating Systems David Goldschmidt, Ph.D.
Distributed File Systems Overview  A file system is an abstract data type – an abstraction of a storage device.  A distributed file system is available.
Parallelizing Security Checks on Commodity Hardware Ed Nightingale Dan Peek, Peter Chen Jason Flinn Microsoft Research University of Michigan.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
SPECULATIVE EXECUTION IN A DISTRIBUTED FILE SYSTEM E. B. Nightingale P. M. Chen J. Flint University of Michigan.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
A Low-bandwidth Network File System Athicha Muthitacharoen et al. Presented by Matt Miller September 12, 2002.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
ENERGY-EFFICIENCY AND STORAGE FLEXIBILITY IN THE BLUE FILE SYSTEM E. B. Nightingale and J. Flinn University of Michigan.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
Storage Systems CSE 598d, Spring 2007 Rethink the Sync April 3, 2007 Mark Johnson.
CS333 Intro to Operating Systems Jonathan Walpole.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 4 Computer Systems Review.
Silberschatz, Galvin and Gagne  Operating System Concepts Six Step Process to Perform DMA Transfer.
Distributed File Systems 11.2Process SaiRaj Bharath Yalamanchili.
Speculation Supriya Vadlamani CS 6410 Advanced Systems.
Distributed File Systems Group A5 Amit Sharma Dhaval Sanghvi Ali Abbas.
Review CS File Systems - Partitions What is a hard disk partition?
Distributed File Systems Questions answered in this lecture: Why are distributed file systems useful? What is difficult about distributed file systems?
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Synchronization in Distributed File Systems Advanced Operating System Zhuoli Lin Professor Zhang.
Computer Science Lecture 19, page 1 CS677: Distributed OS Last Class: Fault tolerance Reliable communication –One-one communication –One-many communication.
Free Transactions with Rio Vista Landon Cox April 15, 2016.
DISTRIBUTED FILE SYSTEM- ENHANCEMENT AND FURTHER DEVELOPMENT BY:- PALLAWI(10BIT0033)
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Free Transactions with Rio Vista
Jonathan Walpole Computer Science Portland State University
Transactions and Reliability
Scaling a file system to many cores using an operation log
Improving File System Synchrony
Introduction to Operating Systems
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Free Transactions with Rio Vista
Distributed File Systems
Distributed File Systems
Distributed File Systems
Rethink the Sync Ed Nightingale Kaushik Veeraraghavan Peter Chen
LINUX System : Lecture 7 Lecture notes acknowledgement : The design of UNIX Operating System.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Distributed File Systems
Distributed File Systems
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

Speculative Execution in a Distributed File System Ed Nightingale Peter Chen Jason Flinn University of Michigan Best Paper at SOSP 2005 Modified for CS739

2 Motivation Why are distributed file systems slow(er)? –Sync network messages provide consistency –Sync disk writes provide safety Sacrifice guarantees for speed Can DFS can be safe, consistent and fast? –Yes! With OS support for speculative execution

3 Big Idea: Slow Way RPC Req Client RPC Resp Guarantees without blocking I/O! Server Block!2) Speculate! 1) Checkpoint Big Idea: Speculator 3) Correct? Yes: discard ckpt.No: restore process & re-execute RPC Req RPC Resp RPC Req RPC Resp

4 Conditions for Success Operations are highly predictable –Conflicts are rare Checkpoints are cheaper than network I/O –52 µs for small process (6.3 ms for 64 MB process) Computers have resources to spare –Need memory and CPU cycles for speculation

5 Assumptions --> Experiments Operations are highly predictable –What happens if not (lots of sharing)? –Will cost of checkpointing and rolling back ever harm performance? Checkpoints are cheaper than network I/O –What happens with large memory processes? Computers have resources to spare (Clients) –What happens when running multiple processes? –Can network become bottleneck? –Can server become bottleneck?

6 Outline Motivation Implementing speculation Multi-process speculation Using Speculator Evaluation

7 Implementing Speculation Implementation –All within OS –No changes needed to applications –Three new interfaces Create_speculation() Commit_speculation() Fail_speculation() Goal: Ensure speculative state is Never externalized (sent to terminal, disk, network) Never directly observed by non-speculative processes

8 Undo log For each kernel object Implementing Speculation Process 1) System call2) Create speculation Time Spec Tracks objects that depend on speculation Checkpoint Copy-on-write fork

9 Speculation Success Undo log Checkpoint 1) System call2) Create speculation Process 3) Commit speculation Time Spec

10 Speculation Failure Undo log Checkpoint 1) System call 2) Create speculation Process 3) Fail speculation Process Time Spec

11 Replay after Failure Does code after checkpoint need to be deterministic for correct results?

12 Ensuring Correctness Spec processes often affect external state –Speculative state should never be visible to user or any external device –Process should never view speculative state unless it is already speculatively dependent on that state Three ways to ensure correct execution –Block –Buffer –Propagate speculations (dependencies)

13 Systems Calls Modify system call jump table Block calls that externalize state –Allow read-only calls (e.g. getpid) –Allow calls that modify only task state (e.g. dup2) File system calls -- need to dig deeper –Mark file systems that support Speculator getpid reboot mkdir Call sys_getpid() Block until specs resolved Allow only if fs supports Speculator

14 Output Commits: Buffer “stat worked” “mkdir worked” Undo log Checkpoint Spec (stat) Spec (mkdir) 1) sys_stat2) sys_mkdir Process Time 3) Commit spec 1

15 Multi-Process Speculation Processes often cooperate –Example: “make” forks children to compile, link, etc. –Would block if speculation limited to one task Allow kernel objects to have speculative state –Examples: inodes, signals, pipes, Unix sockets, etc. –Propagate dependencies among objects –Objects rolled back to prior states when specs fail

16 Spec 1 Multi-Process Speculation Spec 2 pid 8001 Checkpoint inode 3456 Chown -1 Write -1 pid 8000 Checkpoint Chown -1 Write -1 Stat AStat B

17 Multi-Process Speculation What we handle: –DFS objects, RAMFS, Ext3, Pipes & FIFOs –Unix Sockets, Signals, Fork & Exit What we don’t (i.e. we block) –System V IPC –Multi-process write-shared memory

18 Outline Motivation Implementing speculation Multi-process speculation Using Speculator Evaluation

19 Example: NFSv3 Linux Client 1Client 2Server Open B Getattr Modify B Write Commit Why were asynchronous writes added to NFSv3? Is this situation of no overlap expected to be the common case? When can the commit return from the server?

20 Example: SpecNFS Modify B speculate Getattr Open B speculate Open B Getattr speculate Write+Commit Client 1Client 2Server When can the commit return from the server?

21 Problem: Mutating Operations bar depends on cat foo What does client 2 view in bar? Client 1 1. cat foo > bar Client 2 2. cat bar

22 Solution: Mutating Operations Server determines speculation success/failure –State at server never speculative Send server hypothesis speculation based on –List of speculations an operation depends on Requires server to track failed speculations –Would like to be convinced OK when server crashes! Requires in-order processing of messages

23 Group Commit Previously sequential ops now concurrent Sync ops usually committed to disk Speculator makes group commit possible write commit Client Server Updating different files… Can significantly improve disk throughput

24 Putting it all Together: SpecNFS Apply Speculator to an existing file system Modified NFSv3 in Linux 2.4 kernel –Same RPCs issued (but many now asynchronous) –SpecNFS has same consistency, safety as NFS –Getattr, lookup, access speculate if data in cache –Create, mkdir, commit, etc. always speculate Choose aliases for unknown file handles

25 Putting it all Together: BlueFS Design a new file system for Speculator –Single copy semantics –Synchronous I/O Each file, directory, etc. has version number –Incremented on each mutating op (e.g. on write) –Checked prior to all operations. –Many ops speculate and check version async

26 Outline Motivation Implementing speculation Multi-process speculation Using Speculator Evaluation

27 Apache Benchmark SpecNFS up to 14 times faster

28 Apache Benchmark

29 The Cost of Rollback (Q1) All files out of date SpecNFS up to 11x faster

30 Evaluation Other experiments you would like to see?

31 Evaluation Other experiments you would like to see? Impact of checkpoint size Resource constraints: Scalability –How many clients can server handle? –Is network a constraint? –Server must still handle poll requests, even if in bg Fault tolerance –Server now maintains state: per-client list of failed speculations

32 Conclusion Speculator greatly improves performance of existing distributed file systems –Especially in wide-area Speculator enables new file systems to be safe, consistent and fast How general do you think Speculator is? –Speculation clearly improves poll-based consistency (NFSv3, BlueFS) –How much improvement with callbacks and leases? (AFS, Coda, NFSv4)?

33 Group Commit & Sharing State

34 Related Work Chang & Gibson, Fraser & Chang –Speculative pre-fetching Time Warp –Virtual Time: distributed simulations Hardware branch prediction Transactional file systems