CMU 95702 关于 NFS、AFS、GFS 的笔记。

NFS(Network File System)

目的:

  • Your files are available from any machine.
  • Distribute the files and we will not have to implement new protocols.

特点:

  • Defines a virtual C/S file system
  • Stateless
  • Uses RPC over TCP or UDP.

NFS 的实质在于用户间计算机的共享。用户通过 NFS 客户端接入网络,可以访问同一网络中其它计算机系统的硬盘(该计算机为 NFS 服务端)。NFS 客户端可以 mount 远端文件系统的部分或全部到本地,访问这些文件系统就像访问在本地磁盘上的文件系统一样。

NFS 访问数据的速度以接近采用本地磁盘的速度为目标,NFS客户端的性能直接取决于服务端的性能和网络性能。如:

  • 网络的最大吞吐量
  • 服务端硬件性能:网卡,磁盘等
  • 服务端缓存大小,TCP/IP的配置
  • 服务端服务实例的运行个数
  • 客户端请求的网络文件数
  • 客户端的系统性能
    其它运行在客户或服务端上与NFS竞争资源的进程

NFS客户端将用户级别命令转化为RPC;NFS服务端将RPC转换为用户级别命令。
NFS的主要缺点:文件服务器的定位对客户端非透明,即客户端需要知道服务端的确切地址(挂载点),这也导致了其可扩展性差,维护困难,优点是发展多年,Linux内核直接支持,使用简单方便。

NFS architecture

NFS server operations


-> The directory and file operations are integrated into a single service.

NFS client

AFS(Andrew File System)

目的:

  • Scalability

特点:

  • Modified from Coulouris
  • Cache
    Whole files are cached in client nodes to reduce client server interactions -> achieve scalability.
    A client cache would typically hold several hundreds of files most recently used on that computer.
    Permanent cache, surviving reboots.
  • Consider UNIX commands and libraries copied to the client.
  • Consider files only used by a single user.
    These last two cases represent the vast majority of cases.
  • Gain: Your files are available from any workstation.
  • Principle: Make the common case fast.

Open file:

  • When the client tries to open a file
    client cache is tried first
    if not there, a server is located and the server is called for the file.
  • The copy is stored on the client side and is opened.
  • Subsequent reads and writes hit the copy on the client.

Close file:

  • When the client closes the file - if the files has changed it is sent back to the server. The client side copy is retained for possible more use.

AFS(Andrew File System) 文件系统主要用于管理分部在不同网络节点上的文件。AFS 采用安全认证和灵活的访问控制提供一种分布式的文件和授权服务,该服务可以扩展到多个客户端。

AFS与NFS不同,AFS提供给用户的是一个完全透明,永远唯一的逻辑路径。因而其具有跨平台,分布式的特点。但是由于AFS使用本地文件系统来缓存最近被访问的文件块,访问一个在本地的AFS文件由于需要附加一些耗时的操作,比直接访问本地的其它文件要慢很多。AFS为读操作做了优化,写操作很复杂,是一个读快写慢的文件系统,不能提供很好的读写并发能力。

AFS architecture

Implementation of file system calls in AFS

File name space seen by clients of AFS

System call interception in AFS

The main components of the Vice service interface

CMU’s Coda is an enhanced descendant of AFS
Very briefly, two important features are:
Disconnected operation for mobile computing.
Continued operation during partial network failures in server network.
During normal operation, a user reads and writes to the file system normally, while the client fetches, or “hoards”, all of the data the user has
listed as important in the event of network disconnection.
If the network connection is lost, the Coda client’s local cache serves data from this cache and logs all updates.
Upon network reconnection, the client moves to reintegration state; it sends logged updates to the servers. From Wikipedia

GFS(Google File System)

目的:

  • Scalability

特点:

  • Reliably with component failures.
  • Massively large files
    Solve problems that Google needs solved – not a massive number of files but massively large files are common. Write once, append, read many times.
  • Streaming and no cache
    Access is dominated by long sequential streaming reads and sequential appends. No need for caching on the client.
  • Throughput more important than latency.
  • Each file is mapped to a set of fixed size chunks(64Mb/chunk).
  • 3 replicas
    Each chunk is replicated on three different chunk servers.
  • Master and chunk servers
    Each cluster has a single master and multiple (usually hundreds) of chunk servers.
    The master knows the locations of chunk replicas.
    The chunk servers know what replicas they have and are polled by the master on startup.

Think of very large files each holding a very large number of HTML documents scanned from the web. These need read and analyzed.
This is not your everyday use of a distributed file system (NFS and AFS). Not POSIX.

Google physical infrastructure

Structure

Operations

Read

Suppose a client wants to perform a sequential read, processing a very large file from a particular byte offset.

  • The client can compute the chunk index from the byte offset.
  • Client calls master with file name and chunk index.
  • Master returns chunk identifier and the locations of replicas.
  • Client makes call on a chunk server for the chunk and it is processed sequentially with no caching. It may ask for and receive several chunks.

