skip to main content
10.1145/3135974.3135984acmconferencesArticle/Chapter ViewAbstractPublication PagesmiddlewareConference Proceedingsconference-collections
research-article

Improving spark application throughput via memory aware task co-location: a mixture of experts approach

Published: 11 December 2017 Publication History

Abstract

Data analytic applications built upon big data processing frameworks such as Apache Spark are an important class of applications. Many of these applications are not latency-sensitive and thus can run as batch jobs in data centers. By running multiple applications on a computing host, task co-location can significantly improve the server utilization and system throughput. However, effective task co-location is a non-trivial task, as it requires an understanding of the computing resource requirement of the co-running applications, in order to determine what tasks, and how many of them, can be co-located. State-of-the-art co-location schemes either require the user to supply the resource demands which are often far beyond what is needed; or use a one-size-fits-all function to estimate the requirement, which, unfortunately, is unlikely to capture the diverse behaviors of applications.
In this paper, we present a mixture-of-experts approach to model the memory behavior of Spark applications. We achieve this by learning, off-line, a range of specialized memory models on a range of typical applications; we then determine at runtime which of the memory models, or experts, best describes the memory behavior of the target application. We show that by accurately estimating the resource level that is needed, a co-location scheme can effectively determine how many applications can be co-located on the same host to improve the system throughput, by taking into consideration the memory and CPU requirements of co-running application tasks. Our technique is applied to a set of representative data analytic applications built upon the Apache Spark framework. We evaluated our approach for system throughput and average normalized turnaround time on a multi-core cluster. Our approach achieves over 83.9% of the performance delivered using an ideal memory predictor. We obtain, on average, 8.69x improvement on system throughput and a 49% reduction on turnaround time over executing application tasks in isolation, which translates to a 1.28x and 1.68x improvement over a state-of-the-art co-location scheme for system throughput and turnaround time respectively.

References

