Case Study - GFS.

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.
NFS, AFS, GFS Yunji Zhong. Distributed File Systems Support access to files on remote servers Must support concurrency – Make varying guarantees about.
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.
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)
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.
NFS. The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs. The implementation.
CSE 451: Operating Systems Spring 2012 Module 23 Distributed File Systems Ed Lazowska Allen Center 570.
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.
File Systems (2). Readings r Silbershatz et al: 11.8.
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.
Homework 1 Installing the open source cloud Eucalyptus Groups Will need two machines – machine to help with installation and machine on which to install.
The Google File System Presenter: Gladon Almeida Authors: Sanjay Ghemawat Howard Gobioff Shun-Tak Leung Year: OCT’2003 Google File System14/9/2013.
Data in the Cloud – I Parallel Databases The Google File System Parallel File Systems.
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.
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.
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.
Sanjay Ghemawat, Howard Gobioff, Shun-Tak Leung
Cloud Computing Platform as a Service The Google Filesystem
Google File System.
File System Implementation
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.
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)
The Google File System (GFS)
CSE 451: Operating Systems Autumn Module 22 Distributed File Systems
The Google File System (GFS)
The Google File System (GFS)
CSE 451: Operating Systems Distributed File Systems
The Google File System (GFS)
THE GOOGLE FILE SYSTEM.
by Mikael Bjerga & Arne Lange
CSE 451: Operating Systems Autumn Module 22 Distributed File Systems
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:

Case Study - GFS

Outline NFS Google File System (GFS)

Network File Systems I’m on a Unix machine in MC 325; I go to another machine in MC 325 I see the same files Why? This is because you are using a networked file system Let’s take a quick look at NFS

The Sun Network File System (NFS) An implementation and a specification of a software system for accessing remote files across LANs (or WANs) The implementation is part of the Solaris and SunOS operating systems running on Sun workstations using an unreliable datagram protocol (UDP/IP protocol) and Ethernet

NFS You can think of a networked file system as a hierarchical tree structure The leaf nodes represent directories on actual file systems (local to a machine) Directories can be mounted which means that they can appear in the tree structure The directories can be on remote machines The remote machines may use a different OS then the client machine

NFS Support access to files on remote servers Must support concurrency Make varying guarantees about locking, who “wins” with concurrent writes, etc... Must gracefully handle dropped connections

NFS An NFS file server runs on a machine (which may have large disks) that has a local file system. An NFS client runs on an arbitrary machine and access the files on machines that run NFS servers.

NFS When an application program calls open to obtain access to a file it is making a call to the NFS client If the path refers to a local file, the system uses the computer’s standard file system software to access the file If the path refers to a remote file, the system uses NFS client software to access the remote file through the NFS server

NFS The NFS server handles incoming client requests These requests are mapped to local file system operations

NFS Protocol Primarily stateless Stateless means that servers do not maintain information about their clients from one access to another All requests must include a unique file identifier, absolute offset inside the file etc; Operated over UDP; did not use TCP streams

NFS Files are assumed to be shared by multiple clients Synchronization is needed Problem There is a performance problem if every time a client wants to access a file it has to go to the server Thus clients are allowed to keep a local copy of the file while they are reading and writing its contents This is referred to as caching

NFS UNIX Semantics In a centralized systems this is easy to implement When a read follows a write the read returns the value just written When two writes happen in quick succession followed by a read, the value read is the value stored by the last write In a centralized systems this is easy to implement If there is no caching in NFS then this is also easy to implement

NFS NFS allows clients to cache for performance reasons How then is UNIX semantics provided? Approach 1: Propagate all changes to cached files back to the server as they happen Not efficient Lots of network traffic

NFS Approach 2: Change the semantics NFS implements session semantics Changes to an open file are initially visible only to the process that modified the file Implementation When a process closes the file, it sends a copy to the NFS server so that subsequent reads get the new value What if two clients are caching and modifying the file at the same time?

NFS and Replication Replication is through caching Can have multiple caches of a file The “master” has the copy that was last written to it

Outline NFS Google File System (GFS)

Motivation Google needed a good distributed file system Redundant storage of massive amounts of data on cheap and unreliable computers Why not use an existing file system? Google’s problems are different from anyone else’s Different workload and design priorities GFS is designed for Google apps and workloads Google apps are designed for GFS

Google Workload Characteristics 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 sustained throughput favoured over low latency

Google Workload Characteristics Google applications: Data analysis programs that scan through data repositories Data streaming applications Archiving Applications producing (intermediate) search results

