Optimizing Cost and Performance Trade-Offs for MapReduce Job Processing in the Cloud



Similar documents
Exploiting Cloud Heterogeneity for Optimized Cost/Performance MapReduce Processing

Exploiting Cloud Heterogeneity to Optimize Performance and Cost of MapReduce Processing

Performance Modeling of MapReduce Jobs in Heterogeneous Cloud Environments Zhuoyao Zhang University of Pennsylvania

Parameterizable benchmarking framework for designing a MapReduce performance model

DyScale: a MapReduce Job Scheduler for Heterogeneous Multicore Processors

Automated Profiling and Resource Management of Pig Programs for Meeting Service Level Objectives

Pig Program Optimization and Creative Design

The Impact of Capacity Scheduler Configuration Settings on MapReduce Jobs

SLO-Driven Right-Sizing and Resource Provisioning of MapReduce Jobs

Duke University

A Hadoop MapReduce Performance Prediction Method

Towards Improving MapReduce Task Scheduling Using Online Simulation Based Predictions

Using a Tunable Knob for Reducing Makespan of MapReduce Jobs in a Hadoop Cluster

Automated Profiling and Resource Management of Pig Programs for Meeting Service Level Objectives

Performance and Energy Efficiency of. Hadoop deployment models

PERFORMANCE MODELING AND RESOURCE MANAGEMENT FOR MAPREDUCE APPLICATIONS

PIKACHU: How to Rebalance Load in Optimizing MapReduce On Heterogeneous Clusters

HiBench Introduction. Carson Wang Software & Services Group

MINIMIZING STORAGE COST IN CLOUD COMPUTING ENVIRONMENT

Network-Aware Scheduling of MapReduce Framework on Distributed Clusters over High Speed Networks

Deadline-based Workload Management for MapReduce Environments: Pieces of the Performance Puzzle

: Tiering Storage for Data Analytics in the Cloud

A Framework for Performance Analysis and Tuning in Hadoop Based Clusters

Report 02 Data analytics workbench for educational data. Palak Agrawal

A Novel Cloud Based Elastic Framework for Big Data Preprocessing

IMPROVED FAIR SCHEDULING ALGORITHM FOR TASKTRACKER IN HADOOP MAP-REDUCE

Hadoop Scheduler w i t h Deadline Constraint

Analysis and Modeling of MapReduce s Performance on Hadoop YARN

An improved task assignment scheme for Hadoop running in the clouds

CSE-E5430 Scalable Cloud Computing Lecture 2

Payment minimization and Error-tolerant Resource Allocation for Cloud System Using equally spread current execution load

MAPREDUCE [1] is proposed by Google in 2004 and

An Enhanced MapReduce Workload Allocation Tool for Spot Market Resources

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

Chapter 7. Using Hadoop Cluster and MapReduce

A Contention Aware Hybrid Evaluator for Schedulers of Big Data Applications in Computer Clusters

A Cost-Evaluation of MapReduce Applications in the Cloud

INFO5011. Cloud Computing Semester 2, 2011 Lecture 11, Cloud Scheduling

Task Scheduling in Hadoop

Introduction to Hadoop

Mesos: A Platform for Fine- Grained Resource Sharing in Data Centers (II)

Herodotos Herodotou Shivnath Babu. Duke University

Guidelines for Selecting Hadoop Schedulers based on System Heterogeneity

Clash of the Titans: MapReduce vs. Spark for Large Scale Data Analytics

Master s Thesis: A Tuning Approach Based on Evolutionary Algorithm and Data Sampling for Boosting Performance of MapReduce Programs

Figure 1. The cloud scales: Amazon EC2 growth [2].

DEPLOYING AND MONITORING HADOOP MAP-REDUCE ANALYTICS ON SINGLE-CHIP CLOUD COMPUTER

The Performance Characteristics of MapReduce Applications on Scalable Clusters

Hadoop framework implementation and performance analysis on cloud. Kyrgyzstan. Sütçüimam University, Kahramanmaraş, Turkey. Kyrgyzstan.

Hadoop Architecture. Part 1

Towards a Resource Aware Scheduler in Hadoop

Administrative Issues

A Hybrid Scheduling Approach for Scalable Heterogeneous Hadoop Systems

Scheduling Data Intensive Workloads through Virtualization on MapReduce based Clouds

Architecting for the next generation of Big Data Hortonworks HDP 2.0 on Red Hat Enterprise Linux 6 with OpenJDK 7

Non-intrusive Slot Layering in Hadoop

Maximizing Hadoop Performance and Storage Capacity with AltraHD TM

Dynamically controlling node-level parallelism in Hadoop

DATA MINING WITH HADOOP AND HIVE Introduction to Architecture

ishuffle: Improving Hadoop Performance with Shuffle-on-Write

Survey on Scheduling Algorithm in MapReduce Framework

Energy Efficient MapReduce

MAPREDUCE [1] has become an important paradigm for

MapReduce Job Processing

Understanding Hadoop Performance on Lustre

A STUDY ON HADOOP ARCHITECTURE FOR BIG DATA ANALYTICS

Introduction to Cloud Computing

No One (Cluster) Size Fits All: Automatic Cluster Sizing for Data-intensive Analytics

Open source Google-style large scale data analysis with Hadoop

Data Semantics Aware Cloud for High Performance Analytics

Performance Comparison of Intel Enterprise Edition for Lustre* software and HDFS for MapReduce Applications

Benchmarking Hadoop & HBase on Violin

A Generic Auto-Provisioning Framework for Cloud Databases

Research on Job Scheduling Algorithm in Hadoop

The Comprehensive Performance Rating for Hadoop Clusters on Cloud Computing Platform

MROrchestrator: A Fine-Grained Resource Orchestration Framework for Hadoop MapReduce

Optimizing the Cost for Resource Subscription Policy in IaaS Cloud

Do You Feel the Lag of Your Hadoop?

Heterogeneous Workload Consolidation for Efficient Management of Data Centers in Cloud Computing

