SlideShare a Scribd company logo
Distributed Computing Seminar Lecture 3: Distributed Filesystems Christophe Bisciglia, Aaron Kimball, & Sierra Michels-Slettvet Google, Inc.  Summer 2007 Except as otherwise noted, the content of this presentation is © Copyright University of Washington and licensed under the Creative Commons Attribution 2.5 License.
Outline Filesystems Overview NFS (Network File System)  GFS (Google File System)
Filesystems Overview System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called “files” Addressable by a  filename  (“foo.txt”) Usually supports hierarchical nesting (directories) A file  path  joins file & directory names into a  relative  or  absolute  address to identify a file (“/home/aaron/foo.txt”)
Distributed Filesystems 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 Can offer support for replication and local caching Different implementations sit in different places on complexity/feature scale
NFS  First developed in 1980s by Sun Presented with standard UNIX FS interface Network drives are  mounted  into local directory hierarchy
NFS Protocol Initially completely stateless Operated over UDP; did not use TCP streams File locking, etc., implemented in higher-level protocols Modern implementations use TCP/IP & stateful protocols
Server-side Implementation NFS defines a  virtual file system Does not actually manage local disk layout on server Server instantiates NFS volume on top of local file system Local hard drives managed by concrete file systems (EXT, ReiserFS, ...) Other networked FS's mounted in by...?
NFS Locking NFS v4 supports stateful locking of files Clients inform server of intent to lock Server can notify clients of outstanding lock requests Locking is lease-based: clients must continually renew locks before a timeout Loss of contact with server abandons locks
NFS Client Caching NFS Clients are allowed to cache copies of remote files for subsequent accesses Supports  close-to-open  cache consistency When client A closes a file, its contents are synchronized with the master, and timestamp is changed When client B opens the file, it checks that local timestamp agrees with server timestamp. If not, it discards local copy. Concurrent reader/writers must use flags to disable caching
NFS: Tradeoffs NFS Volume managed by single server Higher load on central server Simplifies coherency protocols Full POSIX system means it “drops in” very easily, but isn’t “great” for any specific need
The Google File System Sanjay Ghemawat, Howard Gobioff,  and Shun-Tak Leung SOSP 2003 (These slides by Alex Moshchuk, University of Washington – used with permission)
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
Assumptions High component failure rates 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 are write-once, mostly appended to Perhaps concurrently Large streaming reads High sustained throughput favored over low latency
GFS Design Decisions Files stored as chunks Fixed size (64MB) Reliability through replication Each chunk replicated across 3+  chunkservers Single master to coordinate access, keep metadata Simple centralized management No data caching Little benefit due to large data sets, streaming reads Familiar interface, but customize the API Simplify the problem; focus on Google apps Add  snapshot  and  record append  operations
GFS Architecture Single master Mutiple chunkservers … Can anyone see a potential weakness in this design?
Single master From distributed systems we know this is a: Single point of failure Scalability bottleneck GFS solutions: Shadow masters Minimize master involvement never move data through it, use only for metadata and cache metadata at clients large chunk size master delegates authority to primary replicas in data mutations (chunk leases) Simple, and good enough!
Metadata (1/2) Global metadata is stored on the master File and chunk namespaces Mapping from files to chunks Locations of each chunk’s replicas All in memory (64 bytes / chunk) Fast Easily accessible
Metadata (2/2) Master has an  operation log  for persistent logging of critical metadata updates persistent on local disk replicated checkpoints for faster recovery
Mutations Mutation = write or append must be done for all replicas Goal: minimize master involvement Lease mechanism: master picks one replica as primary; gives it a “lease”  for mutations primary defines a serial  order of mutations all replicas follow this order Data flow decoupled from control flow
Atomic record append Client specifies data GFS appends it to the file atomically at least once GFS picks the offset works for concurrent writers Used heavily by Google apps e.g., for files that serve as multiple-producer/single-consumer queues
Relaxed consistency model (1/2) “ Consistent” = all replicas have the same value “ Defined” = replica reflects the mutation, consistent  Some properties: concurrent writes leave region consistent, but possibly undefined  failed writes leave the region inconsistent Some work has moved into the applications: e.g., self-validating, self-identifying records
Relaxed consistency model (2/2) Simple, efficient Google apps can live with it what about other apps? Namespace updates atomic and serializable
Master’s responsibilities (1/2) Metadata storage Namespace management/locking Periodic communication with chunkservers give instructions, collect state, track cluster health Chunk creation, re-replication, rebalancing balance space utilization and access speed spread replicas across racks to reduce correlated failures re-replicate data if redundancy falls below threshold rebalance data to smooth out storage and request load
Master’s responsibilities (2/2) Garbage Collection simpler, more reliable than traditional file delete master logs the deletion, renames the file to a hidden name lazily garbage collects hidden files Stale replica deletion detect “stale” replicas using chunk version numbers
Fault Tolerance High availability fast recovery master and chunkservers restartable in a few seconds chunk replication default: 3 replicas.  shadow masters Data integrity checksum every 64KB block in each chunk
Performance
Deployment in Google Many GFS clusters hundreds/thousands of storage nodes each Managing petabytes of data GFS is under BigTable, etc.
Conclusion GFS demonstrates how to support large-scale processing workloads on commodity hardware design to tolerate frequent component failures optimize for huge files that are mostly appended and read feel free to relax and extend FS interface as required go for simple solutions (e.g., single master) GFS has met Google’s storage needs… it must be good!
Next Time... Start learning about algorithms for distributed computation Clustering Algorithms

