Distributed file systems
Download
1 / 41

Distributed File Systems - PowerPoint PPT Presentation


  • 75 Views
  • Uploaded on

Distributed File Systems. Andy Wang Operating Systems COP 4610 / CGS 5765. Distributed File System. Provides transparent access to files stored on a remote disk Recurrent themes of design issues Failure handling Performance optimizations Cache consistency. No Client Caching.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Distributed File Systems' - xanthus-church


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Distributed file systems

Distributed File Systems

Andy Wang

Operating Systems

COP 4610 / CGS 5765


Distributed file system
Distributed File System

  • Provides transparent access to files stored on a remote disk

  • Recurrent themes of design issues

    • Failure handling

    • Performance optimizations

    • Cache consistency


No client caching
No Client Caching

  • Use RPC to forward every file system request to the remote server

    • open, seek, read, write

Server cache: X

read

write

Client A cache:

Client B cache:


No client caching1
No Client Caching

+ Server always has a consistent view of the file system

- Poor performance

- Server is a single point of failure


Network file system nfs
Network File System (NFS)

  • Uses client caching to reduce network load

  • Built on top of RPC

Server cache: X

Client A cache: X

Client B cache: X


Network file system nfs1
Network File System (NFS)

+ Performance better than no caching

- Has to handle failures

- Has to handle consistency


Failure modes
Failure Modes

  • If the server crashes

    • Uncommitted data in memory are lost

    • Current file positions may be lost

    • The client may ask the server to perform unacknowledged operations again

  • If a client crashes

    • Modified data in the client cache may be lost


Nfs failure handling
NFS Failure Handling

1. Write-through caching

2. Stateless protocol: the server keeps no state about the client

  • read open, seek, read, close

  • No server recovery after a failure

    3. Idempotent operations: repeated operations get the same result

  • No static variables


Nfs failure handling1
NFS Failure Handling

4. Transparent failures to clients

  • Two options

    • The client waits until the server comes back

    • The client can return an error to the user application

      • Do you check the return value of close?


Nfs weak consistency protocol
NFS Weak Consistency Protocol

  • A write updates the server immediately

  • Other clients poll the server periodically for changes

  • No guarantees for multiple writers


Nfs summary
NFS Summary

+ Simple and highly portable

- May become inconsistent sometimes

  • Does not happen very often


Andrew file system afs
Andrew File System (AFS)

  • Developed at CMU

  • Design principles

    • Files are cached on each client’s disks

      • NFS caches only in clients’ memory

    • Callbacks: The server records who has the copy of a file

    • Write-back cache on file close. The server then tells all clients that own an old copy.

    • Session semantics: Updates are only visible on close


Afs illustrated
AFS Illustrated

Server cache: X

Client A

Client B


Afs illustrated1

read X

AFS Illustrated

callback list of X

client A

Server cache: X

Client A

Client B

read X


Afs illustrated2

read X

AFS Illustrated

callback list of X

client A

Server cache: X

Client A cache: X

Client B

read X


Afs illustrated3

read X

AFS Illustrated

callback list of X

client A

Server cache: X

Client A cache: X

Client B

read X


Afs illustrated4

read X

AFS Illustrated

callback list of X

client A

client B

Server cache: X

Client A cache: X

Client B

read X


Afs illustrated5

read X

AFS Illustrated

callback list of X

client A

client B

Server cache: X

Client A cache: X

Client B cache: X

read X


Afs illustrated6
AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

write X, X  X


Afs illustrated7

X  X

AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

close X


Afs illustrated8

X  X

AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

close X


Afs illustrated9
AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

close X


Afs illustrated10

X

AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

open X


Afs illustrated11

X

AFS Illustrated

Server cache: X

Client A cache: X

Client B cache: X

open X


Afs failure handling
AFS Failure Handling

  • If the server crashes, it asks all clients to reconstruct the callback states


Afs vs nfs
AFS vs. NFS

  • AFS

    • Less server load due to clients’ disk caches

    • Not involved for read-only files

  • Both AFS and NFS

    • Server is a performance bottleneck

    • Single point of failure


Serverless network file service xfs
Serverless Network File Service (xFS)

  • Idea: construct a file system as a parallel program and exploit the high-speed LAN

    • Four major pieces

      • Cooperative caching

      • Write-ownership cache coherence

      • Software RAID

      • Distributed control


Cooperative caching
Cooperative Caching

  • Uses remote memory to avoid going to disk

    • On a cache miss, check the local memory and remote memory, before checking the disk

    • Before discarding the last cached memory copy, send the content to remote memory if possible


Cooperative caching1
Cooperative Caching

Client A cache: X

Client B cache:

Client C cache:

Client D cache:


Cooperative caching2

X

Cooperative Caching

Client A cache: X

Client B cache:

Client C cache:

Client D cache:

read X


Cooperative caching3

X

Cooperative Caching

Client A cache: X

Client B cache:

Client C cache: X

Client D cache:

read X


Write ownership cache coherence
Write-Ownership Cache Coherence

  • Declares a client to be a owner of the file at writes

    • No one else can have a copy


Write ownership cache coherence1
Write-Ownership Cache Coherence

owner, read-write

Client A cache: X

Client B cache:

Client C cache:

Client D cache:


Write ownership cache coherence2
Write-Ownership Cache Coherence

owner, read-write

Client A cache: X

Client B cache:

Client C cache:

Client D cache:

read X


Write ownership cache coherence3

X

Write-Ownership Cache Coherence

read-only

Client A cache: X

Client B cache:

Client C cache:

Client D cache:

read X


Write ownership cache coherence4

X

Write-Ownership Cache Coherence

read-only

Client A cache: X

Client B cache:

Client C cache: X

Client D cache:

read-only


Write ownership cache coherence5
Write-Ownership Cache Coherence

read-only

Client A cache: X

Client B cache:

Client C cache: X

Client D cache:

read-only

write X


Write ownership cache coherence6
Write-Ownership Cache Coherence

Client A cache:

Client B cache:

Client C cache: X

Client D cache:

owner, read-write

write X


Other components
Other components

  • Software RAID

    • Stripe data redundantly over multiple disks

  • Distributed control

    • File system managers are spread across all machines


Xfs summary
xFS Summary

  • Built on small, unreliable components

  • Data, metadata, and control can live on any machine

  • If one machine goes down, everything else continues to work

  • When machines are added, xFS starts to use their resources


Xfs summary1
xFS Summary

- Complexity and associated performance degradation

- Hard to upgrade software while keeping everything running


ad