Performance Comparison of SQL based Big Data Analytics with Lustre and HDFS file systems

Towards Synthesizing Realistic Workload Traces for Studying the Hadoop Ecosystem

A Study on Workload Imbalance Issues in Data Intensive Distributed Computing

Characterizing Task Usage Shapes in Google s Compute Clusters

Efficient Data Replication Scheme based on Hadoop Distributed File System

Hadoop: A Framework for Data- Intensive Distributed Computing. CS561-Spring 2012 WPI, Mohamed Y. Eltabakh

Keywords: Big Data, HDFS, Map Reduce, Hadoop

Extending Hadoop beyond MapReduce

Joint Optimization of Overlapping Phases in MapReduce

Big Data With Hadoop

User-Centric Heterogeneity-Aware MapReduce Job Provisioning in the Public Cloud

Cost-effective Resource Provisioning for MapReduce in a Cloud

Apache Hadoop. Alexandru Costan

Introduction to Big Data! with Apache Spark" UC#BERKELEY#

Towards Predictable Datacenter Networks

Load Distribution in Large Scale Network Monitoring Infrastructures

A What-if Engine for Cost-based MapReduce Optimization

Optimal Service Pricing for a Cloud Cache

Characterizing Task Usage Shapes in Google s Compute Clusters

Evaluating Task Scheduling in Hadoop-based Cloud Systems

Big Data in the Enterprise: Network Design Considerations

Transcription:

Optimizing Cost and Performance Trade-Offs for MapReduce Job Processing in the Cloud Zhuoyao Zhang University of Pennsylvania zhuoyao@seas.upenn.edu Ludmila Cherkasova Hewlett-Packard Labs lucy.cherkasova@hp.com Boon Thau Loo University of Pennsylvania boonloo@seas.upenn.edu Abstract Cloud computing offers a new, attractive option to customers for provisioning a suitable size Hadoop cluster, consuming resources as a service, executing the MapReduce workload, and paying for the time these resources were used. One of the open questions in such environments is the choice and the amount of resources that a user should lease from the service provider. In this work 1, we offer a framework for evaluating and selecting the right underlying platform (e.g.,,, or EC2 instances) and achieving the desirable Service Level Objectives (SLOs). A user can define a set of different SLOs: i) achieving a given completion time for a set of MapReduce jobs while minimizing the cost (budget), or ii) for a given budget select the type and the number of instances that optimize the MapReduce workload performance (i.e., the completion time of the jobs). We demonstrate that the application performance of a customer workload may vary significantly on different platforms. This makes a selection of the best cost/performance platform for a given workload being a challenging problem. Our evaluation study and experiments with Amazon EC2 platform reveal that for different workload mixes the optimized platform choice may result in 37-7% cost savings for achieving the same performance objectives when using different (but seemingly equivalent) choices. The results of our simulation study are validated through experiments with Hadoop clusters deployed on different Amazon EC2 instances. I. INTRODUCTION Cloud computing provides a new delivery model with virtually unlimited computing and storage resources. It offers a compelling alternative to rent resources in a pay-as-you-go fashion. It is an attractive and cost-efficient option for many users because acquiring and maintaining a complex, -scale infrastructure such as a Hadoop cluster requires a significant up-front investment and then a continuous maintenance and management support. A typical cloud environment offers a choice of different capacity Virtual Machines for deployment with different prices. For example, the Amazon EC2 platform provides a choice of,, and VM instances, where the CPU and RAM capacity of a VM instance is two times r than a capacity of a VM instance, and the CPU and RAM capacity of a VM instance is two times r than a capacity of a VM instance. These differences are also reflected in the pricing: the instance is twice (four times) more expensive compared with the () instance. It means that for the same price a user may deploy a 4-node Hadoop cluster using 4 VM instances (with one map and one reduce slot per instance) or a 1-node Hadoop cluster using 1 VM instances (with four map and four reduce slots per instance). Therefore, a user is facing a variety of platform 1 This work was originated during Z. Zhang s internship at HP Labs. Prof. B. T. Loo a nd Z. Zhang are supported in part by NSF grants CNS-1117185 and CNS-845552. 978-1-4799-913-1/14/$31. c 214 IEEE and configuration choices that can be obtained for the same budget. Intuitively, these choices may look similar, and it might not be clear whether there is much difference in MapReduce application performance when these applications are executed on different type platforms. Figure 1 shows two motivating examples. In these experiments, we execute two popular applications TeraSort and KMeans on three Hadoop clusters deployed with different type VM instances: i) 4 VMs, ii) 2 VMs, and iii) 1 VM instances. We configure Hadoop clusters according to their nodes capacity: each VM instance is configured with one map and one reduce slot per instance; similarly, () VM instances are configured with two (four) map and two (four) reduce slots per instance. Therefore, these clusters can be obtained for the same price per time unit. Job Completion Time (s) 6 5 4 3 2 1 (a) TeraSort Job Completion Time (s) 4 35 3 25 2 15 1 5 (b) KMeans Fig. 1. Completion time of two applications when executed on different type EC2 instances. Apparently, a Hadoop cluster with 4 VMs provides the best completion time for a TeraSort application as shown in Fig. 1 (a), while a Hadoop cluster with 1 VMs is the best option for KMeans as shown in Fig. 1 (b). It demonstrates that seemingly equivalent platform choices for a Hadoop cluster might result in a different application performance. In this work, we aim to solve the problem of the platform choice to provide the best cost/performance trade-offs for a given MapReduce workload. As shown in Fig. 1 this choice is non-trivial and depends on the application characteristics. The problem becomes even more challenging for MapReduce workload with performance objectives to minimize the makespan (the overall completion time) of the given job set. In this work, we offer a novel framework for solving the following two problems. Given a workload, select the type and size of the underlying platform for a Hadoop cluster that provides best cost/performance trade-offs: i) minimizing the cost (budget) while achieving a given makespan target, or ii) minimizing the achievable jobs makespan for a given budget. In the designed framework, we collect jobs profiles from a given set, create an optimized job schedule that minimizes jobs makespan (as a function of job profiles and a cluster size), and