More Related Content

What's hot (19)

PDF
dotCloud (now Docker) Paas under the_hood
Susan Wu
 
PDF
20150207 howes-gpgpu8-dark secrets
mistercteam
 
PPT
.ppt
webhostingguy
 
PPT
Interprocess communication (IPC) IN O.S
Hussain Ala'a Alkabi
 
PPT
IPC
Ramasubbu .P
 
PPTX
Distributed Shared Memory Systems
Arush Nagpal
 
PPTX
PThreads Vs Win32 Threads
Robert Sayegh
 
PDF
ITFT_Inter process communication
Sneh Prabha
 
PDF
WiMAX implementation in ns3
Mustafa Khaleel
 
PPTX
IPC
Mohit Joshi
 
PDF
NS-3
bobbynkumar
 
PDF
Porting dmtcp mac_slides
yuliang_neu
 
PDF
Capturando pacotes de rede no kernelspace
Campus Party Brasil
 
PPTX
Inter Process Communication
Adeel Rasheed
 
PDF
INET for Starters
Fayruz Rahma
 
PPT
Multiple processor systems
jeetesh036
 
PPTX
Threads (operating System)
Prakhar Maurya
 
PPT
Chap 4
suks_87
 
PPTX
Lecture 5 inter process communication
Kumbirai Junior Muzavazi
 
dotCloud (now Docker) Paas under the_hood
Susan Wu
 
20150207 howes-gpgpu8-dark secrets
mistercteam
 
Interprocess communication (IPC) IN O.S
Hussain Ala'a Alkabi
 
Distributed Shared Memory Systems
Arush Nagpal
 
PThreads Vs Win32 Threads
Robert Sayegh
 
ITFT_Inter process communication
Sneh Prabha
 
WiMAX implementation in ns3
Mustafa Khaleel
 
Porting dmtcp mac_slides
yuliang_neu
 
Capturando pacotes de rede no kernelspace
Campus Party Brasil
 
Inter Process Communication
Adeel Rasheed
 
INET for Starters
Fayruz Rahma
 
Multiple processor systems
jeetesh036
 
Threads (operating System)
Prakhar Maurya
 
Chap 4
suks_87
 
Lecture 5 inter process communication
Kumbirai Junior Muzavazi
 

Similar to Distributed computing seminar lecture 3 - distributed file systems (20)

PPT
Distributed file systems (from Google)
Sri Prasanna
 
PPT
Distributed file systems
Sri Prasanna
 
PPT
tittle
uvolodia
 
PPT
Distributed File Systems
awesomesos
 
ODP
Distributed File System
Ntu
 
PPTX
GFS xouzfz h ghdzg ix booc ug nog ghzg m
gagaco5776
 
PPTX
Google
rpaikrao
 
PPT
Dfs (Distributed computing)
Sri Prasanna
 
PDF
CS9222 ADVANCED OPERATING SYSTEMS
Kathirvel Ayyaswamy
 
PPT
Gfs介绍
yiditushe
 
