Week5 Dfs
Week5 Dfs
Week5 Dfs
File Characteristics
From Andrew File System work: most les are smalltransfer les rather than disk blocks? reading more common than writing most access is sequential most les have a short lifetimelots of applications generate temporary les (such as a compiler). le sharing (involving writes) is unusualargues for client caching processes use few les les can be divided into classeshandle system les and user les dierently.
Newer Inuences
wide-area networks peer-to-peer mobility untrusted entities
CS 4513
week5-dfs.tex
Migration
Can les be migrated between le server machines? What must clients be aware of? FTP. Sure, but end-user must be aware. NFS. Must change mount points on the client machines. AFS. On a per-volume (collection of les managed as a single unit) basis.
Directories
Are directories and les handled with the same or a dierent mechanism? FTP. Directory listing handled as remote command. NFS. Unix-like. AFS. Unix-like. Amoeba has separate mechanism for directories and les.
CS 4513
week5-dfs.tex
Sharing Semantics
What type of le sharing semantics are supported if two processes accessing the same le? Possibilities: Unix semantics every operation on a le is instantly visible to all processes. session semantics no changes are visible to other processes until the le is closed. immutable les les cannot be changed (new versions must be created) FTP. User-level copies. No support. NFS. Mostly Unix semantics. AFS. Session semantics. Immutable les in Amoeba.
CS 4513
week5-dfs.tex
Caching
What, if any, le caching is supported? Possibilities: write-through all changes made on client are immediately written through to server write-back changes made on client are cached for some amount of time before being written back to server. write-on-close one type of write-back where changes are written on close (matches session semantics). FTP. None. User maintains own copy (whole le) NFS. File attributes (inodes) and le data blocks are cached separately. Cached attributes are validated with the server on le open. Version 3: Uses read-ahead and delayed writes from client cache. Time-based at block level. New/changed les may not visible for 30 seconds. Neither Unix nor session semantics. Non-deterministic semantics as multiple processes can have the same le open for writing. Version 4: Client must ush modied le contents back to the server on close of le at client. Server can also delegate a le to a client so that the client can handle all requests for the le without checking with the server. However, server must now maintain state about open delegations and recall (with a callback) a delegation if the le is needed on another machine. AFS. File-level caching with callbacks (explain). Session semantics. Concurrent sharing is not possible.
CS 4513
week5-dfs.tex
Locking
Does the system support locking of les? FTP. N/A. NFS. Has mechanism, but external to NFS in v3. Internal to le system in version 4. AFS. Does support.
Replication/Reliability
Is le replication/reliability supported and how? FTP. No. NFS. minimal support in version 4. AFS. For read-only volumes within a cell. For example binaries and system libraries.
CS 4513
week5-dfs.tex
Scalability
Is the system scalable? FTP. Yes. Millions of users. NFS. Not so much. 10-100s AFS. Better than NFS, keep trac away from le servers. 1000s.
Homogeneity
Is hardware/software homogeneity required? FTP. No. NFS. No. AFS. No.
CS 4513
week5-dfs.tex
Security
What security and protection features are available to control access? FTP. Account/password authorization. NFS. RPC Unix authentication. Version 4 uses RPCSEC GSS, a general security framework that can use proven security mechanisms such as Kerberos. AFS. Unix permissions for les, access control lists for directories. CODA has secure RPC implementation.
State/Stateless
Do le system servers maintain state about clients? FTP. No. NFS. No. In Version 4 servers maintains state about delegations and le locking. AFS. Yes.
CS 4513
week5-dfs.tex
CS 4513
week5-dfs.tex
CS 4513
10
week5-dfs.tex
Architecture
Single master and multiple chunkservers as shown in Fig 1. Each is a commodity Linux server. Files stored in xed-size 64MB chunks as Linux les. Each has a 64-bit chunk handle. By default have three replicas for each chunk. GFS maintains metale information. Clients do not cache datatypically not reused. Do cache metadata. Large chunk sizes help to minimize client interaction with master (potential bottleneck). Client can maintain persistent TCP connection with chunkserver. Reduces amount of metadata at master.
CS 4513
11
week5-dfs.tex
Design
Key ideas: Once a client retrieves a le, it becomes a replica proxy for serving to other clients. Files are stored and retrieved as chunks. Client can retrieve chunks from multiple locations. A token is assigned for the whole le and for each chunk. Use Rabin ngerprint algorithm to preserve data commonality in chunksidea is that dierent versions of a le have many chunks in common.
CS 4513
12
week5-dfs.tex
File Consistency
Uses leases and whole-le cachingala AFS. Default lease of 5min with callbacks. Must refetch entire le if modiedbut may not have to retrieve all chunks and can do so from client proxies.
Summary
Key ideas: centralized administration shared reads through cooperative caching smart chunking parallel chunk download distributed index using tokens
CS 4513
13
week5-dfs.tex