[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 ...
随机推荐
- BigInteger 类 和 BigDecimal 类
一 .BigInteger BigInteger类在计算和处理任意大小的整数方面是很有用的. BigInteger 任意大的整数,原则上是,只要你的计算机的内存足够大,可以有无限位的. BigInte ...
- python记录_day018 md5加密
MD5 用法: import hashlib obj = hashlib.md5(加盐) obj.update(明文的bytes) obj.hexdigest() 获取密文 示例: import ha ...
- bzoj2565: 最长双回文串 pam
题意:找一个串中的最长连续两个回文子串长度 题解:建两个回文树,一个正着,一个反着,每次add之后last的长度就是后缀最长的回文串长度,然后两边加一遍即可 /******************** ...
- python中sys.argv[]的使用
sys.argv[]主要用于程序从外部获取参数.其参数个数可以是多个,组建成一个列表(list). 几个简单示例如下: fun_test.py: #!/usr/bin/env python # -*- ...
- set集合深浅拷贝以及知识补充
一. 对之前的知识点进行补充. 1. str中的join方法. 把列表转换成字符串 li = ["李嘉诚", "麻花藤", "黄海峰", & ...
- [CodeForces - 197D] D - Infinite Maze
D - Infinite Maze We've got a rectangular n × m-cell maze. Each cell is either passable, or is a wal ...
- 水题系列一:Circle
问题描述:Circle 小明在玩游戏,他正在玩一个套圈圈的游戏.他手里有 L 种固定半径的圆圈,每一种圆 圈都有其固定的数量.他要把这些圆圈套进 N 个圆形槽中的一个.这些圆形槽都有一个最 小半径和最 ...
- SQL Server查询优化中的两个选项
本文中,我们将介绍两个SQL Server中的可用概念,它们是使用SQL Server时值得注意的技术. 1. OPTIMIZE FOR Unknown SQL Server 2005版 ...
- IIS无法启动,应用程序池自动关闭
问题:打开网站中的资源,对应的应用程序池就自动停止 解决方案:在应用程序池上--右键--高级设置--进程模型--标识,更改了这项里的“内置账户”.将原有的“ApplicationPoolIdentit ...
- koa学习
http://www.ruanyifeng.com/blog/2017/08/koa.html