Mutation

Suppose a client wants to perform sequential writes to the end of a file.

  • The client can compute the chunk index from the byte offset. This is the chunk holding End Of File.
  • Client calls master with file name and chunk index.
  • Master returns chunk identifier and the locations of replicas. One is designated as the primary.
  • The client sends all data to all replicas.The primary coordinates with replicas to update files
    consistently across replicas.

原文地址: http://www.shuang0420.com/2016/12/10/Distributed%20Systems%E7%AC%94%E8%AE%B0%EF%BC%8DNFS%E3%80%81AFS%E3%80%81GFS/

Distributed Systems笔记-NFS、AFS、GFS相关推荐

  1. Distributed Systems笔记-Cryptographic Protocols

    CMU 95702 Distributed Systems 笔记.简单介绍几种加密.签名方式. AES 和 RSA 笔记 的续章. Scenario 1 (Like WWII 和 TEA) 双方共享一 ...

  2. Distributed Systems笔记-middlewares

    CMU 95702 Distributed Systems 笔记.简单介绍分布式系统中解决 interoperability concern 的几种方案 Cobra's CDR, Java seria ...

  3. Distributed Systems笔记-Web Service Design Patterns

    CMU 95702 Distributed Systems 笔记.简单介绍 XML-RPC.SOAP.REST 三种 web 服务实现方案以及 RPC.Message.Resource 三种 patt ...

  4. The Chubby lock service for loosely-coupled distributed systems 论文阅读笔记

    The Chubby lock service for loosely-coupled distributed systems 论文阅读笔记 特点:高可靠.高可用.粗粒度锁服务.小文件存储 主要用于高 ...

  5. The Chubby lock service for loosely-coupled distributed systems

    The Chubby lock service for loosely-coupled distributed systems 我们描述了自己使用Chubby锁服务的经历,该服务旨在为松耦合的分布式系 ...

  6. Distributed systems theory for the distributed systems engineer 翻译 中英对照

    Distributed systems theory for the distributed systems engineer 适合 分布式系统工程师 的 分布式系统理论 Gwen Shapira, ...

  7. Scalable, Distributed Systems Using Akka, Spring Boot, DDD, and Java--转

    原文地址:https://dzone.com/articles/scalable-distributed-systems-using-akka-spring-boot-ddd-and-java Whe ...

  8. Enumerating Trillion Triangles on Distributed Systems

    Enumerating Trillion Triangles  on Distributed Systems 국민대학교 20163660 주가 분산시스템 소개: 분산시스템은 소프트웨어 조각들이 ...

  9. 分布式系统(Distributed Systems)概述

    随着互联网的持续发展(以Web应用为代表).计算机应用的深入.分布式系统构建技术的日益成熟,分布式系统逐渐深入到人们的日常生活,并渗透到社会.经济.文化生活的各个方面.现如今,分布式系统已成为主流的软 ...

最新文章

  1. 等待 dg597 服务的连接超时
  2. webui框架的利与弊
  3. java集合框架03
  4. JavaWeb(十一)——登录注册小案例
  5. Apollo创建项目
  6. android accessibilityservice 被报病毒,无障碍功能AccessibilityService,卡顿,一直报warning...
  7. 终极JPA查询和技巧列表–第3部分
  8. [转载]遗传算法介绍
  9. 将 Azure VM 迁移到 Azure 中的托管磁盘
  10. oracle vb 用法,oracle客户端配置与使用(vb)
  11. 2020MPAcc,管理类联考网课,书籍资源推荐!
  12. 解决confuserEx混淆导致类名消失的问题
  13. 【coq】函数语言设计 笔记 02 - induction
  14. 达梦数据库 开发版试用时间限制
  15. 使用WebBrowser控件实现打印 去掉 页眉和页脚
  16. 设计Date类,该类采用3个整型存储日期: month、 data和year。其函数成员具有按如下格式输出日期的功能(异常处理)
  17. maven基础:mvn命令常用参数整理;如:-am构建指定模块,同时构建指定模块依赖的其他模块
  18. mysql 备份数据库结账_简单的结账功能(可用于各种结账)
  19. CVPR 2022 | QueryDet:使用级联稀疏query加速高分辨率下的小目标检测
  20. Vue中的插件小练习

热门文章

  1. Protobuf从安装到配置整理帖
  2. ORACLE创建用户,建表空间,授予权限
  3. Silverlight多文件(大文件)上传的开源项目
  4. WCF揭秘学习笔记(5):WF定制活动
  5. runat=server
  6. Golang range解析
  7. Python学习笔记:基础
  8. linux 忘记密码(以centos6为例)
  9. C语言函数手册:c语言库函数大全|C语言标准函数库|c语言常用函数查询
  10. matlab图像处理——平滑滤波