then obtain the accurate estimates of the achievable makespan by replaying jobs traces in the simulator. In our performance study, we use a set of 13 diverse MapReduce applications, which we use to create two different workload mixes. Our evaluation study and experiments with Amazon EC2 platform reveal that for different workload mixes the optimized platform choice may result in 37-7% cost savings for achieving the same performance objectives when using different (but seemingly equivalent) choices. The results of our simulation study are validated through experiments with Hadoop clusters deployed on different Amazon EC2 instances. The remainder of the paper presents our results in more detail. II. PROBLEM DEFINITION AND OUR APPROACH For a given a set of jobs J we aim to offer a framework for solving the following two problems: given a customer makespan target T (i.e., a desirable completion time for the entire set of jobs J ), select the instance type, the cluster size, and propose the job schedule for meeting the makespan target T while minimizing the cost; given a customer budget C, select the instance type, the cluster size, and propose the job schedule, that minimizes achievable makespan for a given cost C. The designed framework has the three main components: Job Profiler: it extracts two different types of information that characterize the job J execution: 1) a compact job profile that estimates the average and maximum task durations for different execution phases of the job, i.e., map, shuffle/sort, and reduce phases; 2) a detailed job processing trace that consists of NM J of map task durations and NR J shuffle/sort and reduce phase durations where NM J and N R J represent the number of map and reduce tasks within a job J. The job profile and processing trace can be obtained from the past run of this job [11] or extracted from the sample execution of this job on the er dataset [12]. This information is created for each platform of choice, e.g.,,, and EC2 instances. Job Scheduler: it minimizes the overall completion time of a given set of MapReduce jobs by designing an optimized MapReduce jobs execution. We apply the classic Johnson algorithm [7] that was proposed as an optimal solution for two-stage production job schedule. A simulator for Performance/Cost Analysis: by varying the cluster size, the simulator generates the set of solutions across different platforms in a form of the trade-off curves: the cluster size and the achieved makespan define the performance/cost) metric for a given platform. These trade-off curves enable us to select the appropriate solution: the minimized makespan for a given cost or the minimized cost for achieving a given makespan. Figure 2 shows the diagram for the framework execution in decision making process per selected platform type. For Fig. 2. Solution Outline. example, if the platforms of interest are,, and EC2 VM instances then the framework will generate three trade-off curves. For each platform and a given Hadoop cluster size, the Job Scheduler component generates the optimized MapReduce job schedule. Then the jobs makespan is obtained by replaying the job traces in the simulator according to the generated schedule. After that the size of the cluster is increased by one instance (in the cloud environment, it is equivalent to adding a node to a Hadoop cluster) and the iteration is repeated: a new job schedule is generated and its makespan is evaluated with the simulator, etc. We have a choice of stop conditions for iterations: either a user can set a range of values for the cluster size (driven by the cost/budget constraints), or at some point, the increased cluster size does not improve the achievable makespan. The latter condition typically happens when the Hadoop cluster is enough to accommodate all the jobs to be executed concurrently, and therefore, the increased cluster size cannot improve the jobs makespan. III. SOLUTION FRAMEWORK This section describes the main framework components. A. Job Profiler MapReduce job execution is comprised of two stages: map stage and reduce stage. The map stage is partitioned into map tasks and the reduce stage is partitioned into reduce tasks, and they are distributed and executed across multiple machines. Each map task processes a logical split of the input data that generally resides on a distributed file system. The map task applies the user-defined map function on each record and buffers the resulting output. This intermediate data is hashpartitioned for the different reduce tasks and written to the local hard disk of the worker executing the map task. Our Job Profiler module uses the past job run(s) and extracts a detailed job profile that contains recorded durations of all map and reduce tasks. 2 A similar job trace can be extracted from the Hadoop job tracker logs using tools such as Rumen [1]. The obtained map/reduce task distributions can be used for extracting the distribution parameters and generating scaled traces, i.e., generating the replayable traces of the job execution on the dataset from the sample job execution on the er dataset as described in [12]. These job traces can be replayed using a MapReduce simulator [1] or used for creating the compact job profile for analytic models. For predicting the job completion time we use a compact job profile that characterize the job execution during map, 2 The shuffle stage is included in the reduce task. For a first shuffle phase that overlaps with the entire map phase, only a complementary (non-overlapping) portion is included in the reduce task.

