[Paper] LCS: An Efficient Data Eviction Strategy for Spark
Abstract
- Classical strategies do not aware of recovery cost, which could cause system performance degradation. --> a cost aware eviction strategt can obviously reduces the total recovery cost.
- A strategy named LCS(Least cost strategy) --> gets the dependencies information between cache data via analyzing application, and calculates the recovery cost during running. By predicting how many times cache data will be reused and using it to weight the recovery cost, LCS always evicts the data which lead to minimum recovery cost in future.
Introduction
- Current eviction strategies:
- FIFO: focuses on the create time.
- LRU: focuses on access history for better hit ratio.
- Many eviction algorithms take access history and costs of cache items into consideration. But for spark, the execution logic of upcoming phase is known, access history has no help to eviction strategy.
- LCS has three steps:
- Gets the dependencies of RDD by analyzing application, and predicts how many times cache partitions will be reused.
- Collects information during partition creation, and predicts the recovery cost.
- Maintains the eviction order using above two information, and evicts the partition that incurs the least cost when memory is not sufficient.
Design and Implementation
Overall Architecture
- Three necessary steps:
- Analyzer in driver node analyzes the application by the DAG strcutures provided by DAGScheduler.
- Collector in each executor node records information about each cache partition during its creation.
- Eviction Decision provides an efficient eviction strategy to evict the optimal cache partition set when remaining memory space for cache storage is not efficient, and decide whether remove it from MemoryStore or serialize it to DiskStore.
Analyzer
- DAG start points:
- DFS, files on it can be read from local or remote disk directly;
- ShuffledRDD, which can be generated by fetching remote shuffle data.
This indicates the longest running path of task: when all the cache RDDs are missing, task needs to run from the starting points. (Only needs to run part of the path from cache RDD by referring dependencies between RDDs).
- The aim of Analyzer is classifying cache RDDs and analyzing the dependency information between them before each stage runs.
- Analyzer only runs in driver node and will transfer result to executors when driver schedules tasks to them.
- By pre-registering RDD that needs to be unpresist, and checking whether it is used in each stage, we put it to the RemovableRDDs list of the last stage to use it. The removable partition can be evicted directly, and will not waste the memory.
- Cache RDDs of a stage will be classified to:
- current running cache RDDs (targetCacheRDDs)
- RDDs participate in current stage (relatedCacheRDDs)
- other cache RDDs
Colletor
- collector will collect information about each cache partition during task running.
- Information that needs to be observed:
- Create cost: Time spent, called Ccreate.
- Eviction cost: Time costs when evicting a partition from memory, called Ceviction. (If partition is serialized to disk, the eviction cost is the time spent on serializing and writing to disk, denoted as Cser. If removed directly, the eviction cost is 0.)
- Recovery cost: Time costs when partition data are not found in memory, named Crecovery. If partition is serialized to disk, the recovery cost is the time spent in reading from disk and deserilization, denoted as Cdeser. Otherwise, recomputed by lineage information, represented as Crecompute.
Eviction Decision
- Through using information provided by Colletor, each cache partition has a WCPM value:
WCPM = min (CPM * reus, SPM + DPM * reus).
CPMrenew = (CPMancestor * sizeancestor + CPM * size) / size
SPM refers to serialization, DPM refers to deserialization, resu refers to reusability
Evaluation
Evaluation Environment and Method
- PR, CC, KMeans algorithms...
- LCS compare to LRU & FIFO
[Paper] LCS: An Efficient Data Eviction Strategy for Spark的更多相关文章
- Zore copy(翻译《Efficient data transfer through zero copy》)
原文:https://www.ibm.com/developerworks/library/j-zerocopy/ <Efficient data transfer through zero c ...
- Efficient data transfer through zero copy
Efficient data transfer through zero copy https://www.ibm.com/developerworks/library/j-zerocopy/ Eff ...
- PatentTips - Apparatus and method for a generic, extensible and efficient data manager for virtual peripheral component interconnect devices (VPCIDs)
BACKGROUND A single physical platform may be segregated into a plurality of virtual networks. Here, ...
- Provably Delay Efficient Data Retrieving in Storage Clouds---INFOCOM 2015
[标题] [作者] [来源] [对本文评价] [why] 存在的问题 [how] [不足] assumption future work [相关方法或论文] [重点提示] [其它]
- Big Data, MapReduce, Hadoop, and Spark with Python
此书不错,很短,且想打通PYTHON和大数据架构的关系. 先看一次,计划把这个文档作个翻译. 先来一个模拟MAPREDUCE的东东... mapper.py class Mapper: def map ...
- [Big Data]从Hadoop到Spark的架构实践
摘要:本文则主要介绍TalkingData在大数据平台建设过程中,逐渐引入Spark,并且以Hadoop YARN和Spark为基础来构建移动大数据平台的过程. 当下,Spark已经在国内得到了广泛的 ...
- 搭建Data Mining环境(Spark版本)
前言:工欲善其事,必先利其器.倘若不懂得构建一套大数据挖掘环境,何来谈Data Mining!何来领悟“Data Mining Engineer”中的工程二字!也仅仅是在做数据分析相关的事罢了!此文来 ...
- ### Paper about Event Detection
Paper about Event Detection. #@author: gr #@date: 2014-03-15 #@email: forgerui@gmail.com 看一些相关的论文. 1 ...
- In-Stream Big Data Processing
http://highlyscalable.wordpress.com/2013/08/20/in-stream-big-data-processing/ Overview In recent y ...
随机推荐
- 内核开启VF小结
2017-8-29 16:33:40 内核开启VF小结: 1. eth2上创建4个VFecho 4 > /sys/class/net/eth2/device/sriov_numvfs2. 关闭e ...
- Canvas画板
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAA6QAAAGgCAIAAAAy0z21AAAgAElEQVR4nO3dfYwkZ30n8JqZfcNex8
- TP5中的小知识
在TP5中如果想用select 查询后,变成数组,用toArray()这个函数的话,必须在连接数据库中把 数据集返回类型变成 'resultset_type'=>'\think\Collecti ...
- mac 下配置Android sdk
1.通过homebrew进行安装 地址:https://brew.sh/index_zh-cn.html 2.homebrew install android sdk 3.找到路径如: /Users ...
- HTML(简介及常用标签)
一.HTML简介 1.1 html是什么? 超文本标记语言(Hypertext Markup Language,HTML)通过标签语言来标记要显示的网页中的各个部分.一套规则,浏览器认识的规则. 浏览 ...
- mac终端下连接阿里云服务器
通过ssh连接 ssh 用户名@地址 ssh root@xx.xxx.xxx.xx https://www.jianshu.com/p/f034817a7837 最后还是通过 FileZilla 连 ...
- hdu-4819-线段树套线段树
http://acm.hdu.edu.cn/showproblem.php?pid=4819 给出一个N*N的矩阵,每次询问一个m*m的子矩阵里的floor((maxv+minv)/2)并把中间的元素 ...
- servlet-api-2.4.jar not loaded(转)
信息: validateJarFile(D:/xj/workspace/webworktest/webapp/WEB-INF/lib/servlet-api-2.4.jar) - jar not lo ...
- Python错误调试-raise、assert
raise: raise语句手工引发一个异常:,这样做程序不会因异常而终止,而是运行报错 1 "raise" [expression ["," expressi ...
- [luogu P3628] [APIO2010]特别行动队
[luogu P3628] [APIO2010]特别行动队 题目描述 你有一支由 n 名预备役士兵组成的部队,士兵从 1 到 n 编号,要将他们拆分 成若干特别行动队调入战场.出于默契的考虑,同一支特 ...