Assumptions High component failure rates “Modest” number of HUGE files Inexpensive commodity components fail all the time “Modest” number of HUGE files Just a few million Each is 100MB or larger; multi-GB files typical

Files and Chunks Files are divided into fixed-size chunks Each chunk has an identifier, chunk handle, assigned by the master at the time of chunk creation Each chunk is replicated 3 times Chunk size is of fixed size (64MB)

GFS Architecture Single master for a cluster

Master Stores metadata for files Interacts with clients Mapping from files to chunks Locations of each chunk’s replicas (referred to as chunk locations) Interacts with clients Creates chunk replicas Maintains an operational log Records changes to metadata Checkpoints log Log can be used to recover from failures

Chunkservers Store chunks on local disks as Linux files Read/write chunk data specified by a chunk handle and byte range

Why Keep Metadata In Memory? To keep master operations fast Master can periodically scan its internal state in the background, in order to implement: Re-replication (in case of chunk server failures) Chunk migration (for load balancing)

Master/Chunkserver Interaction Master and chunkserver communicate regularly to obtain state Is chunkserver down? Use Heartbeat messages Is there a disk failure on chunkserver? Which chunk replicas does chunkserver store? Useful when a Master goes down Master sends instructions to chunkserver Delete existing chunk Create new chunk

Master/Chunkserver Interaction Master does not need to keep chunk locations persistent since is periodically polls chunkservers for that information Master controls initial chunk placement, migration and re-replication

Read Algorithm Application originates the read request GFS client translates the request to file name and chunk index and sends to master Master responds with chunk handle and replica locations (chunkservers where the replicas are stored) Application 2 1 (file name, byte offset) file name, chunk index Master GFS Client Chunk handle, replica locations 3

Read Algorithm Client picks a location and sends the (chunk handle, byte range) request to the location Chunkserver sends requested data to the client Client forwards the data to the applicaiton Chunkserver Application 4 Chunkserver 6 (data from file) Chunk handle, byte range Chunkserver GFS Client Data from file 5

Read The client caches the chunk handle and the replication locations The master does not have to be consulted for each read. The client then sends a request to one of the replicas most likely the closest one Note: Further reads of the same chunk require no more client-master interaction

Chunk Size Chunk size is 64 MB Advantages Larger than typical file system block sizes Advantages Reduces a client’s need to interact with the master Reduces the size of the metadata stored on the master

Chunk Size Disadvantages A small file consists of a small number of chunks The chunkservers storing these chunks may become hot spots if many clients are accessing the same file Does not occur very much in practice

Write Algorithm Application originates the write request GFS client translates the request to file name and chunk index and sends to master Master responds with chunk handle and replica locations ( primary and secondary) Application 2 1 (file name, byte offset) file name, chunk index Master GFS Client Chunk handle, primary and secondary replica locations 3

Write Algorithm Client pushes write data to all locations. Data is stored in a chunkserver’s internal buffers Typically data is sent along a chain of chunk servers in a pipelined fashion Primary buffer Chunkserver Application 4 Secondary Chunkserver buffer Send Data Secondary Send Data GFS Client Chunkserver buffer Send Data

Write Algorithm Client sends write command to primary after receiving an acknowledgement from each replica Primary 5 buffer Chunkserver Application Write command Secondary Chunkserver buffer Secondary GFS Client Chunkserver buffer

Write Algorithm Primary determines serial order for data instances (which could come from multiple clients) stored in buffer and writes the instances in that order to the chunk determine serial order 6 Primary buffer Chunkserver Application Secondary Chunkserver buffer Secondary GFS Client Chunkserver buffer

Write Algorithm Primary send the serial order to the secondary replica and tells them to write send serial order 7 Primary buffer Chunkserver Application Secondary Chunkserver buffer Secondary GFS Client Chunkserver buffer

Write Algorithm Secondary replicas respond to the primary Primary respond back to the client If write fails at one of the chunkservers, client is informed and retries the write

Failure Handling DuringWrites 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

Atomic Record Appends The client pushes the data (a record) to all replicas of the last chunk of the file Sends request to primary Case 1: Record fits within the maximum size of chunk Primary appends data to its replica Primary tells the secondaries to write the data at the exact offset

Atomic Record Appends Case 2: What if appending the record would cause the chunk to exceed the maximum size Pad the chunk to the maximum size Tell the primaries to do the same thing Reply to client indicating that the operation should be retried on the next chunk

Data Consistency in GFS Loose data consistency – applications are designed for it Some replicas may have duplicate records (because of failed and retried appends) Applications may see inconsistent data – data is different on different replicas

Data Consistency in GFS Clients must deal with it 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

Summary We have presented two case studies related to file systems