shuffle, and reduce phases via average and maximum task durations. The proposed MapReduce performance model [11] evaluates lower bounds TJ low and upper bounds T up J on the job completion time. It is based the Makespan Theorem for computing performance bounds on the completion time of a given set of n tasks that are processed by k servers, (e.g., n map tasks are processed by k map slots in MapReduce environment), the completion time of the entire n tasks is proven to be at least: T low = avg n k and at most T up (n 1) = avg + max k The difference between lower and upper bounds represents the range of possible completion times due to task scheduling non-determinism. As was shown in [11], the average of lower and upper bounds (T avg J ) is a good approximation of the job completion time (typically, it is within 1%). Using this approach, we can estimate the duration of map and reduce stages of a given job as a function of allocated resources (i.e., on different size Hadoop clusters). B. Optimized Job Schedule We observe that for a set of MapReduce jobs (with no data dependencies between them) the order in which jobs are executed might have a significant impact on the overall processing time, and therefore, on the utilization and the cost of the rented Hadoop cluster. For data-independent jobs, once the first job completes its map stage and begins the reduce stage, the next job can start executing its map stage with the released map resources in a pipelined fashion. There is an overlap in executions of map stage of the next job and the reduce stage of the previous one. As a motivating example, let us consider two MapReduce jobs that have the following map and reduce stage durations: Job J 1 has a map stage duration of J M 1 = 1s and the reduce stage duration of J R 1 = 1s. Job J 2 has a map stage duration of J M 2 = 1s and the reduce stage duration of J R 2 = 1s. There are two possible executions shown in Figure 3: J 1M =1s J 1R =1s J 1 J2M =1s J 2R =1s (a) J 1 is followed by J 2. J 2M =1s J 2R =1s J 2 J 2 J 1M =1s J 1R =1s J 1 (b) J 2 is followed by J 1. Fig. 3. Impact of concurrent job scheduling on their completion time. J 1 is followed by J 2 shown in Figure 3(a). The reduce stage of J 1 overlaps with the map stage of J 2 leading to overlap of only 1s. The total completion time of processing two jobs is 1s + 1s + 1s = 21s. J 2 is followed by J 1 shown in Figure 3(b). The reduce stage of J 2 overlaps with the map stage of J 1 leading to a much better pipelined execution and a r overlap of 1s. The total makespan is 1s+1s+1s = 12s. There is a significant difference in the job completion time (75% in the example above) depending on the execution order of the jobs. Thus, let J = {J 1, J 2,..., J n } be a set of n MapReduce jobs with no data dependencies between them. We need to generate an order (a schedule) of execution of jobs J i J such that the makespan of the entire set is minimized. For minimizing the makespan of a given set of MapReduce jobs J = {J 1, J 2,..., J n } we apply the classic Johnson algorithm [7], [13] that was proposed for building an optimal job schedule in two-stage production systems. Let us consider a collection J of n jobs, where each job J i is represented by the pair (m i, r i ) of map and reduce stage durations respectively. Note, we can estimates m i and r i by using bounds-based model. Let us augment each job J i = (m i, r i ) with an attribute D i that is defined as follows: { (mi, m) if min(m D i = i, r i ) = m i, (r i, r) otherwise. The first argument in D i is called the stage duration and denoted as Di 1. The second argument is called the stage type (map or reduce) and denoted as Di 2. Algorithm 1 shows how an optimal schedule can be constructed using Johnson s algorithm. Algorithm 1 Johnson s Algorithm Input: A set J of n MapReduce jobs. D i is the attribute of job J i as defined above. Output: Schedule σ (order of jobs execution.) 1: Sort the original set J of jobs into the ordered list L using their stage duration attribute D 1 i 2: head 1, tail n 3: for each job J i in L do 4: if D 2 i = m then 5: // Put job J i from the front 6: σ head J i, head head + 1 7: else 8: // Put job J i from the end 9: σ tail J i, tail tail - 1 1: end if 11: end for First, we sort all the n jobs from the original set J in the ordered list L in such a way that job J i precedes job J i+1 if and only if min(m i, r i ) min(m i+1, r i+1 ). In other words, we sort the jobs using the stage duration attribute D 1 i in D i (it represents the est duration of the two stages). Then the algorithm works by taking jobs from list L and placing them into the schedule σ from the both ends (head and tail) and proceeding towards the middle. If the stage type in D i is m, i.e., represents the map stage, then the job J i is placed from the head of the schedule, otherwise from the tail. The complexity of Johnson s Algorithm is dominated by the sorting operation and thus is O(n log n). C. Simulator In this work, we use the enhanced version of MapReduce simulator SimMR [1] as shown in Figure 4. The basic blocks of the simulator are the following: 1) Trace Generator a module that generates a replayable workload trace. This trace is generated either

Fig. 4. scheduler Simulator. Workloads with job profiles Simulator engine Cluster description Makespan costs from the detailed job profile (provided by the Job Profiler) or by feeding the distribution parameters for generating the synthetic trace (this path is taken when we need to generate the job execution traces from the sampled executions on the er datasets). 2) Simulator Engine a discrete event simulator that takes the cluster configuration information and accurately emulates the Hadoop job master decisions for map/reduce slot allocations across multiple jobs. 3) Scheduling policy a scheduling module that dictates the jobs ordering and the amount of allocated resources to different jobs over time. Thus, for a given Hadoop cluster size and a given set of jobs, their overall completion time (makespan) is obtained by replaying the job traces in the simulator accordingly to the generated Johnson s schedule for ordering these jobs. IV. EVALUATION In this section, we describe the experimental testbeds and MapReduce workloads used in our study. We analyze the application performance and the job profiles when these applications are executed on different platforms of choice, e.g.,,, and Amazon EC2 instances. By applying our framework we generate the trade-off curves that are driving the decision making process. Finally, we validate the simulation results through experiments with Hadoop clusters deployed on different Amazon EC2 instances. A. Experimental Testbeds and Workloads In our experiments, we use Amazon EC2 platform. It offers different capacity Virtual Machines (VMs) for deployment at different price. Table I provides descriptions of VM instance types used in our experiments. As we can see, the compute and memory capacity of a VM instance (m1.) is doubled compared to a VM instance (m1.) and similarly, VM instances (m1.) have a doubled capacity compared to the ones. These differences are similarly reflected in pricing. Deployed Hadoop clusters are configured with different number of map and reduce slots for different VM instances (according to the capacity) as shown in Table I. Each VM instance is deployed with 1GB of Elastic Block Storage (EBS). We use Hadoop 1.. in all the experiments. The file system blocksize is set to 64MB and the replication level is set to 3. TABLE I. EC2 TESTBED DESCRIPTION. Instance price CPU capacity (relative) RAM #m,r type (GB) slots Small $.6 ph 1 EC2 Compute Unit (1 virtual core 1.7 1, 1 with 1 EC2 Compute Unit) Medium $.12 ph 2 EC2 Compute Unit (1 virtual core 3.75 2, 2 with 2 EC2 Compute Units) Large $.24 ph 4 EC2 Compute Units (2 virtual cores with 2 EC2 Compute Units) 7.5 4, 4 In the performance study, we use a set of 13 applications made available by the Tarazu project [3]. Table II provides a high-level summary of these 13 applications with the corresponding job settings (e.g., the number of map/reduce tasks). Applications 1, 8, and 9 process synthetically generated data. Applications 2 to 7 use the Wikipedia articles dataset as input. Applications 1 to 13 use the Netflix movie ratings dataset. These applications perform very different data manipulations. To provide some additional insights in the amounts of data flowing through the MapReduce processing pipeline, we also show the overall size of the input data, intermediate data (i.e., data generated between map and reduce stages), and the output data (i.e., the data written by the reduce stage). TABLE II. APPLICATION CHARACTERISTICS. Application Input data Input Interm Output #map,red (type) data data data tasks (GB) (GB) (GB) 1. TeraSort Synthetic 31 31 31 495, 24 2. WordCount Wikipedia 5 9.8 5.6 788, 24 3. Grep Wikipedia 5 1 1x1 8 788, 1 4. InvIndex Wikipedia 5 1.5 8.6 788, 24 5. RankInvIndex Wikipedia 46 48 45 745, 24 6. TermVector Wikipedia 5 4.1.2 788, 24 7. SeqCount Wikipedia 5 45 39 788, 24 8. SelfJoin Synthetic 28 25.14 448, 24 9. AdjList Synthetic 28 29 29 58, 24 1. HistMovies Netflix 27 3x1 5 7x1 8 428, 1 11. HistRatings Netflix 27 2x1 5 6x1 8 428, 1 12. Classification Netflix 27.8.6 428, 5 13. KMeans Netflix 27 27 27 428, 5 We perform two case studies with two workloads W1 and W2 created from these applications: W1 it contains all 13 applications shown in Table II. W2 it contains ten applications: 1-8 and 1-11, i.e., excluding from the entire set the following three applications: AdjList, Classification, and KMeans. B. Application Performance and Job Profiles on Hadoop Clusters with Different EC2 Instances We execute the set of 13 applications shown in Table II on three Hadoop clusters deployed with different types of EC2 VM instances (they can be obtained for the same price per time unit): i) 4 VMs, ii) 2 VMs, and iii) 1 VM instances. We configure these Hadoop clusters according to their nodes capacity as shown in Table I, with 1 additional instance deployed as the NameNode and JobTracker. These experiments pursue the following goals: i) to demonstrate the performance impact of executing these applications on the Hadoop clusters deployed with different EC2 instances; and 2) to collect the detailed job profiles for creating the job traces used for replay by the simulator and trade-off analysis in determining the optimal platform choice. Figure 5 presents the completion times of 13 applications executed on the three different EC2-based clusters. The results show that the platform choice may significantly impact the application processing time. Note, we break the Y-axis as the KMeans and Classification applications take much longer time to finish compared to other applications. Figure 6 shows the normalized results with respect to the execution time of the same job on the Hadoop cluster formed with VM instances. For 7 out 13 applications, the Hadoop cluster formed with instances leads to the best completion time (and the est cost). However, for the CPU-intensive applications