POT
Kosmos Filesystem
elliando dias
 
PPTX
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
PPT
Distributed File System.ppt
KhawajaWaqasRaheel
 
PPT
Distributed Filesystems Review
Schubert Zhang
 
PPT
Advance google file system
Lalit Rastogi
 
PPTX
Hadoop
Esraa El Ghoul
 
PPT
Chapter 17 - Distributed File Systems
Wayne Jones Jnr
 
PPT
OSCh16
Joe Christensen
 
PPT
Ch16 OS
C.U
 
Distributed file systems (from Google)
Sri Prasanna
 
Distributed file systems
Sri Prasanna
 
tittle
uvolodia
 
Distributed File Systems
awesomesos
 
Distributed File System
Ntu
 
GFS xouzfz h ghdzg ix booc ug nog ghzg m
gagaco5776
 
Google
rpaikrao
 
Dfs (Distributed computing)
Sri Prasanna
 
CS9222 ADVANCED OPERATING SYSTEMS
Kathirvel Ayyaswamy
 
Gfs介绍
yiditushe
 
Kosmos Filesystem
elliando dias
 
GOOGLE FILE SYSTEM
JYoTHiSH o.s
 
Distributed File System.ppt
KhawajaWaqasRaheel
 
Distributed Filesystems Review
Schubert Zhang
 
Advance google file system
Lalit Rastogi
 
Chapter 17 - Distributed File Systems
Wayne Jones Jnr
 
Ch16 OS
C.U
 
Ad

Recently uploaded (20)

PPTX
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
PDF
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
PDF
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
PDF
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
PDF
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
PPTX
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PPTX
Practical Applications of AI in Local Government
OnBoard
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PPTX
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
PDF
Open Source Milvus Vector Database v 2.6
Zilliz
 
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
PDF
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
FME as an Orchestration Tool with Principles From Data Gravity
Safe Software
 
ArcGIS Utility Network Migration - The Hunter Water Story
Safe Software
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Priyanka Aash
 
Database Benchmarking for Performance Masterclass: Session 2 - Data Modeling ...
ScyllaDB
 
Database Benchmarking for Performance Masterclass: Session 1 - Benchmarking F...
ScyllaDB
 
Enabling the Digital Artisan – keynote at ICOCI 2025
Alan Dix
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
Practical Applications of AI in Local Government
OnBoard
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
reInforce 2025 Lightning Talk - Scott Francis.pptx
ScottFrancis51
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Open Source Milvus Vector Database v 2.6
Zilliz
 
The Future of Product Management in AI ERA.pdf
Alyona Owens
 
Quantum AI Discoveries: Fractal Patterns Consciousness and Cyclical Universes
Saikat Basu
 
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
 
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
 
Ad

