SlideShare a Scribd company logo
Lecture 4 – Distributed Filesystems CSE 490h – Introduction to Distributed Computing, Spring 2007 Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
Outline Filesystems overview NFS & AFS (Andrew File System) GFS Discussion Questions
File Systems 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”)
What Gets Stored User data itself is the bulk of the file system's contents Also includes  meta-data  on a drive-wide and per-file basis: Drive-wide: Available space Formatting info character set ... Per-file: name owner modification date physical layout...
High-Level Organization Files are organized in a “tree” structure made of nested directories One directory acts as the “root”  “ links” (symlinks, shortcuts, etc) provide simple means of providing multiple access paths to one file Other file systems can be “mounted” and dropped in as sub-hierarchies (other drives, network shares)
Low-Level Organization (1/2) File data and meta-data stored separately File descriptors + meta-data stored in  inodes Large tree or table at designated location on disk Tells how to look up file contents Meta-data may be replicated to increase system reliability
Low-Level Organization (2/2) “ Standard” read-write medium is a hard drive (other media: CDROM, tape, ...) Viewed as a sequential array of blocks  Must address ~1 KB chunk at a time Tree structure is “flattened” into blocks Overlapping reads/writes/deletes can cause fragmentation: files are often not stored with a linear layout inodes store all block numbers related to file
Fragmentation
Design Considerations Smaller inode size reduces amount of wasted space Larger inode size increases speed of sequential reads (may not help random access)  Should the file system be  faster  or  more   reliable ?  But faster at what: Large files? Small files? Lots of reading? Frequent writers, occasional readers?
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 Your home directory on attu is NFS-driven  Type 'mount' some time at the prompt if curious
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
AFS (The Andrew File System) Developed at Carnegie Mellon Strong security, high scalability Supports 50,000+ clients at enterprise level
Security in AFS Uses Kerberos authentication Supports richer set of access control bits than UNIX  Separate “administer”, “delete” bits Allows application-specific bits
Local Caching File reads/writes operate on locally cached copy Local copy sent back to master when file is closed Open local copies are notified of external updates through  callbacks
Local Caching - Tradeoffs Shared database files do not work well on this system Does not support  write-through  to shared medium
Replication AFS allows read-only copies of filesystem volumes Copies are guaranteed to be atomic checkpoints of entire FS at time of read-only copy generation Modifying data requires access to the sole r/w volume Changes do not propagate to read-only copies
AFS Conclusions Not quite POSIX Stronger security/permissions No file write-through  High availability through replicas, local caching Not appropriate for all file types
The Google File System Sanjay Ghemawat, Howard Gobioff,  and Shun-Tak Leung SOSP 2003 (These slides by Alex Moshchuk)
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!
Discussion How many sys-admins does it take to run a system like this? much of management is built in Is GFS useful as a general-purpose commercial product? small write performance not good enough? relaxed consistency model
Ad

More Related Content

What's hot (20)

11 distributed file_systems
11 distributed file_systems11 distributed file_systems
11 distributed file_systems
longly
 
Distribution File System DFS Technologies
Distribution File System DFS TechnologiesDistribution File System DFS Technologies
Distribution File System DFS Technologies
Raphael Ejike
 
Self-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File SystemsSelf-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File Systems
Mário Almeida
 
12. dfs
12. dfs12. dfs
12. dfs
Dr Sandeep Kumar Poonia
 
Distributed Filesystems Review
Distributed Filesystems ReviewDistributed Filesystems Review
Distributed Filesystems Review
Schubert Zhang
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
AbDul ThaYyal
 
Distributed File Systems: An Overview
Distributed File Systems: An OverviewDistributed File Systems: An Overview
Distributed File Systems: An Overview
Anant Narayanan
 
Unit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File SystemUnit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File System
Nandakumar P
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
Maurvi04
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
AbDul ThaYyal
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada
umardanjumamaiwada
 
Distributed file systems dfs
Distributed file systems   dfsDistributed file systems   dfs
Distributed file systems dfs
Pragati Startup Presentation Designer firm
 
5.distributed file systems
5.distributed file systems5.distributed file systems
5.distributed file systems
Gd Goenka University
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
ishmecse13
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Janani S
 
Chapter 17 - Distributed File Systems
Chapter 17 - Distributed File SystemsChapter 17 - Distributed File Systems
Chapter 17 - Distributed File Systems
Wayne Jones Jnr
 
Coda file system
Coda file systemCoda file system
Coda file system
Sneh Pahilwani
 
Presentation on nfs,afs,vfs
Presentation on nfs,afs,vfsPresentation on nfs,afs,vfs
Presentation on nfs,afs,vfs
Prakriti Dubey
 
File service architecture and network file system
File service architecture and network file systemFile service architecture and network file system
File service architecture and network file system
Sukhman Kaur
 