TABLE III. JOB PROFILES ON THE EC2 CLUSTER WITH SMALL INSTANCES (TIME IN SEC) Application avgmap maxmap avgshuffle maxshuffle avgreduce maxreduce map STDEV shuffle STDEV reduce STDEV TeraSort 29.1 46.7 248.5 317.5 31.2 41.3.82% 4.51%.97% WordCount 71.5 147. 218.7 272. 12.1 22.4 1.16% 5.83% 3.68% Grep 19. 51.4 125.7 125.7 4.5 4.5 1.19% 26.43% 1.53% InvIndex 83.9 17. 196.8 265.2 18.2 27.6 1.33% 8.3% 3.96% RankInvIndex 35.4 68.8 376. 479. 81.9 12. 1.5% 3.79%.81% TermVector 98.9 16.3 36. 1239.5 137.2 111.7.78% 2.45% 2.45% SeqCount 11.2 23. 256.8 454.2 54.1 82.3 1.1% 3.63% 6.62% SelfJoin 11.9 2.4 217.9 246.5 12.3 21.4.7% 4.87% 3.12% AdjList 265.9 415.9 72.7 121.8 291.1 398.1 1.53% 6.57%.84% HistMovies 17.9 49.2 138.9 138.9 3.4 3.4 1.49% 4.85% 34.84% HistRating 58.9 19.8 111.8 111.8 4.8 4.8 2.1% 35.58% 22.41% Classif 3147.3 447.2 58.5 61.5 4. 6.9 1.21% 12.76% 3.13% Kmeans 3155.9 3618.5 8.4 21.9 87.5 48.9.32% 3.9% 11.43% TABLE IV. JOB PROFILES ON THE EC2 CLUSTER WITH MEDIUM INSTANCES (TIME IN SEC) Application avgmap maxmap avgshuffle maxshuffle avgreduce maxreduce map STDEV shuffle STDEV reduce STDEV TeraSort 36.9 46.1 466.3 553.1 26.5 34.3 1.6% 14.7% 1.21% WordCount 83. 127.4 562.4 771.6 11.6 23..48% 7.1% 9.9% Grep 23.8 56.7 256.6 256.6 3.2 3.2 4.95% 24.13% 9.48% InvIndex 11. 15.4 449.5 536.3 13.6 2.2.52% 8.65% 1.62% RankInvIndex 45.7 81.1 741.6 876.5 64. 77.2.63% 9.4% 2.77% TermVector 128.1 189.3 432.4 1451.4 71.9 576.4.23% 7.8% 2.81% SeqCount 126.8 251. 482.1 557.1 35. 43.2.52% 21.7% 14.98% SelfJoin 11.1 18.2 48.1 475.1 11.2 19.9.92% 13.86% 1.65% AdjList 27.1 42. 163.2 221.6 26.4 281.8 2.74% 8.7% 1.16% HistMovies 2.1 47.7 246.7 246.7 3.7 3.7 3.14% 26.39% 17.4% HistRating 71.7 13.7 24.4 24.4 5. 5..23% 31.39% 14.22% Classif 313.8 474.3 177.2 211.8 3.9 6.1.82% 44.3% 4.33% Kmeans 2994. 3681.2 189.7 392.1 51.7 28.4 3.93% 8.84% 6.96% TABLE V. JOB PROFILES ON THE EC2 CLUSTER WITH LARGE INSTANCES (TIME IN SEC) Application avgmap maxmap avgshuffle maxshuffle avgreduce maxreduce map STDEV shuffle STDEV reduce STDEV TeraSort 27.3 55.7 86.4 1128.4 2. 7.6.66% 7.78% 16.14% WordCount 54.7 126.3 128.6 1163.9 12.9 59.2 4.33% 1.24% 9.15% Grep 18.3 59.7 791.8 791.8 4.3 4.3 3.5% 16.48% 22.81% InvIndex 61.8 18.4 1152.6 1374.5 14.9 61.7 6.47% 5.1% 8.68% RankInvIndex 28.3 71.5 1155.8 138.6 4.5 88.5 1.49% 9.2% 8.19% TermVector 85.3 194.7 17.6 1573.9 3.2 259.2 3.88% 5.98% 1.4% SeqCount 62. 117.5 146.1 1283.2 37.6 9.9 1.51% 6.7% 2.1% SelfJoin 16.4 32.4 115.7 1235.9 18.5 88.7 1.93% 4.86% 19.11% AdjList 149. 311.3 436.9 531.5 149.1 348.1.56% 13.34% 2.78% HistMovies 22.3 8.2 724.2 724.2 5.2 5.2 6.97% 22.46% 17.25% HistRating 51.4 187.8 628.6 628.6 3.6 3.6 1.59% 21.1% 4.83% Classif 14.6 1946.5 711.2 1113.3 3.9 9.4.87% 37.15% 27.74% Kmeans 124.6 244.7 716.9 866.9 58.5 364.3 1.31% 1.75% 5.25% Job Completion Time (s) 36 3 12 1 8 6 4 2 Fig. 5. Normalized Completion Time 8 7 6 5 4 3 2 1 Fig. 6. TeraSort TeraSort WordCount Grep InvIndex RankInvInd TermVect SeqCount SelfJoin AdjList HisMov HisRat Classific KMeans Job completion times on different EC2-based Hadoop clusters. WordCount Grep InvIndex RankInvInd TermVect SeqCount SelfJoin AdjList HisMov HisRat Classific KMeans Normalized completion times on different EC2-based clusters. such as Classification and KMeans, the Hadoop cluster formed with instances shows better performance. Tables III-V summarize the job profiles collected for these applications. They show the average and maximum durations for the map, shuffle and reduce phase processing as well as the standard deviation for these phases. The analysis of the job profiles show that the shuffle phase durations of the Hadoop cluster formed with instances are much longer compared to the clusters formed with instances. The reason is that the Amazon EC2 instance scaling is done with respect to the CPU and RAM capacity, while the storage and network bandwidth is only fractionally improved. As we configure a higher number of slots on instances, it increases the I/O and network contention among the tasks running on the same instance, and it leads to significantly increased durations of the shuffle phase. At the same time, the map task durations of most applications executed on the Hadoop cluster with instances are significantly improved, e.g., the map task durations of Classification and KMeans applications improved almost three times. The presented results show that a platform choice for a Hadoop cluster may have a significant impact on the application performance. Moreover, the choice of the right platform becomes a challenging task if an objective is to minimize the makespan (the overall completion time) for a given budget or minimize the cost for achieving a given makespan.

