Adapting scientific computing problems to cloud computing frameworks Ph.D. Thesis Pelle Jakovits
Outline Problem statement State of the art Approach Solutions and contributions Current work Conclusions 3/21/2013 2/22
The Problem Accurate and large-scale scientific modeling and simulation applications require large amounts of computing resources tend to run for long periods of time are complicated to create and debug Using de facto tools like MPI to create such applications takes a lot of time and resources. Have to take care of data partitioning, distribution and synchronization, deadlocks, fault recovery, etc. 3/21/2013 3/22
The problem in Cloud Public clouds provide very convenient access to computing resources On-demand and in real-time As long as you can afford them They are built upon commodity hardware, which means there is constant risk of hardware and network failures Thus large scale potentially long running scientific applications have to be able to handle faults. 3/21/2013 4/22
State of the art in 2010 In 2004 Google had published MapReduce Hadoop MapReduce had appeared in 2008 Distributed computing framework for huge scale data processing Freely usable and open source Provides automatic parallelization and fault tolerance Algorithms have to follow the MapReduce model 3/21/2013 5/22
MapReduce model 3/21/2013 6/22
Hadoop MapReduce The user only has to write Map and Reduce functions Parallelism is achieved by executing Map and Reduce tasks concurrently Framework handles everything else for the user Allows to focus on implementing the algorithms instead of managing the parallelization Fault tolerance is achieved by data replication and re-executing failed tasks. 3/21/2013 7/22
Goals of this study Precisely identify which algorithm characteristics affect their efficiency and scalability when adapted to the MapReduce model. Create a classification for scientific computing algorithms which would provide guidelines for deciding the suitability of new algorithms. Provide alternatives for algorithms that are not suitable for MapReduce Should still have the same or most of the advantages that MapReduce provides. 3/21/2013 8/22
Approach: Classification We have created a classification scientific computing algorithms, based on how they are adapted to the MapReduce model: 1. As a single MR job 2. As a constant number of MR jobs 3. Single MR job for each iteration 4. Multiple MR jobs each iteration We adapted algorithms from each of these classes to Hadoop MapReduce and investigated the results. 3/21/2013 9/22
Issues with Hadoop MapReduce It is designed and suitable for: Large scale data processing tasks Embarrassingly parallel tasks Has serious issues with iterative algorithms Long start up and clean up times ~17 seconds No way to keep important data in memory between MapReduce job executions At each iteration, all data is read again from HDFS and written back there at the end. Thus, there is significant overhead in every tieration 3/21/2013 10/22
Approach: Alternatives We have investigated three alternative approaches for algorithms which are not suitable for the classical MapReduce model: 1. Try to restructure algorithms into non-iterative versions 2. Alternative MapReduce frameworks 3. Alternatibe distributed computing models 3/21/2013 11/22
Restructuring algorithms From PAM klustering to CLARA CLARA is designed from the start to be more effective From Conjugate Gradient (CG) to Monte Carlo Matrix Inverse Result is much less effective Does not work well with sparse matrices Is generally very difficult to find an alternative that performs close to the original algoirithm Can only be applied in small number of cases Requires a great understanding of the involved algorithms and the framework it is applyed on. 3/21/2013 12/22
Alternative Mapreduce frameworks Qlternative MapReduce implementations that are designed to handle iterative algorithms: Twister HaLoop Spark For example, in the case of Conjugate Gradient linear system solver (64 million non-0 element matrix): 3/21/2013 13/22
Alternative Mapreduce frameworks But, as a result alternative Mapreduce frameworks often: step away from the classical MapReduce model give up advantages of the MapReduce model, Fault tolerance or multiple concurrent reduce tasks are less stable, are more complicated to use and debug 3/21/2013 14/22
Alternative models Bulk Synchronous Parallel model Created by Valiant in 1990 Google gave up using MapReduce for large-scale complex graph processing Designed a new framework Pregel instead that uses Bulk Synchronous parallel model instead of MapReduce Details published in 2010 Pregel is proprietary. Like with MapReduce, third parties have designed alternative freely usable versions: jpregel Hama Giraph 3/21/2013 15/22
Bulk Synchronous Parallel (BSP) Distributed computing model for iterative applications Computations consist of a sequence of super steps Superstep consists of 3 substeps: 1. Local computation 2. Sending messages to neighboring tasks, which can be accessed only at the next super step 3. Barrier synchronization 3/21/2013 16/22
BSP results Comparison of different BSP (BSPonMPI and HAMA) and MPI (MPJ and MpiJava) implementations to Hadoop when clustering 80,000 objects using K-Medoid method. 3/21/2013 17/22
Current work Extend the evaluation of Iterative MapReduce frameworks for scientific applications Investigate the efficiency of MapReduce applcations in more detail Karl Potisepp Investigate creating a fault tolerant BSP for scientific computing algorithms Ilja Kromonov Enhance the current classification to improve its accuracy 3/21/2013 18/22
More current work Design a methodology for this approach. For classifying scientific computing algorithms For adapting them to MapReduce or the chosen alternatives Create a repository of design patterns and performance measurement results of adapting scientific computing algorithms to MapReduce and it s alternatives. 3/21/2013 19/22
Even more work not directly connected to thesis Direct migration of scientific computing experiments to the cloud D2CM tool for migrating electrochemical experiments CloudML project with SINTEF Model based deployment of large scale scientific experiments Quantifying the cost of virtualization for distributed computing applications MapReduce in Image processing SAR satellite image processing in MapReduce Large scale image processing in MapReduce 3/21/2013 20/22
Conclusions This study is aimed at supporting computer scientists who need to scale up scientific computing applications and who would like to know: Whether their algorithms are suitable for the MapReduce model? What is the best approach to adapt them to Hadoop or the alternative solutions? What parallel speedup and efficiency they can expect to achieve from the result? How do the results compare to a custom implementations of the same algorithms in MPI? Scalability? Parallel efficiency? 3/21/2013 21/22
Thank You for your attention! Questions? 3/21/2013 22/22