AFS introduction
AFS introductionAFS introduction
AFS introduction
Manfred Furuholmen
 
11 distributed file_systems
11 distributed file_systems11 distributed file_systems
11 distributed file_systems
longly
 
Distribution File System DFS Technologies
Distribution File System DFS TechnologiesDistribution File System DFS Technologies
Distribution File System DFS Technologies
Raphael Ejike
 
Self-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File SystemsSelf-Adapting, Energy-Conserving Distributed File Systems
Self-Adapting, Energy-Conserving Distributed File Systems
Mário Almeida
 
Distributed Filesystems Review
Distributed Filesystems ReviewDistributed Filesystems Review
Distributed Filesystems Review
Schubert Zhang
 
3. distributed file system requirements
3. distributed file system requirements3. distributed file system requirements
3. distributed file system requirements
AbDul ThaYyal
 
Distributed File Systems: An Overview
Distributed File Systems: An OverviewDistributed File Systems: An Overview
Distributed File Systems: An Overview
Anant Narayanan
 
Unit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File SystemUnit 3.1 cs6601 Distributed File System
Unit 3.1 cs6601 Distributed File System
Nandakumar P
 
Distributed File Systems
Distributed File Systems Distributed File Systems
Distributed File Systems
Maurvi04
 
Chapter 8 distributed file systems
Chapter 8 distributed file systemsChapter 8 distributed file systems
Chapter 8 distributed file systems
AbDul ThaYyal
 
file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada file sharing semantics by Umar Danjuma Maiwada
file sharing semantics by Umar Danjuma Maiwada
umardanjumamaiwada
 
File models and file accessing models
File models and file accessing modelsFile models and file accessing models
File models and file accessing models
ishmecse13
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Janani S
 
Chapter 17 - Distributed File Systems
Chapter 17 - Distributed File SystemsChapter 17 - Distributed File Systems
Chapter 17 - Distributed File Systems
Wayne Jones Jnr
 
Presentation on nfs,afs,vfs
Presentation on nfs,afs,vfsPresentation on nfs,afs,vfs
Presentation on nfs,afs,vfs
Prakriti Dubey
 
File service architecture and network file system
File service architecture and network file systemFile service architecture and network file system
File service architecture and network file system
Sukhman Kaur
 

Viewers also liked (7)

Name services
Name servicesName services
Name services
Rajendran N
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
Kathirvel Ayyaswamy
 
Naming And Binding (Distributed computing)
Naming And Binding (Distributed computing)Naming And Binding (Distributed computing)
Naming And Binding (Distributed computing)
Sri Prasanna
 
CS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMSCS9222 ADVANCED OPERATING SYSTEMS
CS9222 ADVANCED OPERATING SYSTEMS
Kathirvel Ayyaswamy
 
Distributed Systems Naming
Distributed Systems NamingDistributed Systems Naming
Distributed Systems Naming
Ahmed Magdy Ezzeldin, MSc.
 
CS9222 Advanced Operating System
CS9222 Advanced Operating SystemCS9222 Advanced Operating System
CS9222 Advanced Operating System
Kathirvel Ayyaswamy
 
Dns ppt
Dns pptDns ppt
Dns ppt
Mauood Hamidi
 
Ad

Similar to Distributed file systems (20)

Distributed file systems (from Google)
Distributed file systems (from Google)Distributed file systems (from Google)
Distributed file systems (from Google)
Sri Prasanna
 
Lec3 Dfs
Lec3 DfsLec3 Dfs
Lec3 Dfs
mobius.cn
 
Distributed computing seminar lecture 3 - distributed file systems
Distributed computing seminar   lecture 3 - distributed file systemsDistributed computing seminar   lecture 3 - distributed file systems
Distributed computing seminar lecture 3 - distributed file systems
tugrulh
 
tittle
tittletittle
tittle
uvolodia
 
Google
GoogleGoogle
Google
rpaikrao
 
Distributed File System.ppt
Distributed File System.pptDistributed File System.ppt
Distributed File System.ppt
KhawajaWaqasRaheel
 
OSCh16
OSCh16OSCh16
OSCh16
Joe Christensen
 
Ch16 OS
Ch16 OSCh16 OS
Ch16 OS
C.U
 
OS_Ch16
OS_Ch16OS_Ch16
OS_Ch16
Supriya Shrivastava
 
Kosmos Filesystem
Kosmos FilesystemKosmos Filesystem
Kosmos Filesystem
elliando dias
 
Gfs介绍
Gfs介绍Gfs介绍
Gfs介绍
yiditushe
 
Hadoop
HadoopHadoop
Hadoop
Esraa El Ghoul
 