C. Analyzing Performance and Cost Trade-Offs Once the job profiles and job execution traces are collected, we can follow the proposed framework shown in Figure 2. For each platform of choice, i.e.,,, and EC2 instances, and a given Hadoop cluster size, the Job Scheduler component generates the optimized MapReduce job schedule using the Johnson algorithm. After that the overall jobs makespan is obtained by replaying the job traces in the simulator accordingly to the generated job schedule. At each iteration, the cluster size is increased by one instance (in this framework, it is equivalent to adding a node to a Hadoop cluster) and the process is repeated. Workload W1: Analysis of Performance and Cost Trade- Offs. Figure 7 shows the simulation results for an achievable, optimized makespan of W1 when it is processed by the Hadoop cluster with different number of nodes (instances) and the three platforms of choice:,, and EC2 instances. Fig. 7. 14 12 1 8 6 4 2 1 2 3 4 5 Number of instances Simulated makespan of W1 on the three platforms. For each instance type, the jobs makespan is inversely proportional to the Hadoop cluster size. However, there is a diminishing return for the cluster sizes above 1-2 nodes. For each point along the curves in Figure 7, we calculate the monetary cost for processing workload W1. It is obtained by multiplying the makespan time, the corresponding cluster size, and the EC2 instance cost per unit of time (in seconds). Figure 8 shows the obtained performance and cost tradeoffs for processing workload W1. The Y -axis shows the achievable makespan, while X-axis shows the corresponding cost across the three platforms of choice. Fig. 8. 2 15 1 5 1 2 3 4 5 6 7 8 9 cost ($) Makespan vs. cost trade-offs for W1 on the three platforms. Each point along the curves in Figure 8 corresponds to some point in Figure 7. Note, there could be multiple points from Figure 7 that result in either similar makespan or similar cost. At first, the makespan drops significantly with a increase in the corresponding cost. It represents the case when the Hadoop cluster is and adding more nodes could significantly reduce the total completion time. Therefore, while adding more nodes increases the cost, the improved makespan decreases the cluster time for rent. The tail of the curve corresponds to the situation when the increased cluster size results in the increased cost but provides very little performance improvements to the achievable makespan. Another interesting observation is that not all the curve points in Figure 8 are monotonous (e.g., see the curves for the clusters with and instances near the cost of $6). The reason is that at some cluster sizes, adding one more node might reduce the number of waves (rounds) in the job execution and significantly improve the jobs makespan. For example, we can clearly see in Figure 7 such drop points around the cluster sizes of 2 nodes for the clusters with and instances. As a result, the total cost drops significantly compared with the nearest points. By searching along the generated trade-off curves in Figure 8, we can determine the optimal solutions for the following problems: i) given a budget M, determine the platform type and the cluster size that leads to the minimized makespan; or ii) given a makespan target D, determine the platform type and the cluster size that minimizes the cost. To demonstrate and quantify the benefits of our approach, let us select the makespan target of 3 sec and the budget constraint of $65. These constraints are shown in Figure 8 with dashed lines. The minimal costs for processing workload W1 with makespan target of 3 seconds are $55.47, $56.38 and $35.33 with,, and instances respectively. Therefore, by selecting the Hadoop cluster formed with instances, we can save approx. 37% in monetary cost compared with clusters based on and instances. Similarly, for the budget of $65, the minimal makespan of 285 seconds can be achieved by the Hadoop cluster formed with instances. This results in 59.2% performance improvement compared with a makespan of 6874 seconds for Hadoop clusters based on and instances. Apparently, the Hadoop cluster formed with EC2 instances is the best choice for processing W1 workload for achieving different performance objectives. Workload W2: Analysis of Performance and Cost Trade- Offs. As demonstrated by Figures 5 and 6 the seven (out of ten) applications that comprise workload W2 show a better (individual) performance on the Hadoop cluster formed with instances. However, as in the case study with Workload W1, it does not necessary imply that the Hadoop cluster formed with EC2 instances will be the best cost/performance choice for meeting the performance objectives for executing the entire W2 workload and minimizing its makespan. Figure 9 shows the simulation results for an achievable, optimized makespan of W2 when it is processed by the Hadoop cluster with different number of nodes (instances) and the three platforms of choice:,, and EC2 instances. Now, using the results from Figure 9, we calculate the makespan versus cost trade-offs curves for new workload W2. These results are shown in Figure 1.

