Automatic Performance Tuning: Automatic Development of Tunlets Paradyn Week April 30, 2007 Automatic Performance Tuning: Automatic Development of Tunlets Universitat Autònoma de Barcelona Paola Caymes Scutari Genaro Costa, Ihab Salawdeh, Alexandre Guevara Anna Morajko, Eduardo César, Andreu Moreno, Josep Jorba Tomàs Margalef, Joan Sorribes, Emilio Luque Universitat Autònoma de Barcelona
Outline Introduction Automatic Development of Tunlets Use Case MATE Tunlets Our work Automatic Development of Tunlets Motivation Abstractions and Methodology Tunlet Specification Language Tunlet Generator Use Case Conclusions
Outline Introduction Automatic Development of Tunlets Use Case MATE Tunlets Our work Automatic Development of Tunlets Motivation Abstractions and Methodology Tunlet Specification Language Tunlet Generator Use Case Conclusions
Introduction Parallel/Distributed Computing High performance Developers must optimize application performance to provide efficient and useful applications Application behavior may change on input data or environment Difficult task especially for non-expert users
Application development MATE Monitoring, Analysis and Tuning Environment Dynamic automatic tuning of parallel/distributed applications User Tuning Monitoring Tool Solution Problem / Performance analysis Performance data Application development Application Execution Source Events Modifications DynInst Instrumentation
How to determine problems and solutions? MATE: Tunlets Analysis phase includes knowledge about possible performance problems in the applications. “TUNLETS” How to determine problems and solutions? What to modify? When? Where? What to measure? Where?
What can be tuned in an application? MATE (III) Key question: Application specific code Frameworks - Skeletons Standard and custom libraries (API+code) Operating system libraries (API+code) Hardware What can be tuned in an application? Hardware Operating System kernel OS API Libraries code API Application code Framework code
What are we working on? Performance models for patterns Hardware Operating System kernel OS API Libraries code API Application code Framework code Performance models for patterns Performance models for libraries Execution MATE extensions: Tunlets Specification Measure points Monitoring Tuning Grid Performance analysis Performance model Tuning point, action, sync
Outline Introduction Automatic Development of Tunlets Use Case MATE Tunlets Our work Automatic Development of Tunlets Motivation Abstractions and Methodology Tunlet Specification Language Tunlet Generator Use Case Conclusions
Motivation Application User MATE Framework Tunlet Tunlet … Application
Motivation Application User MATE Framework Tunlet Tunlet … Tunlet Automate
Automatic Development of Tunlets We propose a methodology to: add new tunlets to overcome different performance problems avoid the user to enter in implementations details of MATE allow users to develop their applications without restrictions
Automatic Development of Tunlets Tunlet Specification Performance Model Programming Model Measure Points Parameters p , p ... p p , p ... p 1 2 i User 1 2 i performance Performance Functions Mathematical Model problem f ... f e ... e 1 j 1 j Tuning Actions/Points a ... a 1 k tp ... tp 1 h Execution Tool Monitoring Tuning Automatic Generation Performance Analysis Tunlet ... Tunlet
Automatic Development of Tunlets Tunlet Specification Performance Model Programming Model Measure Points Parameters p , p ... p p , p ... p 1 2 i User 1 2 i performance Performance Functions Mathematical Model problem f ... f e ... e 1 j 1 j Tuning Actions/Points a ... a 1 k tp ... tp 1 h Execution Tool Monitoring Tuning Automatic Generation Performance Analysis Tunlet ... Tunlet
Automatic Development of Tunlets Tunlet Specification Performance Model Programming Model Measure Points Parameters p , p ... p p , p ... p 1 2 i User 1 2 i performance Performance Functions Mathematical Model problem f ... f e ... e 1 j 1 j Tuning Actions/Points a ... a 1 k tp ... tp 1 h Execution Tool Monitoring Tuning Automatic Generation Performance Analysis Tunlet ... Tunlet
Automatic Development of Tunlets Application Tunlet Specification Performance Model Programming Model Measure Points Parameters p , p ... p p , p ... p 1 2 i User 1 2 i performance Performance Functions Mathematical Model problem f ... f e ... e 1 j 1 j Tuning Actions/Points a ... a 1 k tp ... tp 1 h Execution Tool Monitoring Tuning Automatic Generation Performance Analysis Tunlet ... Tunlet
Automatic Development of Tunlets Application Tunlet Specification Performance Model Programming Model Measure Points Parameters p , p ... p p , p ... p 1 2 i User 1 2 i performance Performance Functions Mathematical Model problem f ... f e ... e 1 j 1 j Tuning Actions/Points a ... a 1 k tp ... tp 1 h Execution Tool Monitoring Tuning Automatic Generation Performance Analysis Tunlet ... Tunlet
Automatic Development of Tunlets Abstractions Tunlet Measure point Performance model Tuning point Performance Model Performance parameters Performance functions Application Actor Event Variable Value Attribute
Abstractions
Methodology To provide a performance model (PM) Pre-existing model Ad hoc model To understand the performance model Mainly the performance parameters To interpret the PM in the application Identifying the events Identifying the variables and values To identify the actors in the application
Methodology II Events Variables and Values Actor Function Entry or Exit Attributes Variables and Values Variable, parameter or result Name Data Type Actor Class Exe Min/Max Completion Condition
Methodology II Events Variables and Values Actor Function Entry or Exit Attributes Variables and Values Variable, parameter or result Name Data Type Actor Class Exe Min/Max Completion Condition
Methodology II Events Variables and Values Actor Function Entry or Exit Attributes Variables and Values Variable, parameter or result Name Data Type Actor Class Exe Min/Max Completion Condition
Methodology II Events Variables and Values Actor Function Entry or Exit Attributes Variables and Values Variable, parameter or result Name Data Type Actor Class Exe Min/Max Completion Condition
Automatic development of Tunlets Abstractions Formalize using our Tunlet Specification Language
Tunlet Specification Language What should be included? How? What? When? Where? What, where? Tunlet name: comment: Measure points Performance functions Tuning points
Tunlet Specification Language name: comment: Measure points variables actors events iteration info performance params. Performance functions Tuning points What? where? How? What? When? Where?
Tunlet Specification Language name: comment: Measure points Performance functions f1() … fn() Tuning points What? where? How? What? When? Where?
Tunlet Specification Language name: comment: Measure points Performance functions Tuning points point1 … pointn What? where? How? What? When? Where?
Tunlet Specification Language How? What? When? Where? What, where? Tunlet name: comment: Measure points Performance functions Tuning points
Tunlet Generation Flex + DOM XSLT Tunlet.h Tunlet.cpp Stats.h name: comment: Measure points … Performance functions Tuning points <Tunlet name=“” comment=“” /> <Measure points> … </Measure points> <Performance functions> </Performance functions> <Tuning points> </Tuning points> Flex + DOM XSLT Tunlet.h Tunlet.cpp Stats.h Stats.cpp
Outline Introduction Automatic Development of Tunlets Use Case MATE Tunlets Our work Automatic Development of Tunlets Motivation Abstractions and Methodology Tunlet Specification Language Tunlet Generator Use Case Conclusions
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Adapt the framework to allow tuning of the applications via MATE
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Adapt the framework to allow tuning of the applications via MATE Where... tl = latency λ = inverse bandwidth V = data volume Tc= computing time
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Events Entry(Computing) Exit(Computing) Entry(iteration) Exit(iteration) Variables argvData ResSize Actors Master Worker Adapt the framework to allow tuning of the applications via MATE
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Adapt the framework to allow tuning of the applications via MATE
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Variable Nopt Adapt the framework to allow tuning of the applications via MATE
Example: number of workers Framework + MATE Define the tunlet basing on the classes of the framework. Analyzer Tunle t Tunlet Performance Model Measure points Tuning points/ actions Adapt the framework to allow tuning of the applications via MATE
Number of workers: Specification Tunlet name:numworkers comment:tunlet to tune the number of workers Measure points variables argvData ResSize nopt events IterationStarts IterationFinishes WStartsT WFinishesT actors master worker performance model parameters n tl lambda Vt Ct Performance Functions int pf() {return (int)sqrt((lambda*Vt+Ct)/tl);} Tuning Points nopt
Outline Introduction Automatic Development of Tunlets Use Case MATE Tunlets Our work Automatic Development of Tunlets Motivation Abstractions and Methodology Tunlet Specification Language Tunlet Generator Use Case Conclusions
Conclusions We defined/developed: Methodology to define tunlets Tunlet Specification Language Automatic Tunlet Generator In this way, we make MATE (dynamic-automatic tuning) easier and transparent to the user.
Thank you… Automatic Performance Tuning: Automatic Development of Tunlets Paola Caymes Scutari Thank you…