[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 ...
随机推荐
- Confluence 6 空间权限和链接到相关的空间
空间权限 每一个空间将会创建一个默认的权限.创建空间的用户将会自动具有空间管理员(space admin)的权限,这个的意思是你可以为其他用户和用户组赋予空间访问和管理的权限. 请查看 Space P ...
- es的mapping设置
自定义mapping的api PUT test_index { "mappings": { #mappings关键字 "doc": { #type " ...
- DedecmsV5.7本地上传缩略图无法自动添加水印的解决方法
问题:dedecms后台 系统->图片水印设置 图片水印设置有开启了,但是本地上传缩略图无法自动添加水印 网上有很多资料,所以记录一下 1.打开dede(实际项目后台文件夹)/archives_ ...
- List<String> 和 ArrayList<String>的区别(转载)
最近对这两个问题比较懵逼,关于List和ArrayList.List<String> list = new ArrayList<String>(); 好了,先搞明白List 和 ...
- 384. Shuffle an Array(java,数组全排列,然后随机取)
题目: Shuffle a set of numbers without duplicates. 分析: 对一组不包含重复元素的数组进行随机重排,reset方法返回最原始的数组,shuffle方法随机 ...
- java类的设计原则
1.内聚性 类应该描述一个单一的实体,所有的类操作应该在逻辑上相互配合,支持一个连贯性的目标.例如:学生和教职工属于不同的实体,应该定义两个类. 2.一致性 要遵循一定的设计风格和命名习惯.给类.方法 ...
- python theading线程开发与加锁、信号量、事件等详解
线程有2种调用方式,如下: 直接调用 import threading import time def sayhi(num): #定义每个线程要运行的函数 print("running on ...
- leetcode-algorithms-14 Longest Common Prefix
leetcode-algorithms-14 Longest Common Prefix Write a function to find the longest common prefix stri ...
- awr相关
手工生成awr快照SQL> exec dbms_workload_repository.create_snapshot; PL/SQL procedure successfully comple ...
- Mysql设置自增字段的方法
#int : 字段类型 alter table 表名 modify 字段名 int auto_increment primary key