Fig. 9. Fig. 1. 5 4 3 2 1 2 4 6 8 1 12 14 Number of instances Simulated makespan of W2 on the three platforms. 1 8 6 4 2 1 2 3 4 5 cost ($) Makespan vs. cost trade-offs for W2 on the three platforms. To demonstrate and quantify the benefits of our approach, we select the makespan target of 2 sec and the budget constraint of $35. These constraints are shown in Figure 1 with dashed lines. Now, we can compare different achievable results for using Hadoop clusters formed with different types of EC2 instances. The minimal costs for processing workload W2 with makespan target of 2 seconds is $9. provided by the EC2 instances. This is 7.6% less compared to the case with instances that can achieve the same makespan at a cost of $3.67. However, given a budget of $35, the minimal makespan of 1487 seconds for processing workload W2 can be achieved by the Hadoop cluster formed with instances. This leads to 69.4% performance improvement compared with a makespan of 4855 seconds for a Hadoop cluster based on the instances. This outcome is interesting because it shows that the platform choice is non-trivial and additionally depends on the performance objectives. The case studies with workloads W1 and W2 demonstrate that the choice of the right platform for a Hadoop cluster is workload-dependent as well as influenced by the given performance objectives. D. Validation of Simulation Results To validate the accuracy of the simulation results we consider the three simulated makespan curves shown in Figure 9. They reflect the achievable makespan of workload W2 ordered according to the Johnson schedule and executed on different size Hadoop clusters with,, and EC2 instances. We select the makespan target of 2 seconds and identify the closest point to this target on each curve. Each of these three points corresponds to a simulated Hadoop cluster with 28, 2, 24 nodes formed by,, and EC2 instances respectively. We then deploy the Hadoop clusters with the required number of instances and execute the workload W2 (with the corresponding Johnson job schedule) on the deployed clusters. Figure 11 (a) shows the comparison between the simulated and the actual measured makespan (we repeated measurements 5 times). The results for and EC2 instances are very accurate. We can see a higher prediction error (17%) for instances. Partially, it is due to a higher variance in the job profile measurements collected on instances, especially during the shuffle phase, as shown in Table IV (Section IV-B). 3 25 2 15 1 5 Simulated time Execution time (a) with different number of instances. Fig. 11. Simulator validation. 2 1.5 1.5 Simulation with real trace Simulation with normal distribution Measured-CT (b) with synthetic trace. The simulation results in Section IV-C are obtained by replaying the job traces collected during the initial job profiling of workloads W1 and W2. Alternatively, the user can generate the synthetic traces defined by a given task duration distribution. This approach is especially attractive as it could also used to scale up trace, i.e., generate the replayable traces of the job execution on the dataset from the sample job execution on the er dataset(s). We generate synthetic job traces using a normal distribution with the mean µ and variance σ of the map/reduce task durations collected from the job sample executions on the 3- node Hadoop clusters with different instances. Figure 11 (b) shows the normalized makespan results that compare i) the simulated makespan with real (collected) job traces, ii) the simulated makespan with synthetically generated traces, and iii) the total completion time we measured during the actual execution of these jobs. In the testbed executions and the simulations, we use the same Johnson schedule within each cluster. As Figure 11 (b) shows both simulation with the recorded execution traces and the synthetically generated traces provide accurate makespan predictions (each one is within 1% of the real measurements). V. RELATED WORK In the past few years, performance modeling in MapReduce environments has received much attention, and different approaches [6], [5], [11], [12] were offered for predicting performance of MapReduce applications. In Starfish [6] Herodotou et al. apply dynamic Java instrumentation to collect run-time monitoring information about job execution at a fine granularity and extract diverse metrics. Such a detailed job profiling enables the authors to derive an optimized cluster configuration, and solve cluster sizing problem [5]. However, such a detailed profiling comes with high overhead and should be only applied to a fraction of tasks. In our work, we derive a job profile at a level of