GFS xouzfz h ghdzg ix booc ug nog ghzg m
GFS xouzfz h ghdzg ix booc  ug nog ghzg mGFS xouzfz h ghdzg ix booc  ug nog ghzg m
GFS xouzfz h ghdzg ix booc ug nog ghzg m
gagaco5776
 
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
PARALLEL FILE SYSTEM FOR LINUX CLUSTERSPARALLEL FILE SYSTEM FOR LINUX CLUSTERS
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
RaheemUnnisa1
 
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio ManfredOSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
NETWAYS
 
Posscon2013
Posscon2013Posscon2013
Posscon2013
Dru Lavigne
 
XFS.ppt
XFS.pptXFS.ppt
XFS.ppt
DmitryIg
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Beyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and ServingBeyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and Serving
mclee
 
Filesystems
FilesystemsFilesystems
Filesystems
royans
 
Distributed file systems (from Google)
Distributed file systems (from Google)Distributed file systems (from Google)
Distributed file systems (from Google)
Sri Prasanna
 
Distributed computing seminar lecture 3 - distributed file systems
Distributed computing seminar   lecture 3 - distributed file systemsDistributed computing seminar   lecture 3 - distributed file systems
Distributed computing seminar lecture 3 - distributed file systems
tugrulh
 
Ch16 OS
Ch16 OSCh16 OS
Ch16 OS
C.U
 
GFS xouzfz h ghdzg ix booc ug nog ghzg m
GFS xouzfz h ghdzg ix booc  ug nog ghzg mGFS xouzfz h ghdzg ix booc  ug nog ghzg m
GFS xouzfz h ghdzg ix booc ug nog ghzg m
gagaco5776
 
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
PARALLEL FILE SYSTEM FOR LINUX CLUSTERSPARALLEL FILE SYSTEM FOR LINUX CLUSTERS
PARALLEL FILE SYSTEM FOR LINUX CLUSTERS
RaheemUnnisa1
 
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio ManfredOSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
OSDC 2010 | Use Distributed Filesystem as a Storage Tier by Fabrizio Manfred
NETWAYS
 
Distributed file system
Distributed file systemDistributed file system
Distributed file system
Anamika Singh
 
Beyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and ServingBeyond the File System - Designing Large Scale File Storage and Serving
Beyond the File System - Designing Large Scale File Storage and Serving
mclee
 
Filesystems
FilesystemsFilesystems
Filesystems
royans
 
Ad

More from Sri Prasanna (20)

Qr codes para tech radar
Qr codes para tech radarQr codes para tech radar
Qr codes para tech radar
Sri Prasanna
 
Qr codes para tech radar 2
Qr codes para tech radar 2Qr codes para tech radar 2
Qr codes para tech radar 2
Sri Prasanna
 
assds
assdsassds
assds
Sri Prasanna
 
assds
assdsassds
assds
Sri Prasanna
 
asdsa
asdsaasdsa
asdsa
Sri Prasanna
 
dsd
dsddsd
dsd
Sri Prasanna
 
About stacks
About stacksAbout stacks
About stacks
Sri Prasanna
 
About Stacks
About  StacksAbout  Stacks
About Stacks
Sri Prasanna
 
About Stacks
About  StacksAbout  Stacks
About Stacks
Sri Prasanna
 
About Stacks
About  StacksAbout  Stacks
About Stacks
Sri Prasanna
 
About Stacks
About  StacksAbout  Stacks
About Stacks
Sri Prasanna
 
About Stacks
About  StacksAbout  Stacks
About Stacks
Sri Prasanna
 
About Stacks
About StacksAbout Stacks
About Stacks
Sri Prasanna
 
About Stacks
About StacksAbout Stacks
About Stacks
Sri Prasanna
 
Network and distributed systems
Network and distributed systemsNetwork and distributed systems
Network and distributed systems
Sri Prasanna
 
Introduction & Parellelization on large scale clusters
Introduction & Parellelization on large scale clustersIntroduction & Parellelization on large scale clusters
Introduction & Parellelization on large scale clusters
Sri Prasanna
 
Mapreduce: Theory and implementation
Mapreduce: Theory and implementationMapreduce: Theory and implementation
Mapreduce: Theory and implementation
Sri Prasanna
 
Other distributed systems
Other distributed systemsOther distributed systems
Other distributed systems
Sri Prasanna
 

Recently uploaded (20)

AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Viam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdfViam product demo_ Deploying and scaling AI with hardware.pdf
Viam product demo_ Deploying and scaling AI with hardware.pdf
camilalamoratta
 
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
The No-Code Way to Build a Marketing Team with One AI Agent (Download the n8n...
SOFTTECHHUB
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Cybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and MitigationCybersecurity Threat Vectors and Mitigation
Cybersecurity Threat Vectors and Mitigation
VICTOR MAESTRE RAMIREZ
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...Canadian book publishing: Insights from the latest salary survey - Tech Forum...
Canadian book publishing: Insights from the latest salary survey - Tech Forum...
BookNet Canada
 
Q1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor PresentationQ1 2025 Dropbox Earnings and Investor Presentation
Q1 2025 Dropbox Earnings and Investor Presentation
Dropbox
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of ExchangesJignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah - The Innovator and Czar of Exchanges
Jignesh Shah Innovator
 
The Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI IntegrationThe Future of Cisco Cloud Security: Innovations and AI Integration
The Future of Cisco Cloud Security: Innovations and AI Integration
Re-solution Data Ltd
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
AsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API DesignAsyncAPI v3 : Streamlining Event-Driven API Design
AsyncAPI v3 : Streamlining Event-Driven API Design
leonid54
 

Distributed file systems

  • 1. Lecture 4 – Distributed Filesystems CSE 490h – Introduction to Distributed Computing, Spring 2007 Except as otherwise noted, the content of this presentation is licensed under the Creative Commons Attribution 2.5 License.
  • 2. Outline Filesystems overview NFS & AFS (Andrew File System) GFS Discussion Questions
  • 3. File Systems 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. What Gets Stored User data itself is the bulk of the file system's contents Also includes meta-data on a drive-wide and per-file basis: Drive-wide: Available space Formatting info character set ... Per-file: name owner modification date physical layout...
  • 5. High-Level Organization Files are organized in a “tree” structure made of nested directories One directory acts as the “root” “ links” (symlinks, shortcuts, etc) provide simple means of providing multiple access paths to one file Other file systems can be “mounted” and dropped in as sub-hierarchies (other drives, network shares)
  • 6. Low-Level Organization (1/2) File data and meta-data stored separately File descriptors + meta-data stored in inodes Large tree or table at designated location on disk Tells how to look up file contents Meta-data may be replicated to increase system reliability
  • 7. Low-Level Organization (2/2) “ Standard” read-write medium is a hard drive (other media: CDROM, tape, ...) Viewed as a sequential array of blocks Must address ~1 KB chunk at a time Tree structure is “flattened” into blocks Overlapping reads/writes/deletes can cause fragmentation: files are often not stored with a linear layout inodes store all block numbers related to file
  • 9. Design Considerations Smaller inode size reduces amount of wasted space Larger inode size increases speed of sequential reads (may not help random access) Should the file system be faster or more reliable ? But faster at what: Large files? Small files? Lots of reading? Frequent writers, occasional readers?
  • 10. 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
  • 11. NFS First developed in 1980s by Sun Presented with standard UNIX FS interface Network drives are mounted into local directory hierarchy Your home directory on attu is NFS-driven Type 'mount' some time at the prompt if curious
  • 12. 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
  • 13. 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...?
  • 14. 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
  • 15. 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
  • 16. 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
  • 17. AFS (The Andrew File System) Developed at Carnegie Mellon Strong security, high scalability Supports 50,000+ clients at enterprise level
  • 18. Security in AFS Uses Kerberos authentication Supports richer set of access control bits than UNIX Separate “administer”, “delete” bits Allows application-specific bits
  • 19. Local Caching File reads/writes operate on locally cached copy Local copy sent back to master when file is closed Open local copies are notified of external updates through callbacks
  • 20. Local Caching - Tradeoffs Shared database files do not work well on this system Does not support write-through to shared medium
  • 21. Replication AFS allows read-only copies of filesystem volumes Copies are guaranteed to be atomic checkpoints of entire FS at time of read-only copy generation Modifying data requires access to the sole r/w volume Changes do not propagate to read-only copies
  • 22. AFS Conclusions Not quite POSIX Stronger security/permissions No file write-through High availability through replicas, local caching Not appropriate for all file types
  • 23. The Google File System Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung SOSP 2003 (These slides by Alex Moshchuk)
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. GFS Architecture Single master Mutiple chunkservers … Can anyone see a potential weakness in this design?
  • 28. 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!
  • 29. 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
  • 30. Metadata (2/2) Master has an operation log for persistent logging of critical metadata updates persistent on local disk replicated checkpoints for faster recovery
  • 31. 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
  • 32. 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
  • 33. 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
  • 34. Relaxed consistency model (2/2) Simple, efficient Google apps can live with it what about other apps? Namespace updates atomic and serializable
  • 35. 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
  • 36. 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
  • 37. 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
  • 39. Deployment in Google Many GFS clusters hundreds/thousands of storage nodes each Managing petabytes of data GFS is under BigTable, etc.
  • 40. 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!
  • 41. Discussion How many sys-admins does it take to run a system like this? much of management is built in Is GFS useful as a general-purpose commercial product? small write performance not good enough? relaxed consistency model
  翻译: