1 CMPT 431© A. Fedorova Google File System A real massive distributed file system Hundreds of servers and clients –The largest cluster has >1000 storage.

Slides:



Advertisements
Similar presentations
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP 2003 Presented by Wenhao Xu University of British Columbia.
Advertisements

Sanjay Ghemawat, Howard Gobioff and Shun-Tak Leung
The google file system Cs 595 Lecture 9.
THE GOOGLE FILE SYSTEM CS 595 LECTURE 8 3/2/2015.
G O O G L E F I L E S Y S T E M 陳 仕融 黃 振凱 林 佑恩 Z 1.
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Google Jaehyun Han 1.
The Google File System Authors : Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung Presentation by: Vijay Kumar Chalasani 1CS5204 – Operating Systems.
GFS: The Google File System Brad Karp UCL Computer Science CS Z03 / th October, 2006.
CMPT 401 Summer 2007 Dr. Alexandra Fedorova Lecture XIII: Replication-II.
The Google File System (GFS). Introduction Special Assumptions Consistency Model System Design System Interactions Fault Tolerance (Results)
Google File System 1Arun Sundaram – Operating Systems.
Lecture 6 – Google File System (GFS) CSE 490h – Introduction to Distributed Computing, Winter 2008 Except as otherwise noted, the content of this presentation.
CMPT Dr. Alexandra Fedorova Lecture XIII: Replication-II.
The Google File System. Why? Google has lots of data –Cannot fit in traditional file system –Spans hundreds (thousands) of servers connected to (tens.
The Google File System and Map Reduce. The Team Pat Crane Tyler Flaherty Paul Gibler Aaron Holroyd Katy Levinson Rob Martin Pat McAnneny Konstantin Naryshkin.
1 The File System Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung (Google)
CMPT 431 Dr. Alexandra Fedorova Lecture XIII: Replication-II.
GFS: The Google File System Michael Siegenthaler Cornell Computer Science CS th March 2009.
Large Scale Sharing GFS and PAST Mahesh Balakrishnan.
The Google File System.
Google File System.
Northwestern University 2007 Winter – EECS 443 Advanced Operating Systems The Google File System S. Ghemawat, H. Gobioff and S-T. Leung, The Google File.
Case Study - GFS.
Google Distributed System and Hadoop Lakshmi Thyagarajan.
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Google∗
1 The Google File System Reporter: You-Wei Zhang.
CSC 456 Operating Systems Seminar Presentation (11/13/2012) Leon Weingard, Liang Xin The Google File System.
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung
The Google File System Ghemawat, Gobioff, Leung via Kris Molendyke CSE498 WWW Search Engines LeHigh University.
The Google File System Presenter: Gladon Almeida Authors: Sanjay Ghemawat Howard Gobioff Shun-Tak Leung Year: OCT’2003 Google File System14/9/2013.
Outline for today  Administrative  Next week: Monday lecture, Friday discussion  Objective  Google File System  Paper: Award paper at SOSP in 2003.
MapReduce and GFS. Introduction r To understand Google’s file system let us look at the sort of processing that needs to be done r We will look at MapReduce.
CENG334 Introduction to Operating Systems Erol Sahin Dept of Computer Eng. Middle East Technical University Ankara, TURKEY Network File System Except as.
Presenters: Rezan Amiri Sahar Delroshan
The Google File System by S. Ghemawat, H. Gobioff, and S-T. Leung CSCI 485 lecture by Shahram Ghandeharizadeh Computer Science Department University of.
GFS : Google File System Ömer Faruk İnce Fatih University - Computer Engineering Cloud Computing
Eduardo Gutarra Velez. Outline Distributed Filesystems Motivation Google Filesystem Architecture The Metadata Consistency Model File Mutation.
GFS. Google r Servers are a mix of commodity machines and machines specifically designed for Google m Not necessarily the fastest m Purchases are based.
HADOOP DISTRIBUTED FILE SYSTEM HDFS Reliability Based on “The Hadoop Distributed File System” K. Shvachko et al., MSST 2010 Michael Tsitrin 26/05/13.
Presenter: Seikwon KAIST The Google File System 【 Ghemawat, Gobioff, Leung 】
Eduardo Gutarra Velez. Outline Distributed Filesystems Motivation Google Filesystem Architecture Chunkservers Master Consistency Model File Mutation Garbage.
Google File System Robert Nishihara. What is GFS? Distributed filesystem for large-scale distributed applications.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 24: GFS.
Google File System Sanjay Ghemwat, Howard Gobioff, Shun-Tak Leung Vijay Reddy Mara Radhika Malladi.
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Presenter: Chao-Han Tsai (Some slides adapted from the Google’s series lectures)
GFS: The Google File System Brad Karp UCL Computer Science CS GZ03 / M th October, 2008.
Dr. Zahoor Tanoli COMSATS Attock 1.  Motivation  Assumptions  Architecture  Implementation  Current Status  Measurements  Benefits/Limitations.
Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung
Cloud Computing Platform as a Service The Google Filesystem
Google File System.
GFS.
The Google File System (GFS)
Google Filesystem Some slides taken from Alan Sussman.
Google File System CSE 454 From paper by Ghemawat, Gobioff & Leung.
Gregory Kesden, CSE-291 (Storage Systems) Fall 2017
Gregory Kesden, CSE-291 (Cloud Computing) Fall 2016
The Google File System Sanjay Ghemawat, Howard Gobioff and Shun-Tak Leung Google Presented by Jiamin Huang EECS 582 – W16.
The Google File System (GFS)
Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung Google Vijay Kumar
The Google File System (GFS)
The Google File System (GFS)
The Google File System (GFS)
The Google File System (GFS)
Cloud Computing Storage Systems
THE GOOGLE FILE SYSTEM.
by Mikael Bjerga & Arne Lange
The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung Google SOSP’03, October 19–22, 2003, New York, USA Hyeon-Gyu Lee, and Yeong-Jae.
The Google File System (GFS)
Presentation transcript:

1 CMPT 431© A. Fedorova Google File System A real massive distributed file system Hundreds of servers and clients –The largest cluster has >1000 storage nodes, over 300 TB of disk storage, hundreds of clients Metadata replication Data replication Design driven by application workload and technological environment Avoided many of the difficulties traditionally associated with replication by designing for a specific use case

2 CMPT 431© A. Fedorova Specifics of the Google Environment FS is consists of hundreds of storage machines, built of inexpensive commodity parts Component failures are a norm –Application and OS bugs –Human errors –Hardware failures: disks, memory, network, power supplies Millions of files, each 100 MB or larger Multi-GB files are common Applications are written for GFS Allows co-design of the file system and applications

3 CMPT 431© A. Fedorova Specifics of the Google Workload Google applications: –Data analysis programs that scan through data repositories –Data streaming applications –Archiving –Indexing applications that produce (intermediate) search results Most files are mutated by appending new data – large sequential writes Random writes are very uncommon Files are written once, then they are only read Reads are sequential Large streaming reads and small random reads High bandwidth is more important than low latency

4 CMPT 431© A. Fedorova GFS Architecture

5 CMPT 431© A. Fedorova GFS Architecture (cont.) Single master Multiple chunk servers Multiple clients Each is a commodity Linux machine, a server is a user-level process Files are divided into chunks Each chunk has a handle (an ID assigned by the master) Each chunk is replicated (on three machines by default) Master stores metadata, manages chunks, does garbage collection, etc. What is metadata? Clients communicate with master for metadata operations, but with chunkservers for data operations No additional caching (besides the Linux in-memory buffer caching)

6 CMPT 431© A. Fedorova Client/GFS Interaction Client: –Takes file and offset –Translates it into the chunk index within the file –Sends request to master, containing file name and chunk index Master: –Replies with the corresponding chunk handle and location of the replicas (the master must know where the replicas are) Client: –Caches this information –Contacts one of the replicas (i.e., a chunkserver) for data

7 CMPT 431© A. Fedorova Master Stores metadata –The file and chunk namespaces –Mapping from files to chunks –Locations of each chunk’s replicas Interacts with clients Creates chunk replicas Orchestrates chunk modifications across multiple replicas –Ensures atomic concurrent appends –Locks concurrent operations Deletes old files (via garbage collection)

8 CMPT 431© A. Fedorova Metadata On Master Metadata – data about the data: –File names –Mapping of file names to chunk IDs –Chunk locations Metadata is kept in memory File names and chunk mappings are also kept persistent in an operation log Chunk locations are kept in memory only –They will be lost during the crash –The master asks chunk servers about their chunks at startup – builds a table of chunk locations

9 CMPT 431© A. Fedorova Why Keep Metadata In Memory? To keep master operations fast Master can periodically scan its internal state in the background, in order to implement: –Garbage collection –Re-replication (in case of chunk server failures) –Chunk migration (for load balancing) But the file system size is limited by the amount of memory on the master? –This has not been a problem for GFS – metadata is compact

10 CMPT 431© A. Fedorova Why Not Keep Chunk Locations Persistent? Chunk location – which chunk server has a replica of a given chunk Master polls chunk servers for that information on startup Thereafter, master keeps itself up-to-date: –It controls all initial chunk placement, migration and re-replication –It monitors chunkserver status with regular HeartBeat messages Motivation: simplicity Eliminates the need to keep master and chunkservers synchronized Synchronization would be needed when chunkservers: –Join and leave the cluster –Change names –Fail and restart

11 CMPT 431© A. Fedorova Operation Log Historical record of metadata changes Maintains logical order of concurrent operations Log is used for recovery – the master replays it in the event of failures Master periodically checkpoints the log Checkpoint is a B-tree data structure –Can be loaded into memory –Used for namespace lookup without extra parsing Checkpoint can be done on the background

12 CMPT 431© A. Fedorova Updates of Replicated Data (cont.) 1.Client asks master for replica locations 2.Master responds 3.Client pushes data to all replicas; replicas store it in a buffer cache 4.Client sends a write request to the primary (identifying the data that had been pushed) 5.Primary forwards request to the secondaries (identifies the order) 6.The secondaries respond to the primary 7.The primary responds to the client

13 CMPT 431© A. Fedorova Failure Handling During Updates If a write fails at the primary: –The primary may report failure to the client – the client will retry –If the primary does not respond, the client retries from Step 1 by contacting the master If a write succeeds at the primary, but fails at several replicas –The client retries several times (Steps 3-7)

14 CMPT 431© A. Fedorova Primary Replica in GFS Each mutation (modification) is performed at all the replicas Modifications are applied in the same order across all replicas Master grants a chunk lease to one replica – i.e., the primary The primary picks a serial order for all mutations to the chunk The client pushes data to all replicas The primary tells the replicas in which order they should apply modifications

15 CMPT 431© A. Fedorova Data Consistency in GFS Loose data consistency – applications are designed for it Applications may see inconsistent data – data is different on different replicas Applications may see data from partially completed writes – undefined file region On successful modification the file region is consistent Replicas are not guaranteed to be bytewise identical (we’ll see why later, and how clients deal with this)

16 CMPT 431© A. Fedorova Implications of Loose Data Consistency For Applications Applications are designed to handle loose data consistency Example 1: a file is generated from beginning to end –An application creates a file with a temporary name –Atomically renames the file –May periodically checkpoint the file while it is written –File is written via appends – more resilient to failures than random writes Example 2: producer-consumer file –Many writers concurrently append to one file (for merged results) –Each record is self-validating (contains a checksum) –Client filters out padding and duplicate records

17 CMPT 431© A. Fedorova Atomic Record Appends Atomic append is a write where –The primary chooses the offset where the append happens –Returns the offset to the client This way GFS can decide on serial order of concurrent appends without client synchronization If an append fails at some replicas – the client retries As a result, the file may contain multiple copies of the same record, plus replicas may be bytewise different But after a successful update all replicas will be defined – they will all have the data written by the client at the same offset

18 CMPT 431© A. Fedorova Non-Identical Replicas Because of failed and retried record appends, replicas may be non- identical bytewise Some replicas may have duplicate records (because of failed and retried appends) Some replicas may have padded file space (empty space filled with junk) – if the master chooses record offset higher than the first available offset at a replica Clients must deal with it: they write self-identifying records so they can distinguish valid data from junk If clients cannot tolerate duplicates, they must insert version numbers in records GFS pushes complexity to the client; without this, complex failure recovery scheme would need to be in place

19 CMPT 431© A. Fedorova Data Flow Data flow is decoupled from control flow Data is pushed linearly across all chunkservers in a pipelined fashion (not necessarily from client to primary and from primary to secondary) Client forwards data to the closest replica; that replica forwards to the next closest replica, etc. Pipelined fashion: while the data is incoming, the server begins forwarding it to the next replica This design ensures good network utilization

20 CMPT 431© A. Fedorova Load Balancing Goals: –Maximize data availability and reliability –Maximize network bandwidth utilization Google infrastructure: –Cluster consists of hundreds of racks –Each rack has a dozen machines –Racks are connected by network switches –A rack is on a single power circuit Must balance load across machines and across racks

21 CMPT 431© A. Fedorova Fault Tolerance Fast recovery –No distinction between normal and abnormal shutdown –Servers are routinely restarted by “killing” a server process –Servers are designed for fast recovery – all state can be recovered from the log Chunk replication Master replication Data integrity Diagnostic tools

22 CMPT 431© A. Fedorova Chunk Replication Each chunk is replicated on multiple chunkservers on different racks Users can specify different replication levels for different parts of the file namespace (default is 3) The master clones existing replicas as needed to keep each chunk fully replicated

23 CMPT 431© A. Fedorova Single Master Simplifies design Master can make sophisticated load-balancing decisions involving chunk placement using global knowledge To prevent master from becoming the bottleneck –Clients communicate with master only for metadata –Master keeps metadata in memory –Clients cache metadata –File data is transferred from chunkservers

24 CMPT 431© A. Fedorova Master Replication Master state is replicated on multiple machines, so a new server can become master if the old master fails What is replicated: operation logs and checkpoints A modification is considered successful only after it has been logged on all master replicas A single master is in charge; if it fails, it restarts almost instantaneously If a machine fails and the master cannot restart itself, a failure detector outside GFS starts a new master with a replicated operation log (no master election) Master replicas are master’s shadows – they operate similarly to the master w.r.t. updating the log, the in-memory metadata, polling the chunkservers

25 CMPT 431© A. Fedorova Detecting Stale Replicas A replica may become stale if it misses a modification while the chunkserver was down Each chunk has a version number, version numbers are used to detect stale replicas A stale replica will never be given to the client as a chunk location, and will never participate in mutation A client may read from a stale replica (because the client caches metadata) –But this window is limited, because cache entries time out

26 CMPT 431© A. Fedorova GFS Summary Real replicated file system Uses commodity hardware – hundreds of commodity PCs and disks Two levels of replication: –Metadata is replicated via replicated masters –Data is replicated on replicated chunkservers Designed for specific use case – for Google applications –And applications are designed for GFS This is why it is simple and it actually works