1 / 19

The Google File System

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 Elliot Pennington Chris Scalabrini. System Expectations. System failures are the norm

sherry
Download Presentation

The Google File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Google File System and Map Reduce

  2. The Team • Pat Crane • Tyler Flaherty • Paul Gibler • Aaron Holroyd • Katy Levinson • Rob Martin • Pat McAnneny • Konstantin Naryshkin • Elliot Pennington • Chris Scalabrini

  3. System Expectations • System failures are the norm • System will store some large (multi-gigabyte) files • Expected Reads • Large Streaming (over 1MB) • Small Random (a few KB out of someplace random) • Expected Writes • Long Appending Writes • Multiple Users Appending at Once • Middle of File Seldom Modified • High Bandwidth > Low Latency

  4. The Basic Layout • One Master Server • A bunch of Chunk Servers • Clients

  5. "Chunks" • Chunks are pieces of data • Identified by "chunk handle" • Replicated across multiple Chunkservers to prevent loss • If number is low Master will reallocate more replicas • Reallocation prioritized • 64MB • Why so big? • Leaves the Master alone for longer • Less metadata on the master because there are less chunks • Drawbacks • Many clients might want same chunk • Doesn't happen much • Store as plain Linux files

  6. One master server to rule them all • Makes it simple • Big precautions needed to prevent Master from being a bottleneck • Maintains all system Metadata • File and Chunk namespaces • Access control information • Mapping from files to Chunks • Locations for the replicas of every Chunk • Also controls • Chunk lease management • Garbage collection • HeartBeat The Master Server

  7. The Chunkserver • Commodity computers running Linux • Failures expected • Holds Chunks

  8. The Client • Responsibilities • Interact with Master to find where to read/write • Interact with Chunkservers to read/write • Requests several chunks at once to reduce load on Master • All data-bearing messages go directly to and from chunkservers • The client does not cache data it reads or writes (nor does the chunkserver) • Files being read are too big for it to be useful • Now no worries about cache coherence

  9. All Metadata is kept in memory of the Master • A log is kept of all changes, kept on Master disk and replicated on remote systems • Master does not store persistent chunk data • Queries all chunk servers at startup to build its Metadata table • Queries new Chunkservers as they join the cluster • Master keeps itself up to date, since it controls all chunk placement • Also periodically scans background (HeartBeat) • Garbage Collection • Re-replication (chunkserver failure) • Chunk Migration Metadata Storage and Updates

  10. Operation Log • Only persistent record of Metadata • Time line to define order of concurrent operations • Everything uniquely identified in this log • Replicated across many Chunkservers • No changes visible to client until new changes replicated • Batches several files together before flushing • Master uses the log file to recover its file system on startup

  11. Log Checkpoints • Taken when log grows to a certain size • System recovers by playing newest records • Written in tree form to easily read back into memory • Take a long time to do • Made to not interfere with incoming requests • Done in a separate thread • When completed, written both locally and remotely

  12. Leases and Mutations • Client asks master which Chunkserver holds the lease on the chunk (chooses one if no lease) • Master tells Clients • which Chunkserver to contact • locations of replicas and secondary replicas • C3lient caches this • After all the replicas acknowledge data sent write request to primary • Primary forwards all data to secondary replicas • Secondaries write • Primary replies to client and reports errors

  13. Fully utilize each machine's bandwidth Data pushed linearly along chain Full outbound bandwidth used to transfer data as fast as possible Avoid network bottlenecks Foward data to "closest" machine  "Distances" can be accurately estimated from IP addresses Minimize Latency to push through all the data Pipeline data transfer over TCP connections Once a chunkserver receives some data, it starts forwarding immediately. Data Flow

  14. Snapshots • Copy of file or directory tree • Process • Revoke outstanding leases • Logs operation to disk • Makes a copy • On the same Chunkserver • Has everybody refer to that • Nobody can tell the difference!

  15. Namespace Management and Locking • Many operations take a long time • Don't want to make everybody wait • Locking specific areas of namespace • Read lock on directory - prevents deleting, renaming, and snapshotting • Write lock on file name - prevents the same file from being written to twice at the same time • Permits concurrent edits to same directory

  16. Garbage Collection (1/2) • Garbage collection used rather than immediate deletion • Advantages • Simple, Reliable,Chunkcreation, Uniform • Note that files are rarely deleted • Space is NOT reused right away! • Steps to perform "Garbage Collection" • System logs deletion • File is hidden and name is changed • File has its time stamp set - this is used for removal • During regular scan deletes file if timestamp minus current time is older than a specified interval • Interval time is configurable • 3 days is cited in paper

  17. Garbage Collection (2/2) • Also deletes "orphaned chunks" in scans • An "orphaned chunk" is a chunk that is not reachable from any file • Metadata for this "orphaned chunk" is removed as well • When a HeartBeat message is sent from master to chunkservers... • Each chunkserver reports a subset of the chunks it has • Master tells the chunkserver the identity of all chunks in the subset that is contains no metadata for. • Chunkserver garbage collects those files. • Stale Replica Detection • Each chunk contains a"chunk version number" (CVN) • Master tells each chunkserver the up-to-date CVN • If the CVN is out of date, chunkserver updates chunk

  18. Fault Tolerance and Diagnostics • Fast recovery with logfiles and checkpoints • GFS can easily detect out-of-date or bad chunks, and then fix them • Chunk replication • Master coordinates data movement • If Master fails • Outside system tells it to make a new Master • Shadow • Provide read-only in event of total failure • Updates itself just like a normal master • Chunks have checksums • Diagnostics done mostly with logs

  19. Questions? Thank You!

More Related