[1]
Ethem Alpaydin. 2010. Introduction to Machine Learning (2nd ed.). The MIT Press.
[2]
Ahsan Javed Awan, Mats Brorsson, Vladimir Vlassov, and Eduard Ayguade. 2015. Performance characterization of in-memory data analytics on a modern cloud server. In Big Data and Cloud Computing (BDCloud), 2015 IEEE Fifth International Conference on. 1--8.
[3]
Christian Bienia. 2011. Benchmarking Modern Multiprocessors. Ph.D. Dissertation. Princeton University.
[4]
Carsten Binnig, Norman May, and Tobias Mindnich. 2013. SQLScript: Efficiently analyzing big enterprise data in SAP HANA. In Lecture Notes in Informatics (LNI), Proceedings - Series of the Gesellschaft fur Informatik (GI), Vol. P-214. 363--382.
[5]
Vinayak Borkar, Michael Carey, Raman Grover, Nicola Onose, and Rares Vernica. 2011. Hyracks: A flexible and extensible foundation for data-intensive computing. In Data Engineering (ICDE), 2011 IEEE 27th International Conference on. 1151--1162.
[6]
John Cavazos, Grigori Fursin, Felix Agakov, Edwin Bonilla, Michael FP O'Boyle, and Olivier Temam. 2007. Rapidly selecting good compiler optimizations using performance counters. In Proceedings of the International Symposium on Code Generation and Optimization. IEEE Computer Society, 185--197.
[7]
Dazhao Cheng, Jia Rao, Yanfei Guo, and Xiaobo Zhou. 2014. Improving MapReduce Performance in Heterogeneous Environments with Adaptive Task Tuning. In Proceedings of the 15th International Middleware Conference (Middleware '14). ACM, New York, NY, USA, 97--108.
[8]
Tyson Condie, Neil Conway, Peter Alvaro, Joseph M. Hellerstein, Khaled Elmeleegy, and Russell Sears. 2010. MapReduce Online. In Proceedings of the 7th USENIX Conference on Networked Systems Design and Implementation (NSDI'10).
[9]
Chris Cummins, Pavlos Petoumenos, Zheng Wang, and Hugh Leather. 2017. End-to-end Deep Learning of Optimization Heuristics. In The 26th International Conference on Parallel Architectures and Compilation Techniques (PACT).
[10]
Chris Cummins, Pavlos Petoumenos, Zheng Wang, and Hugh Leather. 2017. Synthesizing benchmarks for predictive modeling. In Code Generation and Optimization (CGO), 2017 IEEE/ACM International Symposium on. 86--99.
[11]
Databricks. 2016. Spark-Perf. (2016). https://github.com/databricks/spark-perf
[12]
Christina Delimitrou and Christos Kozyrakis. 2014. Quasar: Resource-efficient and QoS-aware Cluster Management. In Proceedings of the 19th International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '14).
[13]
Murali Krishna Emani and Michael Boyle. 2015. Celebrating Diversity: A Mixture of Experts Approach for Runtime Mapping in Dynamic Environments. SIGPLAN Not. 50, 6, 499--508.
[14]
Stijn Eyerman and Lieven Eeckhout. 2010. Probabilistic Job Symbiosis Modeling for SMT Processor Scheduling. SIGPLAN Not. 45, 3, 91--102.
[15]
Lu Fang, Khanh Nguyen, Guoqing Xu, Brian Demsky, and Shan Lu. 2015. Interruptible Tasks: Treating Memory Pressure As Interrupts for Highly Scalable Data-parallel Programs. In Proceedings of the 25th Symposium on Operating Systems Principles (SOSP '15).
[16]
Achille Fokoue, Oktie Hassanzadeh, Mohammad Sadoghi, and Ping Zhang. 2016. Predicting Drug-Drug Interactions Through Similarity-Based Link Prediction Over Web Data. In Proceedings of the 25th International Conference Companion on World Wide Web (WWW '16 Companion). International World Wide Web Conferences Steering Committee, Republic and Canton of Geneva, Switzerland, 175--178.
[17]
Archana Ganapathi, Kaushik Datta, Armando Fox, and David Patterson. 2009. A Case for Machine Learning to Optimize Multicore Performance. In Proceedings of the First USENIX Conference on Hot Topics in Parallelism (HotPar'09).
[18]
Wanling Gao, Yuqing Zhu, Zhen Jia, Chunjie Luo, and Lei Wang. 2013. Bigdatabench: a big data benchmark suite from web search engines. 1--7.
[19]
Robert Grandl, Ganesh Ananthanarayanan, Srikanth Kandula, Sriram Rao, and Aditya Akella. 2014. Multi-resource Packing for Cluster Schedulers, In Proceedings of the 2014 ACM Conference on SIGCOMM. SIGCOMM Comput. Commun. Rev. 44, 4, 455--466.
[20]
Dominik Grewe, Zheng Wang, and Michael FP OâĂŹBoyle. 2013. OpenCL task partitioning in the presence of GPU contention. In International Workshop on Languages and Compilers for Parallel Computing. 87--101.
[21]
Johann Hauswald, Yiping Kang, Michael A. Laurenzano, Quan Chen, Cheng Li, Trevor Mudge, Ronald G. Dreslinski, Jason Mars, and Lingjia Tang. 2015. DjiNN and Tonic: DNN As a Service and Its Implications for Future Warehouse Scale Computers, In ISCA '15. SIGARCH Comput. Archit. News 43, 3, 27--40.
[22]
Johann Hauswald, Michael A. Laurenzano, Yunqi Zhang, Cheng Li, Austin Rovinski, Arjun Khurana, Ronald G. Dreslinski, Trevor Mudge, Vinicius Petrucci, Lingjia Tang, and Jason Mars. 2015. Sirius: An Open End-to-End Voice and Vision Personal Assistant and Its Implications for Future Warehouse Scale Computers, In ASPLOS '15. SIGPLAN Not. 50, 4, 223--238.
[23]
Benjamin Hindman, Andy Konwinski, Matei Zaharia, Ali Ghodsi, Anthony D. Joseph, Randy Katz, Scott Shenker, and Ion Stoica. 2011. Mesos: A Platform for Fine-grained Resource Sharing in the Data Center. In Proceedings of the 8th USENIX Conference on Networked Systems Design and Implementation (NSDI'11). 295--308.
[24]
Shengsheng Huang, Jie Huang, Jinquan Dai, Tao Xie, and Bo Huang. 2011. The HiBench Benchmark Suite: Characterization of the MapReduce-Based Data Analysis. In New Frontiers in Information and Software as Services: Service and Application Design Challenges in the Cloud, Divyakant Agrawal, K. Selçuk Candan, and Wen-Syan Li (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 209--228.
[25]
Robert A. Jacobs, Michael I. Jordan, Steven J. Nowlan, and Geoffrey E. Hinton. 1991. Adaptive Mixtures of Local Experts. Neural Comput. 3, 1 (March 1991), 79--87.
[26]
Tao Jiang, Qianlong Zhang, Rui Hou, Lin Chai, Sally A Mckee, Zhen Jia, and Ninghui Sun. 2014. Understanding the behavior of in-memory computing workloads. In Workload Characterization (IISWC), 2014 IEEE International Symposium on Workload Characterization. IEEE, 22--30.
[27]
James M. Keller and Michael R. Gray. 1985. A Fuzzy K-Nearest Neighbor Algorithm. IEEE Transactions on Systems, Man and Cybernetics (1985).
[28]
Aapo Kyrola, Guy Blelloch, and Carlos Guestrin. 2012. GraphChi: Large-scale Graph Computation on Just a PC. In Proceedings of the 10th USENIX Conference on Operating Systems Design and Implementation (OSDI'12).
[29]
Min Li, Jian Tan, Yandong Wang, Li Zhang, and Valentina Salapura. 2015. Spark-Bench: A Comprehensive Benchmarking Suite for in Memory Data Analytic Platform Spark. In Proceedings of the 12th ACM International Conference on Computing Frontiers (CF '15).
[30]
Ming Liu and Tao Li. 2014. Optimizing Virtual Machine Consolidation Performance on NUMA Server Architecture for Cloud Workloads. SIGARCH Comput. Archit. News 42, 3, 325--336.
[31]
Qiuyun Llull, Songchun Fan, Seyed Majid Zahedi, and Benjamin C Lee. 2017. Cooper: Task Colocation with Cooperative Games. In High Performance Computer Architecture (HPCA), 2017 IEEE International Symposium on. 421--432.
[32]
David Lo, Liqun Cheng, Rama Govindaraju, Parthasarathy Ranganathan, and Christos Kozyrakis. 2015. Heracles: Improving Resource Efficiency at Scale. In Proceedings of the 42Nd Annual International Symposium on Computer Architecture (ISCA '15).
[33]
Chi-Keung Luk, Sunpyo Hong, and Hyesoon Kim. 2009. Qilin: Exploiting Parallelism on Heterogeneous Multiprocessors with Adaptive Mapping. In Proceedings of the 42Nd Annual IEEE/ACM International Symposium on Microarchitecture (MICRO 42). ACM, 45--55.
[34]
Bryan FJ Manly. 2004. Multivariate statistical methods: a primer. CRC Press.
[35]
L. Mashayekhy, M. M. Nejad, D. Grosu, Q. Zhang, and W. Shi. 2015. Energy-Aware Scheduling of MapReduce Jobs for Big Data Applications. IEEE Transactions on Parallel and Distributed Systems 26, 10 (2015), 2720--2733.
[36]
Khanh Nguyen, Kai Wang, Yingyi Bu, Lu Fang, Jianfei Hu, and Guoqing Xu. 2015. FACADE: A Compiler and Runtime for (Almost) Object-Bounded Big Data Applications. In Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS '15).
[37]
William F Ogilvie, Pavlos Petoumenos, Zheng Wang, and Hugh Leather. 2017. Minimizing the cost of iterative compilation with active learning. In Code Generation and Optimization (CGO), 2017 IEEE/ACM International Symposium on. 245--256.
[38]
Kay Ousterhout, Ryan Rasti, Sylvia Ratnasamy, Scott Shenker, and Byung-Gon Chun. 2015. Making Sense of Performance in Data Analytics Frameworks. In Proceedings of the 12th USENIX Conference on Networked Systems Design and Implementation (NSDI'15). USENIX Association, Berkeley, CA, USA, 293--307.
[39]
Jie Ren, Ling Gao, Hai Wang, and Zheng Wang. 2017. Optimise web browsing on heterogeneous mobile platforms: a machine learning based approach. In IEEE International Conference on Computer Communications (INFOCOM), 2017 (INFOCOM 2017).
[40]
Lukas Rupprecht, William Culhane, and Peter R. Pietzuch. 2017. SquirrelJoin: Network-Aware Distributed Join Processing with Lazy Partitioning. PVLDB 10, 11 (2017), 1250--1261.
[41]
Konstantin Shvachko, Hairong Kuang, Sanjay Radia, and Robert Chansler. 2010. The Hadoop Distributed File System. In Proceedings of the 2010 IEEE 26th Symposium on Mass Storage Systems and Technologies (MSST) (MSST '10). 1--10.
[42]
Douglas Simon, John Cavazos, Christian Wimmer, and Sameer Kulkarni. 2013. Automatic Construction of Inlining Heuristics Using Machine Learning. In Proceedings of the 2013 IEEE/ACM International Symposium on Code Generation and Optimization (CGO) (CGO '13). 1--12.
[43]
Karan Singh, Major Bhadauria, and Sally A. McKee. 2009. Real Time Power Estimation and Thread Scheduling via Performance Counters. SIGARCH Comput. Archit. News 37, 2 (jul 2009), 46--55.
[44]
Evan R Sparks, Ameet Talwalkar, Virginia Smith, Jey Kottalam, Xinghao Pan, Joseph Gonzalez, Michael J Franklin, Michael I Jordan, and Tim Kraska. 2013. MLI: An API for distributed machine learning. In Data Mining (ICDM), 2013 IEEE 13th International Conference on. 1187--1192.
[45]
Kevin Stock, Louis-Noël Pouchet, and P. Sadayappan. 2012. Using Machine Learning to Improve Automatic Vectorization. ACM Trans. Archit. Code Optim. 8, 4, Article 50 (jan 2012), 23 pages.
[46]
Lingjia Tang, Jason Mars, Neil Vachharajani, Robert Hundt, and Mary Lou Soffa. 2011. The Impact of Memory Subsystem Resource Sharing on Datacenter Applications. SIGARCH Comput. Archit. News 39, 3, 283--294.
[47]
Ben Taylor, Vicent Sanz Marco, and Zheng Wang. 2017. Adaptive Optimization for OpenCL Programs on Embedded Heterogeneous Systems. In Proceedings of the 18th ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES 2017). 11--20.
[48]
Ashish Thusoo, Joydeep Sen Sarma, Namit Jain, Zheng Shao, Prasad Chakka, Suresh Anthony, Hao Liu, Pete Wyckoff, and Raghotham Murthy. 2009. Hive: A Warehousing Solution over a Map-reduce Framework. Proc. VLDB Endow. 2, 2, 1626--1629.
[49]
Georgios Tournavitis, Zheng Wang, Björn Franke, and Michael F.P. O'Boyle. 2009. Towards a Holistic Approach to Auto-parallelization: Integrating Profile-driven Parallelism Detection and Machine-learning Based Mapping. In Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '09). 177--187.
[50]
Vinod Kumar Vavilapalli, Arun C. Murthy, Chris Douglas, Sharad Agarwal, Mahadev Konar, Robert Evans, Thomas Graves, Jason Lowe, Hitesh Shah, Siddharth Seth, Bikas Saha, Carlo Curino, Owen O'Malley, Sanjay Radia, Benjamin Reed, and Eric Baldeschwieler. 2013. Apache Hadoop YARN: Yet Another Resource Negotiator. In Proceedings of the 4th Annual Symposium on Cloud Computing (SOCC '13).
[51]
A. Verma, L. Cherkasova, and R. H. Campbell. 2012. Two Sides of a Coin: Optimizing the Schedule of MapReduce Jobs to Minimize Their Makespan and Improve Cluster Performance. In 2012 IEEE 20th International Symposium on Modeling, Analysis and Simulation of Computer and Telecommunication Systems. 11--18.
[52]
Zheng Wang, Dominik Grewe, and Michael FP OâĂŹboyle. 2015. Automatic and portable mapping of data parallel programs to opencl for gpu-based heterogeneous systems. ACM Transactions on Architecture and Code Optimization (TACO) 11, 4 (2015), 42.
[53]
Zheng Wang and Michael O'Boyle. 2009. Mapping Parallelism to Multi-cores: A Machine Learning Based Approach. In Proceedings of the 14th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '09). 75--84.
[54]
Z. Wang and M. F. P. O'Boyle. 2010. Partitioning streaming parallelism for multicores: A machine learning based approach. In 19th International Conference on Parallel Architectures and Compilation Techniques (PACT) (PACT '10). 307--318.
[55]
Zheng Wang and Michael F. P. O'boyle. 2013. Using Machine Learning to Partition Streaming Programs. ACM Trans. Archit. Code Optim. 10, 3 (2013), 20:1--20:25.
[56]
Zheng Wang, Georgios Tournavitis, Björn Franke, and Michael F. P. O'boyle. 2014. Integrating Profile-driven Parallelism Detection and Machine-learning-based Mapping. ACM Trans. Archit. Code Optim. 11, 1 (2014), 2:1--2:26.
[57]
Yuan Wen, Zheng Wang, and Michael FP O'Boyle. 2014. Smart multi-task scheduling for OpenCL programs on CPU/GPU heterogeneous platforms. In High Performance Computing (HiPC), 2014 21st International Conference on. IEEE, 1--10.
[58]
Cong Xu, Brendan Saltaformaggio, Sahan Gamage, Ramana Rao Kompella, and Dongyan Xu. 2015. vRead: Efficient Data Access for Hadoop in Virtualized Clouds. In Proceedings of the 16th Annual Middleware Conference (Middleware '15). ACM, New York, NY, USA, 125--136.
[59]
L. Xu, M. Li, L. Zhang, A. R. Butt, Y. Wang, and Z. Z. Hu. 2016. MEMTUNE: Dynamic Memory Management for In-Memory Data Analytic Platforms. In 2016 IEEE International Parallel and Distributed Processing Symposium (IPDPS). IEEE, 383--392.
[60]
Hailong Yang, Alex Breslow, Jason Mars, and Lingjia Tang. 2013. Bubble-flux: Precise Online QoS Management for Increased Utilization in Warehouse Scale Computers. In Proceedings of the 40th Annual International Symposium on Computer Architecture (ISCA '13).
[61]
Xi Yang, Stephen M. Blackburn, and Kathryn S. McKinley. 2015. Computer Performance Microscopy with Shim. SIGARCH Comput. Archit. News 43, 3, 170--184.
[62]
Matei Zaharia, Mosharaf Chowdhury, Michael J. Franklin, Scott Shenker, and Ion Stoica. 2010. Spark: Cluster Computing with Working Sets. In Proceedings of the 2Nd USENIX Conference on Hot Topics in Cloud Computing (HotCloud'10). 10--10.
[63]
Sergey Zhuravlev, Sergey Blagodurov, and Alexandra Fedorova. 2010. Addressing Shared Resource Contention in Multicore Processors via Scheduling. SIGPLAN Not. 45, 3, 129--142.

Cited By

View all
  • (2025)Enhancing Deployment-Time Predictive Model Robustness for Code Analysis and OptimizationProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708959(31-46)Online publication date: 1-Mar-2025
  • (2024)Agile-Ant: Self-Managing Distributed Cache Management for Cost Optimization of Big Data ApplicationsProceedings of the VLDB Endowment10.14778/3681954.368199017:11(3151-3164)Online publication date: 1-Jul-2024
  • (2024)Supersonic: Learning to Generate Source Code Optimizations in C/C++IEEE Transactions on Software Engineering10.1109/TSE.2024.342376950:11(2849-2864)Online publication date: 1-Nov-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Middleware '17: Proceedings of the 18th ACM/IFIP/USENIX Middleware Conference
December 2017
268 pages
ISBN:9781450347204
DOI:10.1145/3135974
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

In-Cooperation

  • USENIX Assoc: USENIX Assoc
  • IFIP

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 December 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. memory management
  2. predictive modeling
  3. resource modeling
  4. task scheduling

Qualifiers

  • Research-article

Funding Sources

  • UK EPSRC

Conference

Middleware '17
Sponsor:
Middleware '17: 18th International Middleware Conference
December 11 - 15, 2017
Nevada, Las Vegas

Acceptance Rates

Middleware '17 Paper Acceptance Rate 20 of 85 submissions, 24%;
Overall Acceptance Rate 203 of 948 submissions, 21%

Upcoming Conference

MIDDLEWARE '25
26th International Middleware Conference
December 15 - 19, 2025
Nashville , TN , USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)21
  • Downloads (Last 6 weeks)0
Reflects downloads up to 03 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2025)Enhancing Deployment-Time Predictive Model Robustness for Code Analysis and OptimizationProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708959(31-46)Online publication date: 1-Mar-2025
  • (2024)Agile-Ant: Self-Managing Distributed Cache Management for Cost Optimization of Big Data ApplicationsProceedings of the VLDB Endowment10.14778/3681954.368199017:11(3151-3164)Online publication date: 1-Jul-2024
  • (2024)Supersonic: Learning to Generate Source Code Optimizations in C/C++IEEE Transactions on Software Engineering10.1109/TSE.2024.342376950:11(2849-2864)Online publication date: 1-Nov-2024
  • (2024)Collaborative learning-based inter-dependent task dispatching and co-location in an integrated edge computing systemDigital Communications and Networks10.1016/j.dcan.2024.08.002Online publication date: Aug-2024
  • (2023)QaaD (Query-as-a-Data): Scalable Execution of Massive Number of Small Queries in SparkProceedings of the ACM on Management of Data10.1145/35892791:2(1-26)Online publication date: 20-Jun-2023
  • (2023)Resource-aware multi-task offloading and dependency-aware scheduling for integrated edge-enabled IoVJournal of Systems Architecture: the EUROMICRO Journal10.1016/j.sysarc.2023.102923141:COnline publication date: 1-Aug-2023
  • (2023)RAPID: Enabling fast online policy learning in dynamic public cloud environmentsNeurocomputing10.1016/j.neucom.2023.126737558(126737)Online publication date: Nov-2023
  • (2023)EdgeDronesJournal of Network and Computer Applications10.1016/j.jnca.2023.103632215:COnline publication date: 24-May-2023
  • (2023)PROMPT: Learning dynamic resource allocation policies for network applicationsFuture Generation Computer Systems10.1016/j.future.2023.03.016145(164-175)Online publication date: Aug-2023
  • (2022)Juggler: Autonomous Cost Optimization and Performance Prediction of Big Data ApplicationsProceedings of the 2022 International Conference on Management of Data10.1145/3514221.3517892(1840-1854)Online publication date: 10-Jun-2022
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media