map/reduce tasks and apply bounds-based analytic models that follow the approach introduced in the ARIA project [11]. The designers of MRPerf [14] aim to provide a fine-grained simulation of MapReduce setups. To accurately model interand intra rack task communications over network MRPerf uses the well-known ns-2 network simulator. The authors are interested in modeling different cluster topologies and in their impact on the MapReduce job performance. In our work, we follow the directions of SimMR simulator [1] and focus on simulating the job master decisions and the task/slot allocations across multiple jobs. We do not simulate details of the TaskTrackers (their hard disks or network packet transfers) as done by MRPerf. In spite of this, our approach accurately reflects the job processing because of our profiling technique to represent job latencies during different phases of MapReduce processing in the cluster. It is very fast compared to MRPerf which deals with network-packet level simulations. Mumak [4] is an open source Apaches MapReduce simulator. This simulator replays traces collected with a log processing tool, called Rumen [1]. The main difference between Mumak and our simulator is that Mumak omits modeling the shuffe/sort phase that could significantly affect the accuracy. Another group of related work is based on resource management that considers monetary cost and budget constraints.. In [9], the authors provide a heuristic to optimize the number of machines for a bag of jobs while minimizing the overall completion time under a given budget. This work assumes the user does not have any knowledge about the job completion time. It starts with a single machine and gradually adds more nodes to the cluster based on the average job completion time updated every time when a job is finished. In our approach, we use job profiles for optimizing the job schedule and provisioning the cluster. In [2], the authors design a budget-driven scheduling algorithm for MapReduce applications in the heterogeneous cloud. They consider iterative MapReduce jobs that take multiple stages to complete, each stage contains a set of map or reduce tasks. The optimization goal is to select a machine from a fixed pool of heterogeneous machines for each task to minimize the job completion time or monetary cost. The proposed approach relies on a prior knowledge of the completion time and cost for a task i executed on a machine j in the candidate set. In our paper, we aim at minimizing the makespan of the set of jobs and design an ensemble of methods and tools to evaluate the job completion times as well as their makespan as a function of allocated resources. In [8], Kllapi et al. propose scheduling strategies to optimize the trade-offs between performance and monetary cost for general data processing workflows in the cloud. They model different machines as containers characterized with different CPU, memory and network capacities. The computation workflow contains a set of nodes as operators and edges as data flows. The authors provide a greedy and local search scheduling algorithms to schedule operators on different containers so that the optimal performance (cost) is achieved without violating budget or deadline constraints. Compared to our profiling approach, they estimate the operator execution time using the CPU container requirements. This approach does not apply for estimating the durations of map/reduce tasks their performance depends on multiple additional factors, e.g., the amount of RAM allocated to JVM, the I/O performance of the executing node, etc. The authors present only simulation results without validating the simulator accuracy. VI. CONCLUSION AND FUTURE WORK In this work, we designed a novel evaluation framework that aims to enrich private and public clouds offering with an SLOdriven resource sizing and comparison of different available platforms for deploying Hadoop clusters. We demonstrated that seemingly equivalent platform choices for a Hadoop cluster might result in a very different application performance, and therefore lead to a different cost. Our case study with Amazon EC2 platform reveals that for different workload mixes the optimized platform choice may result in 37-7% cost savings for achieving the same performance objectives. In our future work, we plan to extend workload types (e.g., adding Pig programs) and consider additional SLOs such as fault-tolerance. Intuitively, similar alternatives might have different performance properties: a failure of a node in a Hadoop cluster deployed with EC2 instances might have a more severe performance impact compared to a loss of a Hadoop node deployed on a EC2 instance. REFERENCES [1] Apache Rumen: a tool to extract job characterization data from job tracker logs. https://issues.apache.org/jira/browse/mapreduce-728. [2] Y. Wang and W. Shi. On Optimal Budget-Driven Scheduling Algorithms for MapReduce Jobs in the Hetereogeneous Cloud. Technical Report TR-13-2, Carleton University, 213. [3] F. Ahmad et al. Tarazu: Optimizing MapReduce on Heterogeneous Clusters. In Proc. of ASPLOS, 212. [4] Apache. Mumak: Map-Reduce Simulator. https://issues.apache.org/jira/ browse/mapreduce-751. [5] H. Herodotou, F. Dong, and S. Babu. No One (Cluster) Size Fits All: Automatic Cluster Sizing for Data-Intensive Analytics. In Proc. of ACM Symposium on Cloud Computing, 211. [6] H. Herodotou, H. Lim, G. Luo, N. Borisov, L. Dong, F. Cetin, and S. Babu. Starfish: A Self-tuning System for Big Data Analytics. In Proc. of 5th Conf. on Innovative Data Systems Research (CIDR), 211. [7] S. Johnson. Optimal Two- and Three-Stage Production Schedules with Setup Times Included. Naval Res. Log. Quart., 1954. [8] H. Kllapi, E. Sitaridi, M. M. Tsangaris, and Y. Ioannidis. Schedule Optimization for Data Processing Flows on the Cloud. In Proc. of the ACM SIGMOD 211. [9] J. N. Silva, L. Veiga, and P. Ferreira. Heuristic for Resources Allocation on Utility Computing Infrastructures. In Proc. of the 6th Intl. Workshop on Middleware for Grid Computing, MGC 8, 28. [1] A. Verma, L. Cherkasova, and R. H. Campbell. Play It Again, SimMR! In Proc. of Intl. IEEE Cluster 211. [11] A. Verma, L. Cherkasova, and R. H. Campbell. ARIA: Automatic Resource Inference and Allocation for MapReduce Environments. Proc. of the 8th ACM Intl Conf. on Autonomic Computing (ICAC), 211. [12] A. Verma, L. Cherkasova, and R. H. Campbell. Resource Provisioning Framework for MapReduce Jobs with Performance Goals. Proc. of the 12th ACM/IFIP/USENIX Middleware Conference, 211. [13] A. Verma, L. Cherkasova, and R. H. Campbell. Two Sides of a Coin: Optimizing the Schedule of MapReduce Jobs to Minimize Their Makespan and Improve Cluster Performance. Proc. of the 2th IEEE Intl Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems (MASCOTS), 212. [14] G. Wang, A. Butt, P. Pandey, and K. Gupta. A Simulation Approach to Evaluating Design Decisions in MapReduce Setups. In Intl. Symposium on Modelling, Analysis and Simulation of Computer and Telecommunication Systems (MASCOTS), 29.