Professional Documents
Culture Documents
Google File System
Google File System
Google File System
Ravi Prakash
Overview
• Usual operations like file create, delete, open, close, read and write
• Snapshot: copy file or directory tree
• Record append:
• Useful for multi-way merge without locking
• Producer-consumer queues
Source: Dean & Ghemawat, “Mapreduce: Simplified Data Processing on Large Clusters,” OSDI 2004
Ravi Prakash, U.T. Dallas 5
Architecture
Source: Ghemavat et al., “The Google File System,” ACM SOSP 2003.
Ravi Prakash, U.T. Dallas 7
Single Master: not a bottleneck
• Chunk replication
• Master operation log and checkpoints replicated on multiple
machines
• Failed master can be restarted immediately
• On master’s machine or disk fails: new master started on another
machine
• Clients use canonical name for master which is a DNS alias
• Shadow masters: provide read-only access to clients when primary
master is down
Source: Ghemavat et al., “The Google File System,” ACM SOSP 2003.
• Copy-on-write
• Master revokes all leases on chunks of file to snapshot
• Master takes snapshot: logs operation to disk
• Duplicates corresponding metadata to in-memory state
• Snapshot and source file point to same chunks
• Master: on client write to chunk C after snapshot:
• Picks new chunkhandle C’
• Asks all chunkservers that contain C to create a copy C’
• Grants one of them primary lease on C’
• Directs client writes to C’
Ravi Prakash, U.T. Dallas 15
Namespace Management and Locking