23
Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP ’03 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 SOSP ’03

  • Upload
    cleo

  • View
    45

  • Download
    0

Embed Size (px)

DESCRIPTION

Sanjay Ghemawat , Howard Gobioff , and Shun- Tak Leung SOSP ’03. The Google File System. CSC 456 Operating Systems Seminar Presentation ( 11/13/2012) Leon Weingard , Liang Xin. Outline. 1. Background 2. Distributed File Systems Overview 3. GFS Architecture 4. Fault Tolerance. - PowerPoint PPT Presentation

Citation preview

Page 1: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP ’03

CSC 456 Operating Systems Seminar Presentation (11/13/2012)

Leon Weingard, Liang Xin

The Google File System

Page 2: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Outline1. Background2. Distributed File Systems Overview3. GFS Architecture4. Fault Tolerance

Page 3: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Background - Introduction

• Google – search engine.• Applications process lots of data.• Need good file system.• Solution: Google File System (GFS).

IntroductionThe largest cluster to date provides hundreds of terabytes of storage across thousands of disks on over a thousand machines, and it is concurrently accessed by hundreds of clients.

Page 4: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Background - Motivation

Goal:

Large, distributed, highly fault tolerant file system

1. Fault-tolerance and auto-recovery need to be built into the system.2. Standard I/O assumptions (e.g. block size) have to be re-examined.3. Record appends are the prevalent form of writing.4. Google applications and GFS should be co-designed.

Page 5: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Distributed File Systems

Performance Measurement of a DFS depends on :

• The amount of time needed to satisfy service requests.• The multiplicity and dispersion of its servers and storage devices

should be made invisible.

In computing, a distributed file system is any file system that allows access to files from multiple hosts sharing via a computer network.

Page 6: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Network File System (NFS)

Network File System (NFS) is a distributed file system protocol originally developed by

Sun Microsystems in 1984.

• Architecture:– NFS as collection of protocols the provide clients with a distributed file system.– Remote Access Model (as opposed to Upload/Download Model)– Every machine can be both a client and a server.– Servers export directories for access by remote clients – Clients access exported directories by mounting them remotely.

• Protocols:– mounting – file and directory access

Workgroup network file service Any Unix machine can be a server (easily) Machines can be both client & server

My files on my disk, your files on your disk Everybody in group can access all files

Serious trust, scaling problems

Page 7: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

The Andrew File System (AFS)The Andrew File System was introduced by researchers at Carnegie-Mellon University in the 1980’s.The basic tenets of all versions of AFS is whole-file caching on the local disk of the client machine that is accessing a file.

Goal: Scalability

Features:

Uniform name space Location independent file sharing Client side caching with cache consistency Secure authentication by Kerberos Scalability “No write conflict” model only partial success

All the files in AFS are distributed among the servers. The set of files in one server is referred to as a volume. In case a request can not be satisfied from this set of files, the vice server informs the client where it can find the required file.

Page 8: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Differences between AFS and NFS

NFSDistributed with OSclient side cache is optionalclear-text passwords on netDoes not scale wellUses standard UNIX

permissionsNot secureMore reliable than AFS?

AFSAdd-in productclient side caching is standardauthenticated challenge on netscales wellUses Access Control Lists

(ACL’s)More secure than NFSLess reliable than NFS?

Page 9: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

GFS ArchitectureIn the GFS:

A master process maintains the metadata.

A lower layer (i.e. a set of chunkservers) stores the data in units called “chunks”.

Page 10: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

GFS ArchitectureWhat is a master?

A single process running on a separate machine.

• Stores all metadata• File namespace• File to chunk mappings• Chunk location information• Access control information• Chunk version numbers…

Page 11: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

GFS Architecture

What is a chunk?

Analogous to block, except larger.Size: 64 MB!Stored on chunkserver as fileChunk handle (~ chunk file name) used to reference chunk.Chunk replicated across multiple chunkserversNote: There are hundreds of chunkservers in aGFS cluster distributed over multiple racks.

Page 12: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Read Algorithm

Page 13: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Read Algorithm

Page 14: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Primary and Leases Master grants a chunk lease to one replica. Replica is called the primary. Primary picks an order for mutations to the chunk. Leases expire in 60 seconds. Primary can request an extension if chunk is being mutated. Master can revoke a lease before it expires. Master can assign a new lease if it loses contact with the primary.

Page 15: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Write Algorithm

Page 16: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Write Algorithm

Page 17: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Write Algorithm

Page 18: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Write Algorithm

Page 19: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Fault Tolerance: Chunks

Fast Recovery: master and chunkservers are designed to restartand restore state in a few seconds.No persistent log of chunk location in the master.Syncing chunkservers and master is unnecessary under this model.Alternate view: Chunkservers hold final say on what chunks it has on its disk.Chunk Replication: across multiple machines, across multipleracks.

Page 20: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Fault Tolerance: Master

Data structures are kept in memory, must be able to recover from system failure.Operation Log: Log of all changes made to metadata.Log records batched before flushed to disk.Checkpoints of state when log grows to big.Log and latest checkpoint used to recover state.Log and checkpoints replicated on multiple machines.Master state is replicated on multiple machines.“Shadow” masters for reading data if “real” master is down.Data integrity:Each chunk has an associated checksum.

Page 21: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

summaryDistributed File Systems• NFS• AFSDifferences between AFS and NFS GFS ArchitectureSingle master with metadata and many chunk servers.GFS designed to be fault tolerant. Master must be able to recover. chunk locations not persistentMost operations are reads and appends so record append added so append operations can be done efficiently

Page 22: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

(These slides modified from Alex Moshchuk, University of Washington – used during Google lecture series.)

References 1. The Google File System, SOSP ’03 2. Presentation slide of GFS in SOSP ’03 3. www.delmarlearning.com/companions/content/.../Ch18.ppt 4. lyle.smu.edu/cse/8343/fall_2003/.../DFS_Presentation.ppt

Page 23: Sanjay  Ghemawat , Howard  Gobioff , and Shun- Tak  Leung  SOSP  ’03

Thank you!