Distributed computing seminar lecture 3 - distributed file systems

  • 1. Distributed Computing Seminar Lecture 3: Distributed Filesystems Christophe Bisciglia, Aaron Kimball, & Sierra Michels-Slettvet Google, Inc. Summer 2007 Except as otherwise noted, the content of this presentation is © Copyright University of Washington and licensed under the Creative Commons Attribution 2.5 License.
  • 2. Outline Filesystems Overview NFS (Network File System) GFS (Google File System)
  • 3. Filesystems Overview System that permanently stores data Usually layered on top of a lower-level physical storage medium Divided into logical units called “files” Addressable by a filename (“foo.txt”) Usually supports hierarchical nesting (directories) A file path joins file & directory names into a relative or absolute address to identify a file (“/home/aaron/foo.txt”)
  • 4. Distributed Filesystems 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 Can offer support for replication and local caching Different implementations sit in different places on complexity/feature scale
  • 5. NFS First developed in 1980s by Sun Presented with standard UNIX FS interface Network drives are mounted into local directory hierarchy
  • 6. NFS Protocol Initially completely stateless Operated over UDP; did not use TCP streams File locking, etc., implemented in higher-level protocols Modern implementations use TCP/IP & stateful protocols
  • 7. Server-side Implementation NFS defines a virtual file system Does not actually manage local disk layout on server Server instantiates NFS volume on top of local file system Local hard drives managed by concrete file systems (EXT, ReiserFS, ...) Other networked FS's mounted in by...?
  • 8. NFS Locking NFS v4 supports stateful locking of files Clients inform server of intent to lock Server can notify clients of outstanding lock requests Locking is lease-based: clients must continually renew locks before a timeout Loss of contact with server abandons locks
  • 9. NFS Client Caching NFS Clients are allowed to cache copies of remote files for subsequent accesses Supports close-to-open cache consistency When client A closes a file, its contents are synchronized with the master, and timestamp is changed When client B opens the file, it checks that local timestamp agrees with server timestamp. If not, it discards local copy. Concurrent reader/writers must use flags to disable caching
  • 10. NFS: Tradeoffs NFS Volume managed by single server Higher load on central server Simplifies coherency protocols Full POSIX system means it “drops in” very easily, but isn’t “great” for any specific need
  • 11. The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP 2003 (These slides by Alex Moshchuk, University of Washington – used with permission)
  • 12. 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
  • 13. Assumptions High component failure rates 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 are write-once, mostly appended to Perhaps concurrently Large streaming reads High sustained throughput favored over low latency
  • 14. GFS Design Decisions Files stored as chunks Fixed size (64MB) Reliability through replication Each chunk replicated across 3+ chunkservers Single master to coordinate access, keep metadata Simple centralized management No data caching Little benefit due to large data sets, streaming reads Familiar interface, but customize the API Simplify the problem; focus on Google apps Add snapshot and record append operations
  • 15. GFS Architecture Single master Mutiple chunkservers … Can anyone see a potential weakness in this design?
  • 16. Single master From distributed systems we know this is a: Single point of failure Scalability bottleneck GFS solutions: Shadow masters Minimize master involvement never move data through it, use only for metadata and cache metadata at clients large chunk size master delegates authority to primary replicas in data mutations (chunk leases) Simple, and good enough!
  • 17. Metadata (1/2) Global metadata is stored on the master File and chunk namespaces Mapping from files to chunks Locations of each chunk’s replicas All in memory (64 bytes / chunk) Fast Easily accessible
  • 18. Metadata (2/2) Master has an operation log for persistent logging of critical metadata updates persistent on local disk replicated checkpoints for faster recovery
  • 19. Mutations Mutation = write or append must be done for all replicas Goal: minimize master involvement Lease mechanism: master picks one replica as primary; gives it a “lease” for mutations primary defines a serial order of mutations all replicas follow this order Data flow decoupled from control flow
  • 20. Atomic record append Client specifies data GFS appends it to the file atomically at least once GFS picks the offset works for concurrent writers Used heavily by Google apps e.g., for files that serve as multiple-producer/single-consumer queues
  • 21. Relaxed consistency model (1/2) “ Consistent” = all replicas have the same value “ Defined” = replica reflects the mutation, consistent Some properties: concurrent writes leave region consistent, but possibly undefined failed writes leave the region inconsistent Some work has moved into the applications: e.g., self-validating, self-identifying records
  • 22. Relaxed consistency model (2/2) Simple, efficient Google apps can live with it what about other apps? Namespace updates atomic and serializable
  • 23. Master’s responsibilities (1/2) Metadata storage Namespace management/locking Periodic communication with chunkservers give instructions, collect state, track cluster health Chunk creation, re-replication, rebalancing balance space utilization and access speed spread replicas across racks to reduce correlated failures re-replicate data if redundancy falls below threshold rebalance data to smooth out storage and request load
  • 24. Master’s responsibilities (2/2) Garbage Collection simpler, more reliable than traditional file delete master logs the deletion, renames the file to a hidden name lazily garbage collects hidden files Stale replica deletion detect “stale” replicas using chunk version numbers
  • 25. Fault Tolerance High availability fast recovery master and chunkservers restartable in a few seconds chunk replication default: 3 replicas. shadow masters Data integrity checksum every 64KB block in each chunk
  • 27. Deployment in Google Many GFS clusters hundreds/thousands of storage nodes each Managing petabytes of data GFS is under BigTable, etc.
  • 28. Conclusion GFS demonstrates how to support large-scale processing workloads on commodity hardware design to tolerate frequent component failures optimize for huge files that are mostly appended and read feel free to relax and extend FS interface as required go for simple solutions (e.g., single master) GFS has met Google’s storage needs… it must be good!
  • 29. Next Time... Start learning about algorithms for distributed computation Clustering Algorithms