Tachyon

作者: zjlearn | 来源:发表于2016-09-02 21:19 被阅读68次

    摘要:

    Tachyon是一个分布式文件系统,其能够使得在分布式集群计算框架中,数据在内存中可靠的共享。尽管缓存提高了数据读的性能,但是写的速度受限于网络和磁盘的带宽,(这是因为在分布式文件系统中,为了保证容错性,往往将数据拷贝N分,当写入时,就会出现两种选择:1. master-slave的文件系统需要通过master写入,这样Master成为系统的瓶颈,2. 平等方式的存储节点,则需要至少写入M份,代表写入成功)。Tachyon使用lineage技术来消除了其瓶颈。lineage,是存储层次重要的技术; 为了解决产生的长的lineage对即时回复数据带来的影响,lineage采用了checkpointing技术来保证一定的恢复代价和资源申请策略。实验表明,Tachyon比HDFS在写方面提高了110X。也提升了端到端的延迟4x。
    (In addition, because many files in computing clusters are temporary
    files that get deleted before they are checkpointed, Tachyon
    can reduce replication-caused network traffic by up to 50%.)

    Tachyon设计的挑战:

    1. 对于长期运行的分布式文件系统,限制其重新计算数据的代价。对于批处理程序来说,挑战不存在,因为其时间可预估。但是对于Spark Streaming,这类程序来说,Tachyon重新计算的时间是不可预估的,对于这类程序,一般的技术是周期性的使用checkpoint技术,但是对于Tachyon来说是困难的,因为上层重新执行的job可能各种各样。Tachyon采用了基于lineage图的结构来选择何种的数据进行checkpoint,进而限制重新计算的代价。
    2. 第二个挑战在与如何申请重新计算的资源。要求在于:任务优先级高时,如何申请资源; 优先级不高时,如何申请又不严重的影响当前运行任务的性能
      To select which files to checkpoint and when, we propose a novel algorithm,called the Edge algorithm, that provides an upper bound on the recomputation cost regardless of the workload’s access pattern.To address the second challenge, Tachyon provides resource allocation schemes that respect job priorities under two common cluster allocation models: strict priority and weighted fair sharing。

    系统设计概要

    Tachyon consists of two layers: lineage and persistence. The lineage layer provides high throughput I/O and tracks the sequence
    of jobs that have created a particular data output. The persistence layer persists data onto storage without the lineage concept. This is mainly used to do asynchronous checkpoints.持久化层可以是任何基于复制的存储系统。


    Paste_Image.png

    tachyon使用标准的master-slave方式的体系,除了管理元数据,Tachyon master也包含workflow manager 。workflow manager 的角色在于跟踪lineage信息,计算checkpoint的顺序,以及与集群资源管理器交互(申请重新计算的资源)。每个worker中运行一个daemon管理本地资源,并周期性的向master报告状态,另外每个worker通过daemon和使用RAMdisk来读取数据。

    例子:任务P使用文件A产生文件B。在产生结果输出之前,P提交lineage的信息到Tachyon中去,Tachyon持久化到持久层,(这样数据丢失可以重新进行计算)然后P可以只写入B的一个副本到内存中去。

    tachyon使用避免复制的方式来提高写的性能,但是复制能够提高读的性能(当很多的任务具有相同数据的输入时)。tachyon使用客户端缓存的方式来减轻读热点的负载,(当文件不在本地机器时,它从远地读入,临时缓存在本地)。

    Lineage 负载

    Tachyon可以回收Lineage信息,特殊的,在checkpoint之后,Tachyon可以删除lineage的记录

    数据删除

    问题:当数据密集的程序,内存不足时,如何的删除内存中缓存的数据。
    Tachyon使用LRU作为默认的数据删除机制,并提供其他可插入的机制

    master节点的容错性

    Tachyon使用passive standby的方法来保证master的容错性,master异步记录所有的操作到持久化层,当master fails,新的master节点从log中恢复。

    4. Checkpointing

    The key insight behind our checkpointing approach in Tachyon is that lineage enables us to asynchronously checkpoint in the background, without stalling writes, which can
    proceed at memory-speed.Tachyon’ background checkpointing is done in a low priority process to avoid interference with
    existing jobs.
    理想的checkpointing需要满足:

    1. Bounded Recomputation Time
      2.Checkpointing Hot files
    2. Avoid Checkpointing Temporary Files

    4.1 Edge Algorithm

    Edge Algorithm包含了一下三个想法:

    1. Edge checkpoints lineage图的 边(叶子)
    2. 其包含优先级,checkpointing high-priority。经常读的高优先级
    3. 仅仅缓存适合内存的数据。

    4.2 Bounded Recovery Time

    5. Resource Allocation

    Alluxio

    相关文章

      网友评论

          本文标题:Tachyon

          本文链接:https://www.haomeiwen.com/subject/lvhkettx.html