A method for tuning workflow settings in a distributed computing workflow comprising sequential interdependent jobs includes pairing a terminal stage of a first job and a leading stage of a second, sequential job to form an optimization pair, in which data segments output by the terminal stage of the first job comprises data input for the leading stage of the second job. The performance of the optimization pair is tuned by determining, with a computational processor, an estimated minimum execution time for the optimization pair and increasing the minimum execution time to generate an increased execution time. The method further includes calculating a minimum number of data segments that still permit execution of the optimization pair within the increased execution time.
|
1. A method for tuning workflow settings of a mapreduce workflow comprising a series of sequential mapreduce jobs executed on a distributed computing system, each mapreduce job comprising a map task and a reduce task, the method comprising:
pairing a reduce stage of a first mapreduce job and a map stage of a second, sequential mapreduce job to form an optimization pair, in which data output of the reduce task of the first mapreduce job is data input for the map task of the second mapreduce job;
determining, with a computational processor, an estimated minimum execution time and corresponding number of reduce tasks to execute the optimization pair within the estimated minimum execution time;
tuning performance of the optimization pair by selecting an increased execution time with a minimum number of reduce tasks; and
executing, on the distributed computing system, the optimization pair to produce the minimum number of reduce tasks.
7. A computer program product for tuning workflow settings in a distributed computing workflow comprising sequential interdependent jobs, the computer program product comprising:
a non-transitory, computer readable storage medium having a computer readable program code embodied therewith, the computer readable program code, when executed by a processor, to:
pair a reduce stage of a first mapreduce job and a map stage of a second, sequential mapreduce job to form an optimization pair, in which data output of the reduce task of the first mapreduce job is data input for the map task of the second mapreduce job;
determine, with a computational processor, an estimated minimum execution time and corresponding number of reduce tasks to execute the optimization pair within the estimated minimum execution time;
tune performance of the optimization pair by selecting an increased execution time with a minimum number of reduce tasks; and
execute, on the distributed computing system, the optimization pair to produce the minimum number of reduce tasks.
2. The method of
increasing the minimum execution time to generate the increased execution time; and
calculating, with the computational processor, the minimum number of reduce tasks produced by the reduce stage such that the minimum number of reduce tasks permits execution of the optimization pair within the increased execution time.
3. The method of
selecting a number of reduce tasks to divide input data to generate an amount of data in each reduce task;
inputting the amount of data in each reduce task into a platform model that relates an amount of data processed by a stage to an estimated execution time for that stage;
recording the estimated execution time of the optimization pair; and
iterating the steps of selecting, inputting, and recording for progressively achieving a smaller number of reduce tasks until the estimated execution time for the optimization pair exceeds the increased execution time.
4. The method of
estimating an amount of data processed by each stage in the optimization pair; and
estimating a completion time for each stage using a platform model that relates the amount of data processed by a stage to an estimated execution time.
5. The method of
pairing each group of map stages and reduce stages in the workflow to produce a plurality of optimization pairs;
calculating a reduction in resource usage for each optimization pair produced by execution of the optimization pair within the increased execution time; and
selecting an optimization pair with the highest reduction of resource usage to execute with the increased execution time.
6. The method of
8. The product of
increasing the minimum execution time to generate the increased execution time; and
calculating, with the computational processor, the minimum number of reduce tasks produced by the reduce stage such that the minimum number of reduce tasks permits execution of the optimization pair within the increased execution time.
9. The product of
selecting a number of reduce tasks to divide input data to generate an amount of data in each reduce task;
inputting the amount of data in each reduce task into a platform model that relates an amount of data processed by a stage to an estimated execution time for that stage;
recording the estimated execution time of the optimization pair; and
iterating the steps of selecting, inputting, and recording for progressively achieving a smaller number of reduce tasks until the estimated execution time for the optimization pair exceeds the increased execution time.
10. The product of
estimating an amount of data processed by each stage in the optimization pair; and
estimating a completion time for each stage using a platform model that relates the amount of data processed by a stage to an estimated execution time.
11. The product of
pairing each group of map stages and reduce stages in the workflow to produce a plurality of optimization pairs;
calculating a reduction in resource usage for each optimization pair produced by execution of the optimization pair within the increased execution time; and
selecting an optimization pair with the highest reduction of resource usage to execute with the increased execution time.
12. The product of
13. The product of
calculating a gain ratio comprising a reduction in required resources to execute the optimization pair divided by an increase in execution time for the optimization pair; and
selecting workflow settings based on the gain ratio for the optimization pair.
|
The amount of data in the world is exploding and meaningfully analyzing large data sets (“Big Data”) has become an increasing challenge in computing. Data sets grow in size because of increasing data gathering by ubiquitous information-sensing devices, more capable sensors and sensor platforms, and increasing generation of data by human interaction. Computing and algorithm limitations associated with analyzing big data are felt in a wide range of areas including health care, meteorology, genomics, complex physics simulations, biological and environmental research, internet search, surveillance, photo/video archives, finance and business informatics, and other areas.
The accompanying drawings illustrate various examples of the principles described herein and are a part of the specification. The illustrated examples are merely examples and do not limit the scope of the claims.
Throughout the drawings, identical reference numbers designate similar, but not necessarily identical, elements.
A world of Big Data causes a paradigm shift towards large-scale data intensive computing. Enterprises and organizations are looking for new opportunities to extract competitive business value from the fast growing universe of structured and semi-structured data. Big Data analytics is increasingly performed using the MapReduce paradigm and with its open-source implementation Hadoop® as a platform choice.
MapReduce is a framework for processing parallelizable problems across large datasets using multiple computers. These computers are called “nodes” or “slots” and are collectively called a “cluster” if all the nodes are on the same local network and use similar hardware, or a “grid” if the nodes are shared across geographically and administratively distributed systems. The name “MapReduce” is a combination of the “map” and “reduce” functions used in functional programming. In the map step, a master node takes the input, divides it into smaller sub-problems and distributes these sub-problems to worker nodes. The worker nodes process the smaller problems and pass the answers back to master nodes. In the reduce step, the master nodes collect the answers to all the sub-problems and combines them in some way to form the output. This output is the answer to the problem the algorithm was originally trying to solve. By parallelizing the data processing operations, MapReduce can operate on very large datasets using commodity servers. For example, a large server farm can use MapReduce to sort a petabyte of data in only a few hours.
In many cases, an output from a MapReduce job is the input to the next MapReduce job. Multiple MapReduce jobs can be operated in series to arrive at a final answer or to continuously operate on an incoming data stream.
The original MapReduce framework, while being simple and elegant, imposes a rigid, low-level data processing schema. To ease the task of writing complex queries and data analysis programs, several projects, e.g., Pig and Hive, offer high-level Structured Query Language (SQL) like languages and processing systems on top of MapReduce engines. These frameworks enable expressing the complex analytics tasks with high-level declarative abstractions that are compiled into directed acyclic graphs (DAGs) and workflows of MapReduce jobs.
Optimizing the execution efficiency of these programs is an open challenge that is often solved manually. This problem is exacerbated by the increasing data growth rates, new sources of data, and changing data formats. There are a number of parameters that influence execution of a MapReduce operation. These parameters include: the amount of data to be processed, the amount of computing resources (processors, random access memory (RAM), network communication capacity, hard drive space, etc.), the allocation of tasks to all or a selection of the computing resources, the size of the task given to each worker node, and other parameters.
Currently, a user must specify the number of reduce tasks for each MapReduce job (the default setting is 1 reduce task). Each reduce task is assigned to one processing slot in a worker node. The number of reduce tasks directly correlates to the amount of parallel processing occurring within the cluster or grid. Determining the right number of reduce tasks is non-trivial: it depends on the input sizes of the job, on the Hadoop cluster size, and the amount of resources available for processing this job. In the MapReduce workflow, two sequential jobs are data dependent: the output of one job becomes the input of the next job, and therefore, the number of reduce tasks in the previous job defines the number (and size) of input files of the next job, and may affect its performance and processing efficiency in unexpected ways.
The selection of operating parameters is typically made by human operators based on rules of thumb. These rules of thumb are generalizations that may not be tuned to the specific task being performed. Examples of these rules of thumb include: “the total number of worker nodes should be approximately 90% of the total nodes available” and “aim for map tasks running for 1-3 minutes each.” The rational for these rules of thumb is based on the experience of processing data sets. For example, if the tasks distributed to the worker nodes are too small, there is wasted startup overhead. If the tasks distributed to the worker nodes are too big, there is not enough parallelism to complete the task in a reasonable amount of time. These rules of thumb, while easy to apply, do not always produce optimum results or resource usage. Additionally, these rules of thumb do not provide insight about the actual operation of the MapReduce processes or inform trade offs between resource usage and execution time. The principles described below support parameter tuning and execution optimization of these programs.
In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present systems and methods. It will be apparent, however, to one skilled in the art that the present apparatus, systems and methods may be practiced without these specific details. Reference in the specification to “an example” or similar language means that a particular feature, structure, or characteristic described in connection with the example is included in at least that one example, but not necessarily in other examples.
Another interesting observation in
The principles taught below show a design for a performance evaluation framework, called AutoTune, that automates the user efforts of tuning the numbers of reduce tasks along the MapReduce workflow. AutoTune includes the following key components:
The accuracy, efficiency, and performance benefits of the framework are evaluated using a set of realistic MapReduce applications executed on a 66-node Hadoop cluster. This set includes TPC-H queries and custom programs mining a collection of enterprise web proxy logs. The evaluations show that the optimized program settings depend on the size of the processed data and available cluster resources. Thus, even if the optimal settings are empirically derived—they might become inefficient for a different size input set or changed resource allocations to this program. Since the input datasets may vary significantly for periodic production jobs, it is beneficial to design an efficient tuning framework that can be used for frequent and fast evaluation. The principles describe an ensemble of models that effectively and accurately predicts workflow completion time. The experimental validation of this ensemble of models shows that in many cases, by allowing 5%-10% increase in the workflow completion time, there can be a savings of 40%-90% of resource usage. The ability to optimize the number of reduce slots used by the programs enables efficient workload management in the cluster.
The discussion below is organized as follows. Section II provides additional operational information with regard to MapReduce. Section III presents the problem definition and the principles that guide the solutions to the problem. Sections IV-V describe the microbenchmark suite, the ensemble of performance models, and optimization strategies. Section VI evaluates the framework accuracy and effectiveness of optimization strategies.
MapReduce includes a map task and a reduce task, each with a number of operational execution phases. This section describes those phases and various techniques that can be used for phase profiling.
A. MapReduce Processing Phases
As discussed above, the main computation of the MapReduce model is expressed as two user-defined functions: map and reduce. The map function takes an input pair and produces a list of intermediate key/value pairs. The intermediate values associated with the same key k2 are grouped together and then passed to the reduce function. The reduce function takes intermediate key k2 with a list of values and processes them to form a new list of values.
map(k1,v1)→list(k2,v2)
reduce(k2,list(v2))→list(v3)
MapReduce jobs are executed across multiple machines: the map stage is partitioned into map tasks and the reduce stage is partitioned into reduce tasks. The execution of map tasks define the map stage, and the execution of reduce tasks define the reduce stage. The execution of each map (reduce) task is comprised of a specific, well-defined sequence of processing phases. Intuitively, only the executions of user-defined map and reduce functions are custom and depend on the user code across different MapReduce jobs. The executions of the remaining phases are generic across different MapReduce jobs and depend on the amount of data flowing through each phase and the performance of the underlying Hadoop cluster. There is a barrier between map and reduce stages, i.e., the reduce function in the reduce task can be executed only when all map tasks of the map stage are completed.
Map task processing is represented by the following phases:
Reduce task processing is represented by the following phases:
Apart from the phases described above, each task has a constant overhead for setting and cleaning up. These overhead operations are accounted for separately for each task.
As shown in
B. Two Examples of Approaches to MapReduce Phase Profiling
Durations of executed map and reduce tasks and the amount of processed data (i.e., their inputs and outputs both in bytes and the number of processed records) can be obtained from the counters at the job master during the job execution or parsed from the logs. The duration of the shuffle phase can also be determined from the same sources. However, for obtaining the execution time of the remaining phases, a special profiling technique is implemented. There are two different approaches for implementing phase profiling.
1) The current Hadoop implementation already includes several counters such as the number of bytes read and written. These counters are sent by the worker nodes to the master node periodically with each heartbeat. This Hadoop code was modified by adding counters that measure the durations of eight phases to the existing counter reporting mechanism. A subset of these counters can be activated in the Hadoop configuration to collect the selected phase measurements. This approach incurs a small overhead but requires the creation and execution of modified Hadoop code.
2) An alternative profiling tool in Java was created to dynamically measure performance of the Hadoop cluster. This approach may be particularly appealing because it has a zero overhead when monitoring is turned off. Selected Java classes and functions internal to Hadoop were instrumented using BTrace to measure the time taken for executing different phases. BTrace is a non-intrusive, read-only Java tool that allows a user to define probes and monitors a running application without stopping or recompiling the source code that is instrumented. However, the dynamic instrumentation overhead is still significantly higher compared to adding the new Hadoop counters directly in the source code.
Currently, a user must specify the number of reduce tasks for each MapReduce job in a workflow (the default setting is 1 reduce task). Moreover, two sequential jobs are data dependent: the output of one job defines the input of the next job, and therefore, the number of reduce tasks in the previous job may affect the processing efficiency of the next one.
The principles below describe a performance evaluation framework for tuning the numbers of reduce tasks along a MapReduce workflow to optimize its overall completion time while minimizing the resource usage for its execution.
Therefore the amount of intermediate data generated by the map stage of J2 is the same (i.e., invariant) for different settings of reduce tasks in the previous job J1. It means that the choice of an appropriate number of reduce tasks in job J2 does not depend on the choice of the reduce task setting of job J1. It is primarily driven by an optimized execution of the next pair of jobs J2 and J3. Finally, tuning the reduce task setting in J3 is driven by optimizing its own completion time.
In such a way, the optimization problem of the entire workflow can be efficiently solved through the optimization problem of the pairs (e.g. pair 1 and pair 2 in
Determining the completion time for a MapReduce job can be challenging. The main challenge is to estimate the durations of map and reduce tasks (and the entire job) when these tasks process different amount of data (compared to past job runs). Some approaches for predicting the job completion time include analyzing map and reduce task durations from the past job runs, and then deriving some scaling factors for task execution times when the original MapReduce application is applied for processing a larger dataset. Other approaches include performing a more detailed (and more expensive) job profiling and time prediction at a level of phases that comprise the execution of map and reduce tasks.
The principles below describe a new approach for designing a MapReduce performance model. This approach combines the useful rationale of the detailed phase profiling method for estimating durations of map/reduce tasks with fast and practical analytical models. The profiling method is applied to the generic (non-customized) phases of the MapReduce processing pipeline (as opposed to phase profiling of specific MapReduce jobs). In
For profiling map and reduce phases (user-defined map and reduce functions) of production MapReduce jobs, the alternative profiling tool based on the BTrace approach was used. It can be applied to jobs in the production cluster. The monitoring overhead was small since the alternative profiling tool is only used to profile map and reduce phase execution. Once the execution times of map and reduce tasks are approximated, the completion time of a single job can then be modeled by applying an analytical model. The proposed performance model utilizes the knowledge about average and maximum of map/reduce task durations for computing the lower and upper bounds on the job completion time as a function of allocated map and reduce slots. Equation 1 shows the lower-bound on the job completion time.
where MavgJ (RavgJ) represent the average map (reduce) task duration, NMJ (NRJ) denote the map (reduce) task number and SMJ (SRJ) reflect the number of map (reduce) slots for processing the job. The computation of the upper bound on the job completion time is slightly different. The average of lower and upper bounds serves as a good prediction of the job completion time (it is within 10% of the measured completion time).
In this section, principles relating to using benchmarking to derive a Hadoop platform model are discussed. MapReduce models for predicting the job completion time as a function of processed data and assigned resources are then discussed. Finally, a workflow performance model that combines all the models together is presented.
A. Microbenchmarks
A set of parameterizable microbenchmarks to characterize execution times of different phases for processing different amounts of data on a given Hadoop cluster are described below. These microbenchmarks can be generated by varying the following parameters:
Thus, each microbenchmark MBi is parameterized as
MBi=(Miinp,Misel,Nimap,Nired)
Each created benchmark uses input data consisting of 100 byte key/value pairs generated with TeraGen, which is a Hadoop utility for generating synthetic data. The map function simply emits the input records according to the specified map selectivity for this benchmark. The reduce function is defined as the identity function. Most of the benchmarks consist of a specified (fixed) number of map and reduce tasks. For example, benchmarks may be generated with 40 map and 40 reduce tasks, each for execution in small cluster deployments with 5 worker nodes. Various benchmarks were run with the following parameters: Minp={2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB}; Msel={0.2, 0.6, 1.0, 1.4, 1.8}. For each value of Minp and Msel, a new benchmark is executed. Benchmarks were also generated for special ranges of intermediate data per reduce task for accurate characterization of the shuffle phase. These benchmarks are defined by Nmap={20, 30, . . . , 150, 160}; Minp=64 MB, Msel=5:0 and Nred=5 which result in different intermediate data size per reduce tasks ranging from 1 GB to 12 GB. Note that a user may extend and customize any of described parameter ranges.
B. Platform Profile and Platform Performance Model of a Given Hadoop Cluster
The platform profile is generated by running a set of microbenchmarks on the small 5-node cluster deployment that is similar to a given production Hadoop cluster. While executing each microbenchmark, the duration and the amount of processed data per generic phase for all executed map and reduce tasks was gathered. A set of these measurements defines the platform profile. The following notation is used: each phase is denoted by its duration and the amount of processed data as Tphase and Dataphase respectively, where phase={read, collect, spill, merge, shuffle, write}.
Principles related to the creation of a platform performance model Mplatform, which characterizes the phase execution time as a function of processed data on the Hadoop cluster will now be described. To create the platform performance model, relationships between the amount of processed data and durations of different execution phases are determined using the set of collected measurements. Six submodels (Mphase) are built, where phase ε {read, collect, spill, merge, shuffle, write} for a given Hadoop cluster. Using measurements from the collected platform profile, a set of equations which express a phase duration as a linear function of processed data are generated.
Let Datajphase be the amount of processed data in the row j of platform profile with K rows. Let Tjphase be the duration of the corresponding phase in the same row j. Then, using linear regression, the following sets of equations can be solved:
Aphase+Bphase□Dphasej=Tphasej Eq. 2
where j=1; 2; . . . , K. To solve for (Aphase,Bphase), one can choose a regression method from a variety of methods such as a non-negative Least Squares Regression.
Let (Âphase,{circumflex over (B)}phase) denote a solution for the equation set (2). The sub-model that defines the duration of execution phase is then given as a function of the processed data. The platform performance model is:
Mplatform=(Mread,Mcollect,Mspill,Mmerge,Mshuffle,Mwrite).
An additional test can be used to verify whether a piece-wise linear function may provide a better approximation for different segments of training data (ordered by the increasing data amount) instead of a single one (e.g., due to in-memory vs. disk processing for specific data ranges). This is further discussed in Section VI.
C. MapReduce Job and Workflow Performance Models
For two sequential jobs Ji and Ji+1 in a workflow W the execution of Ji+1 only starts when job Ji is completed. Thus, the overall completion time of two sequential jobs is approximated as a sum of their individual completion times TJ
For modeling the completion time of a single job, an analytical model is designed, used, and validated. This analytical model provides accurate results if it is supplied with accurate measurements (average and maximum) of map/reduce task execution times. The change of reduce task settings in workflow jobs leads to the increased (decreased) amount of processed data per map/reduce task. As discussed in Section III, one of the modeling challenges is the ability to accurately estimate the durations of map and reduce tasks when they process different amounts of data. The execution times of map and reduce tasks of job J are estimated as a sum of the phase durations:
TM_taskJ=TreadJ+TmapJ+TcollectJ+TspillJ+TmergeJ Eq. 4
TR_taskJ=TshuffleJ+TreduceJ+TwriteJ Eq. 5
The durations of generic phases are approximated with the platform performance model by applying the derived functions to the amount of data flowing through the phases:
TphaseJ=Mphase(DataphaseJ) Eq. 6
where phase ε {read,collect,spill,merge,shuffle,write}.
In order to estimate the amount of data flowing through generic phases of a given MapReduce job J, a special compact job profile is extracted automatically from the previous run of this job. It includes the following metrics:
The estimate of data flowing through the jobs in a workflow can be done in a variety of ways. In one example, the input datasets of jobs in a workflow are divided between external and internal datasets. The external datasets reside in HDFS and exist prior to a workflow execution. The first job in a workflow has only external input datasets. The input dataset of a sequential job is defined by the output of its previous job, and this dataset is called an internal dataset.
Given a workflow, the automated process collects the average and maximum data block size (in bytes and in the number of records) for all the external input datasets in the workflow. Later, the process derives similar information for the internal datasets. This information determines the average and maximum input sizes per map task of a job J in the workflow, denoted as InpMJ,avg and InpMJ,max respectively. Note that the amount of data flowing through the collect, spill, and merge phases is estimated by applying the map selectivity SelMJ to the input data size (in bytes and in records). If a combiner is defined for data aggregation and reduction during the spill phase, the process may include an additional combiner selectivity SelM_combJ, which is measured with special Hadoop counters. Using the average and maximum input data sizes InpMJ,avg and InpMJ,max, the process determines the number of map tasks NMJ of each job J and estimates the average and maximum map task durations respectively.
The input size for the shuffle phase (i.e., the reduce input size) depends on the map outputs and the number of reduce tasks. Note that the number of reduce tasks NRJ is defined by the job configuration. Assume that the map outputs are distributed evenly across the reduce tasks. Then the reduce input size is computed in the following way:
DatashuffleJ=(InpMJ,avg×SelMJ×NMJ)/NRJ Eq. 7
The input size of the write phase is estimated by applying the reduce selectivity to the reduce input size as follows:
DatawriteJ=DatashuffleJ×SelRJ Eq. 8
The map and reduce phase durations depend on the user-defined functions and are evaluated from the number of input records RecordmapJ and RecordredJ and the processing time per record of the map and reduce functions:
TmapJ=TRec_mapJ×RecordmapJ Eq. 9
TreduceJ=TRec_redJ×RecordredJ Eq. 10
For an intermediate job Ji in a given workflow, the input data size per map task depends on the following factors:
Each reduce task generates an output file which is stored in HDFS. If the output file size is larger than the HDFS block size (default value 64 MB), the output file will be split into multiple data blocks, and each of them will be read by a map task of the next job. For example, let the output size be 70 MB. In this case, this output will be written as two blocks: one of 64 MB and the second of 6 MB, and it will define two map tasks that read files of varying sizes (64 MB and 6 MB). Based on these observations, the process can estimate the number of map tasks and the average map input size of the next jobs as:
NMJ
InpMJ
For jobs that read from multiple datasets, (e.g, jobs that perform the join operation), the process obtains the job profiles and the input data information for each dataset and estimates the average and maximum map task durations based on this information. Thus, for a job J with K different input datasets:
In summary, each performance model in the ensemble plays an important and complementary role. The reduce task settings change the amount of data processed by map and reduce tasks in a workflow. Therefore, the workflow performance model is used to compute the amount of data flowing through the jobs (and their phases) in a given workflow. Then, in order to accurately estimate durations of map and reduce tasks processing different amounts of data, the derived Hadoop platform performance model is applied. Note that the Hadoop platform model is created once, and then it is reused for predicting the map and reduce task durations of different jobs. Finally, the completion time of each job is evaluated using the MapReduce job performance model. The map reduce performance model allows computing the execution time estimates of the entire workflow.
Section III shows that the optimization problem of reduce task settings for a given workflow W={J1, . . . , Jn} can be efficiently solved through the optimization problem of the pairs of its sequential jobs. Therefore, for any two sequential jobs (Ji,Ji+1), where i=1, . . . , n−1, the execution times of Ji's reduce stage and Ji+1's map stage can be evaluated as a function of a number of reduce tasks NRJ
By iterating through the number of reduce tasks in Ji the reduce task setting NRJ
Ri,i+1(NRJ
where NMJ
While this local optimization strategy can be straightforward to implement, there could be additional resource savings achieved if global optimization is considered. The resource usage for job pairs along the workflow might be quite different depending on the job characteristics. Therefore, identifying the job pairs with the highest resource savings (gains) for their increased completion times would allow for a more efficient operation. The pseudo-code defining this global optimization strategy is shown in Algorithm 2 shown in
A. Experimental Testbed and Workloads
All experiments are performed on 66 HP DL145 G3 machines. Each machine has four AMD 2.39 GHz cores, 8 GB RAM and two 160 GB 7.2K rpm SATA hard disks. The machines are set up in two racks and are interconnected with gigabit Ethernet. Hadoop 0.20.2 and Pig-0.7.0 were used, with two machines dedicated as the JobTracker and NameNode, and remaining 64 machines as workers. Each worker is configured with 2 map and 2 reduce slots. The file system block size is set to 64 MB. The replication level is set to 3. Speculative execution was disabled since it did not lead to significant improvements in the experiments. To validate the accuracy, effectiveness, and performance benefits of the proposed framework, a workload set was used that includes queries from TPC-H benchmark and custom queries mining a collection of enterprise web proxy logs. TPC-H is a standard database benchmark for decision support workloads. It comes with a data generator that is used to generate the test database for queries included in the TPC-H suite. There are eight tables such as customer, supplier, orders, line item, part, partsupp, nation, and region used by queries in TPC-H. The input dataset size is controlled by the scaling factor (a parameter in the data generator). The scaling factor of 1 generates 1 GB input dataset. The enterprise proxy logs contain 6 months access logs of the enterprise web proxy during 2011-2012 years. The fields include information such as date, time, time-taken, c-ip, cs-host, etc. The specific queries are described below. TPC-H and proxy queries were implemented using Pig—a high-level SQL-like abstraction on top of Hadoop.
The accuracy of the constructed platform performance model and its underlying MapReduce job performance model are validated using TPC-H Q1 and TPC-H Q19 from the TPC-H benchmark. These two queries were executed on the 66 node Hadoop cluster with a total input size of 10 GB (a scaling factor of 10 using the TPC-H data generator). The results are shown in the charts of
In each of the graphs, the increase in allowable execution time is plotted on the horizontal axis and the vertical axis shows the normalized resource usage required to fulfill a specified execution time. For each threshold percentage, the results of the local optimization model are shown on the left (as a crosshatched column) and the results of the global optimization model are shown on the right (as a shaded column).
The first group of bars in each of the graphs charts the normalized resource usage when a user aims to achieve the minimal workflow completion time (w_increase=0%). Even in this case, there are 5%-30% resource savings compared to the rule of thumb settings. When w_increase=0% the local and global optimization strategies are identical and produce the same results. However, if a user accepts an increase of 5% of the completion time, it leads to very significant resource savings: 40%-95% across different queries shown in
The methods, steps, algorithms and techniques described herein may be executed on one or more of the computing devices shown. For example, the models, monitoring, and optimization of the workflow settings may be performed on a single node (100) or on multiple nodes. As discussed above, the execution of the MapReduce workflow can be performed on all or only part of the available computing resources.
The performance of the optimization pair can be tuned (1110) by determining with a computational processor an estimated minimum execution time for the optimization pair (1115). This minimum execution time is increased to generate an increased execution time (1120). The minimum number of data segments produced by the terminal stage while still permitting execution of the optimization pair within the increased execution time is calculated with the computational processor (1125).
The data to be processed is divided into the minimum number of data segments. Consequently, the amount of data to be processed and the minimum number of data segments determine the amount of data contained in each of the data segments. These data segments are each distributed to a specific node or a slot within the node. Consequently, the number of data segments determines the amount of resources used. The minimum execution time is calculated by determining an amount of data in each segment and using a platform model that defines relationships between an amount of data in a data segment (reduce task) and the completion time for each stage. By inputting the amount of data into the platform model, the completion time can be estimated.
The optimization pair is executed, by distributed computing devices (e.g., as shown in
In general, the reduction of resource usage for each pair when it is executed with the increased execution time is calculated. The pair with the highest reduction of resource usage is then selected. In one example, the minimum number of reduce tasks for a specific phase (a reduce task) can be calculated by selecting a number of reduce tasks to divide the input data into, then determining an amount of data in each reduce task. The amount of data in each reduce task is input into a platform model that relates an amount of data processed by a phase to an estimated execution time for that phase. The estimated execution time of the optimization pair is recorded and the steps of selecting a number of reduce tasks, determining an amount of data, estimating an execution time, and recording an execution time is iteratively performed with a progressively smaller number of reduce tasks until the estimated execution time for the optimization pair exceeds the increased execution time.
The model ensemble can be used to predict the performance of the distributed computing workflow when executed on the distributed computing devices and to inform tradeoffs between execution and resource usage. The model ensemble includes a platform model describing a relationship between an amount of input data and completion time for each phase, workflow settings defining a number of reduce tasks for each job and a workflow model to calculate an amount of data flowing through the jobs, given the workflow settings. The estimated completion times of the phases are calculated by inputting the amount of data flowing through the phases into the platform model.
This results in a lower execution time for the workflow. An estimated execution time for the workflow can be determined by calculating an estimated execution time for each phase in each job, summing the estimated execution time for each phase in each job to obtain the estimated execution time for each job. The estimated execution times for each job are summed to produce the estimated execution time for the overall workflow. The principles can be applied to global tuning of the distributed computing workflow by applying the processes described above to all the optimization pairs in the distributed computing work flow. Some of the pairs will be more effective in reducing resource usage than other pairs. The global optimization includes calculating a gain ratio comprising a reduction in required resources divided by an increase in execution time, in which the optimization pair with the highest gain ratio is selected to have an increased execution time. The workflow settings for the selected optimization pair are selected based on the gain ratio. The selected optimization pair is then executed with the workflow settings within the increased execution time.
In summary, many companies are on a fast track of designing advanced data analytics over large datasets using MapReduce environments. Optimizing the execution efficiency of these applications is a challenging problem that requires user experience and expertise. The principles and results shown above describe an automated framework for a proactive analysis of achievable performance trade-offs to enable an efficient workload management in a Hadoop cluster. The performance gain for minimizing a workflow completion time was found to be non-proportional. The experimental validation of this ensemble of models shows that in many cases, by allowing 5%-10% increase in the workflow completion time, there can be a savings of 40%-90% of resource usage. The ability to optimize the number of reduce slots used by the programs enables efficient workload management in the cluster.
The principles described herein may be embodied as a system, method or computer program product. The principles may take the form of an entirely hardware implementation, an implementation combining software and hardware aspects, or an implementation that includes a computer program product that includes one or more computer readable storage medium(s) having computer readable program code embodied thereon. Examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The preceding description has been presented only to illustrate and describe examples of the principles described. This description is not intended to be exhaustive or to limit these principles to any precise form disclosed. Many modifications and variations are possible in light of the above teaching.
Cherkasova, Ludmila, Zhang, Zhuoyao
Patent | Priority | Assignee | Title |
11561843, | Jun 11 2020 | Red Hat, Inc. | Automated performance tuning using workload profiling in a distributed computing environment |
12056352, | Sep 28 2022 | Advanced Micro Devices, INC | Memory control for data processing pipeline optimization |
Patent | Priority | Assignee | Title |
8935702, | Sep 04 2009 | International Business Machines Corporation | Resource optimization for parallel data integration |
20080086442, | |||
20110191361, | |||
20120084789, | |||
20120131591, | |||
20120226639, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Aug 13 2015 | Hewlett Packard Enterprise Development LP | (assignment on the face of the patent) | / | |||
Oct 27 2015 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Hewlett Packard Enterprise Development LP | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 037079 | /0001 |
Date | Maintenance Fee Events |
Feb 18 2021 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Sep 26 2020 | 4 years fee payment window open |
Mar 26 2021 | 6 months grace period start (w surcharge) |
Sep 26 2021 | patent expiry (for year 4) |
Sep 26 2023 | 2 years to revive unintentionally abandoned end. (for year 4) |
Sep 26 2024 | 8 years fee payment window open |
Mar 26 2025 | 6 months grace period start (w surcharge) |
Sep 26 2025 | patent expiry (for year 8) |
Sep 26 2027 | 2 years to revive unintentionally abandoned end. (for year 8) |
Sep 26 2028 | 12 years fee payment window open |
Mar 26 2029 | 6 months grace period start (w surcharge) |
Sep 26 2029 | patent expiry (for year 12) |
Sep 26 2031 | 2 years to revive unintentionally abandoned end. (for year 12) |