QRS16: NOTICE: A Framework for Non-functional Testing of Compilers

NOTICE: A Framework for Non-functional
Testing of Compilers
Mohamed
BOUSSAA
Olivier
BARAIS
Gerson
SUNYE
Benoit
BAUDRY
2016 IEEE International Conference on Software Quality, Reliability & Security (QRS 2016)
August 1-3, 2016 - Vienna, Austria
INRIA Rennes, France
2016 IEEE International Conference on Software Quality, Reliability & Security (QRS 2016)
August 1-3, 2016 - Vienna, Austria
1
a1. Context
a2. Motivating Example
a3. NOTICE: A Framework for Non-functional Testing of Compilers
a4. Performance Evaluation
a5. Conclusion
Outline
2
Motivation
C Compilers
Source code Machine code
Optimizations
Current innovations in science and industry demand ever-increasing computing
resources while placing strict requirements on system performance, power
consumption, size, response, reliability, portability and design time
Resourceconstraints
3
Compiler fine/auto-tuning is complex
4
 Huge design space for optimization options (more than 150 optimizations)
• compiling a program means trading off between various objectives
• compilation time, code quality, code size, ...
 Constructing a good set of optimization levels (-Ox) is hard
• conflicting objectives, complex interactions, unknown effect of some
optimizations, ...
4
Trying to please everyone
5
 Program-independent universal sequences (e.g., -O1, -O2, -O3, etc.)
 Based on heuristics and experience
 Each optimization level allows trading off various objectives
• O1: "take your time, give it your best shot"
• O2: "optimize, and be quick about it"
• O3: "I’m feeling lucky, and have lots of time"
How efficient are predefined/universal
compiler levels?
5
Motivating Example
 GCC 4.8.4:
- 78 optimizations
- 278 combinations
6
Speedup,
Memory,
etc.
Resource
Constraints
WHY
ALWAYS
ME !!
- Testing each optimization configuration is impossible
-BOSS: Clients complain about the
high memory consumption
-BOSS: Is it possible to consume less
CPU?
we don’t have enough
resources/money
-BOSS: Please, can we optimize even
more ? Good luck Son !!
- Heuristics are needed
6
NOTICE: A Framework for Non-functional
Testing of Compilers
https://noticegcc.wordpress.com
7
Contributions
1- Diversity-based exploration
 Novel formulation of the compiler optimization problem using Novelty Search
 Diverse optimization sequences
 Explore the large search space by considering Novelty as the main objective
2- Microservice-based infrastructure
 Execute and monitor of the different variants of optimized code using system
containers
 Resource isolation and management
 Provide a fine-grained understanding and analysis of compilers behavior regarding
optimizations
 Automatic extraction of non-functional properties relative to resource usage
Finely auto-tuning compilers according to user (non-functional) requirements
We propose:
8
Diversity-based exploration
gcc –c test.c –fno-dce –fno-dse –fdce -fno-align-loops …
Mutation:
Crossover:
Best solution
Solution with best non-functional
improvement
0 0 1 0 …
Step 2:
Evaluation
…
Archive:
Novelty metric:
Step 3:
Selection
Step 4:
Evolutionary
operators 0 1 1 1 0 …
0 1 1 1 0 …
1 0 0 1 1 …
Go To
Step 2
Solution representation:
Saves solutions that get a novelty
metric value higher than a
specific novelty threshold
value.
Calculate the distance of one solution
from its K Nearest neighbors in
current population and in the Archive.
Step 1:
Random
generation
9
Select solutions to evolve
based on novelty scores.
Tournament selection:
Contributions
1- Diversity-based exploration
 Novel formulation of the compiler optimization problem using Novelty Search
 Diverse optimization sequences
 Explore the large search space by considering Novelty as the main objective
2- Microservice-based infrastructure
 Execute and monitor of the different variants of optimized code using
lightweight system containers
 Provide a fine-grained understanding and analysis of compilers behavior regarding
optimizations
 Resource isolation and management
 Automatic extraction of non-functional properties relative to resource usage
Finely auto-tuning compilers according to user (non-functional) requirements
We propose:
10
NOTICE Infrastructure
000
000
NOTICE
Compile and execute
optimized code within a new
container instance
Gather at runtime non-
functional properties of running
programs under test
Save information relative
to resource consumptions
within a times series database
Analysis of the performance
and non-functional properties
of programs under test
1
2
3
4
Code
Execution
Runtime
Monitoring
Time series
Database
Performance
Analysis
11
NOTICE Infrastructure
Optimizations
Component
Under Test
Monitoring
Component
Back-end
Database
Component
Cgroup file systems
Running…
Monitoring records
Front-end
Visualization
Component
Time-series database
HTTP Requests
12
Evaluation
https://noticegcc.wordpress.com/experimental-results/
13
Experimental Setup
v4.8.4
Random C code
generator
For monitoring
For storage
Optimizations
Mono Objective
Novelty Search (NS)
Genetic Algo (GA)
Random Search (RS)
Multi Objective
Novelty Search (NS-II)
NSGA-II
Speedup (S)
Meta-heuristics
Program
under
test
Compiler
Algorithm parameters
Evaluation metrics
Memory consumption reduction (MR)
CPU consumption reduction (CR)
Over -O0
Trade-off <execution time - memory usage>
14
Research Questions
RQ1: Mono-objective SBSE Validation.
Optimizations
Non-functional
metric
Training set programs
Best
sequence
RQ2: Sensitivity of input programs to
optimization sequences
Unseen programs
Non-functional
improvementBest sequence
in RQ1
RQ3: Impact of speedup on resource
consumption.
RQ4: Trade-offs between non-functional
properties.
Best Speedup
Sequence
In RQ1
Impact on
resource
consumption Optimizations
Pareto front
solutions
15
Training set programs Multi-objective search
Mono-objective search
Non-functional
Trade-off
<time-memory>
Input program
RQ1- Results
RQ1: Mono-objective SBSE Validation.
- Training set: 10 Csmith programs
- Average S, MR, and CR
- Comparison: Ox, RS, GA and NS
Key findings for RQ1:
– Best discovered optimization sequences using mono-objective search techniques always provide better
results than standard GCC optimization levels.
– Novelty Search is a good candidate to improve code in terms of non-functional properties since it is able to
discover optimization combinations that outperform RS and GA.
Search for best optimization
sequence
Best
sequence
Optimizations
Non-functional
Metric
Training set programs
16
RQ2- Results
Key findings for RQ2:
– It is possible to build general optimization sequences that perform better than standard optimization levels
– Best discovered sequences in RQ1 can be mostly used to improve the memory and CPU consumption of
Csmith programs. To answer RQ2, Csmith programs are sensitive to compiler optimizations.
RQ2: Sensitivity.
- 100 unseen Csmith programs
- O2 vs O3 vs NS
Unseen programs
Non-functional
improvement
Best Sequence
In RQ1
17
RQ3- Results
RQ3: Impact of optimizations on resource consumption.
- Ox vs RS vs GA vs NS
Key findings for RQ3:
– Optimizing software performance can induce undesirable effects on system resources.
– A trade-off is needed to find a correlation between software performance and resource usage.
Best Speedup
Sequence
In RQ1 Training set programs
Impact on
Resource CPU & memory
18
Memory
reduction
Increase of
resource usage
CPU
reduction
RQ4- Results
RQ4: Trade-offs between non-functional properties.
- 1 Csmith program
- Trade-off <execution time-memory usage>
Key findings for RQ4:
– NOTICE is able to construct optimization levels that represent optimal trade-offs between non-functional
properties.
– NS is more effective when it is applied for mono-objective search.
– NSGA-II performs better than our NS adaptation for multi-objective optimization. However, NS-II performs
clearly better than standard GCC optimizations and previously discovered sequences in RQ1.
19
Optimizations Pareto front
solutions
Multi-objective search
Trade-off time/memory
Input program
Pareto front NS-II
(multi-objective)
Ofast
O3
O2
O1
Best CPU reduction
(mono-objective)
Best memory reduction
(mono-objective)
Pareto front NSGA-II
(multi-objective)
Conclusion
20
Conclusion
21
 Novel formulation of the compiler
optimization problem based on
Novelty Search
 Novelty Search is able to
generate effective optimizations
 Automated tool for automatic
extraction of non-functional
properties of optimized code
 Automatically extract information
about memory and CPU
consumption
Summary
 Explore more trade-offs among
resource usage metrics
 Evaluate NOTICE:
• on real world benchmarks
• other case studies (i.e.,
compilers, programs, etc)
Future directions
21
https://noticegcc.wordpress.com/ 22
Questions?
Additional slides
23
Tool Support
24
 Functional Testing of Compilers
Literature Overview
25
 Non-Functional Testing of Compilers
Literature Overview
26
Prior work is insufficient
Testing the non-functional properities pose several new challenges:
- Different cost-benefit trade-offs (e.g., Speedup/memory or CPU usage)
- Finely auto-tuning compilers according to user (non-functional) requirements
- Performance is the major concern (e.g., speedup)
- Ignore other important non-functional properties (e.g., resource consumption
properties)
- Evaluation is based on a small set of input programs (e.g., Spec CPU benchmarks)
27
Given a set of compiler optimization
options {F1, F2, ..., Fn}, How can we find
the combination that maximize program
performance better than standard
optimization levels ?
Do this efficiently, without the use of a priori
knowledge of the optimizations and their interactions
From
to
From
to
Problem Statement
28
NSGA-II overview
• NSGA-II: Non-dominated Sorting Genetic Algorithm (K. Deb et al., ’02)
Parent
Population
Offspring
Population
Non-dominated
sorting
F1
F2
F3
F4
Crowding distance
sorting
Population
in next
generation
MOEA Framework http://moeaframework.org/
29
NSGA-II overview
30
1 of 30

Recommended

Understand and Harness the Capabilities of Intel® Xeon Phi™ Processors by
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsUnderstand and Harness the Capabilities of Intel® Xeon Phi™ Processors
Understand and Harness the Capabilities of Intel® Xeon Phi™ ProcessorsIntel® Software
457 views79 slides
A Library for Emerging High-Performance Computing Clusters by
A Library for Emerging High-Performance Computing ClustersA Library for Emerging High-Performance Computing Clusters
A Library for Emerging High-Performance Computing ClustersIntel® Software
374 views48 slides
Introducing the TPCx-HS Benchmark for Big Data by
Introducing the TPCx-HS Benchmark for Big DataIntroducing the TPCx-HS Benchmark for Big Data
Introducing the TPCx-HS Benchmark for Big Datainside-BigData.com
3.8K views23 slides
GPCE16 Poster: Automatic Non-functional Testing of Code Generators Families by
GPCE16 Poster: Automatic Non-functional Testing of Code Generators Families GPCE16 Poster: Automatic Non-functional Testing of Code Generators Families
GPCE16 Poster: Automatic Non-functional Testing of Code Generators Families Mohamed BOUSSAA
448 views1 slide
GPCE16: Automatic Non-functional Testing of Code Generators Families by
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesGPCE16: Automatic Non-functional Testing of Code Generators Families
GPCE16: Automatic Non-functional Testing of Code Generators FamiliesMohamed BOUSSAA
859 views26 slides
Performance Evaluation of Open Source Data Mining Tools by
Performance Evaluation of Open Source Data Mining ToolsPerformance Evaluation of Open Source Data Mining Tools
Performance Evaluation of Open Source Data Mining Toolsijsrd.com
383 views8 slides

More Related Content

Similar to QRS16: NOTICE: A Framework for Non-functional Testing of Compilers

TechTalk_Cloud Performance Testing_0.6 by
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6Sravanthi N
165 views28 slides
Ch1 by
Ch1Ch1
Ch1Elizabeth de Leon Aler
365 views43 slides
Ch1 by
Ch1Ch1
Ch1Elizabeth de Leon Aler
326 views43 slides
System mldl meetup by
System mldl meetupSystem mldl meetup
System mldl meetupGanesan Narayanasamy
112 views26 slides
Presentation by
PresentationPresentation
Presentationbutest
592 views38 slides
Software effort estimation through clustering techniques of RBFN network by
Software effort estimation through clustering techniques of RBFN networkSoftware effort estimation through clustering techniques of RBFN network
Software effort estimation through clustering techniques of RBFN networkIOSR Journals
407 views5 slides

Similar to QRS16: NOTICE: A Framework for Non-functional Testing of Compilers(20)

TechTalk_Cloud Performance Testing_0.6 by Sravanthi N
TechTalk_Cloud Performance Testing_0.6TechTalk_Cloud Performance Testing_0.6
TechTalk_Cloud Performance Testing_0.6
Sravanthi N165 views
Presentation by butest
PresentationPresentation
Presentation
butest592 views
Software effort estimation through clustering techniques of RBFN network by IOSR Journals
Software effort estimation through clustering techniques of RBFN networkSoftware effort estimation through clustering techniques of RBFN network
Software effort estimation through clustering techniques of RBFN network
IOSR Journals407 views
Fundamentals of software development by Pratik Devmurari
Fundamentals of software developmentFundamentals of software development
Fundamentals of software development
Pratik Devmurari1.9K views
Measuring Your Code by Nate Abele
Measuring Your CodeMeasuring Your Code
Measuring Your Code
Nate Abele1.6K views
Measurement .Net Performance with BenchmarkDotNet by Vasyl Senko
Measurement .Net Performance with BenchmarkDotNetMeasurement .Net Performance with BenchmarkDotNet
Measurement .Net Performance with BenchmarkDotNet
Vasyl Senko1.7K views
ReComp project kickoff presentation 11-03-2016 by Paolo Missier
ReComp project kickoff presentation 11-03-2016ReComp project kickoff presentation 11-03-2016
ReComp project kickoff presentation 11-03-2016
Paolo Missier672 views
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun... by Dan Cundiff
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Splunk All the Things: Our First 3 Months Monitoring Web Service APIs - Splun...
Dan Cundiff3K views
ASIP (Application-specific instruction-set processor) by Hamid Reza
ASIP (Application-specific instruction-set processor)ASIP (Application-specific instruction-set processor)
ASIP (Application-specific instruction-set processor)
Hamid Reza1K views
SourceWarp AST 2023.pdf by Julian Thome
SourceWarp AST 2023.pdfSourceWarp AST 2023.pdf
SourceWarp AST 2023.pdf
Julian Thome12 views
Dynamic Spectrum Access Simulation by Karen Nelson
Dynamic Spectrum Access SimulationDynamic Spectrum Access Simulation
Dynamic Spectrum Access Simulation
Karen Nelson2 views
Software Development : Jeremy Gleason Iscope Digital by Iscope Digital
Software Development : Jeremy Gleason Iscope DigitalSoftware Development : Jeremy Gleason Iscope Digital
Software Development : Jeremy Gleason Iscope Digital
Iscope Digital242 views
agile with scrum methodology by rahul reddy
agile with scrum methodology agile with scrum methodology
agile with scrum methodology
rahul reddy1.5K views
Tool-Driven Technology Transfer in Software Engineering by Heiko Koziolek
Tool-Driven Technology Transfer in Software EngineeringTool-Driven Technology Transfer in Software Engineering
Tool-Driven Technology Transfer in Software Engineering
Heiko Koziolek178 views

Recently uploaded

Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... by
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...csegroupvn
6 views210 slides
SUMIT SQL PROJECT SUPERSTORE 1.pptx by
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptxSumit Jadhav
22 views26 slides
GDSC Mikroskil Members Onboarding 2023.pdf by
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdfgdscmikroskil
59 views62 slides
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth by
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for GrowthInnomantra
10 views4 slides
_MAKRIADI-FOTEINI_diploma thesis.pptx by
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptxfotinimakriadi
10 views32 slides
Design of machine elements-UNIT 3.pptx by
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptxgopinathcreddy
34 views31 slides

Recently uploaded(20)

Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc... by csegroupvn
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
Design of Structures and Foundations for Vibrating Machines, Arya-ONeill-Pinc...
csegroupvn6 views
SUMIT SQL PROJECT SUPERSTORE 1.pptx by Sumit Jadhav
SUMIT SQL PROJECT SUPERSTORE 1.pptxSUMIT SQL PROJECT SUPERSTORE 1.pptx
SUMIT SQL PROJECT SUPERSTORE 1.pptx
Sumit Jadhav 22 views
GDSC Mikroskil Members Onboarding 2023.pdf by gdscmikroskil
GDSC Mikroskil Members Onboarding 2023.pdfGDSC Mikroskil Members Onboarding 2023.pdf
GDSC Mikroskil Members Onboarding 2023.pdf
gdscmikroskil59 views
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth by Innomantra
BCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for GrowthBCIC - Manufacturing Conclave -  Technology-Driven Manufacturing for Growth
BCIC - Manufacturing Conclave - Technology-Driven Manufacturing for Growth
Innomantra 10 views
_MAKRIADI-FOTEINI_diploma thesis.pptx by fotinimakriadi
_MAKRIADI-FOTEINI_diploma thesis.pptx_MAKRIADI-FOTEINI_diploma thesis.pptx
_MAKRIADI-FOTEINI_diploma thesis.pptx
fotinimakriadi10 views
Design of machine elements-UNIT 3.pptx by gopinathcreddy
Design of machine elements-UNIT 3.pptxDesign of machine elements-UNIT 3.pptx
Design of machine elements-UNIT 3.pptx
gopinathcreddy34 views
Design_Discover_Develop_Campaign.pptx by ShivanshSeth6
Design_Discover_Develop_Campaign.pptxDesign_Discover_Develop_Campaign.pptx
Design_Discover_Develop_Campaign.pptx
ShivanshSeth645 views
Ansari: Practical experiences with an LLM-based Islamic Assistant by M Waleed Kadous
Ansari: Practical experiences with an LLM-based Islamic AssistantAnsari: Practical experiences with an LLM-based Islamic Assistant
Ansari: Practical experiences with an LLM-based Islamic Assistant
M Waleed Kadous7 views
Searching in Data Structure by raghavbirla63
Searching in Data StructureSearching in Data Structure
Searching in Data Structure
raghavbirla6314 views
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf by AlhamduKure
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdfASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
ASSIGNMENTS ON FUZZY LOGIC IN TRAFFIC FLOW.pdf
AlhamduKure6 views
Update 42 models(Diode/General ) in SPICE PARK(DEC2023) by Tsuyoshi Horigome
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
Update 42 models(Diode/General ) in SPICE PARK(DEC2023)
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx by lwang78
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
2023Dec ASU Wang NETR Group Research Focus and Facility Overview.pptx
lwang78165 views
fakenews_DBDA_Mar23.pptx by deepmitra8
fakenews_DBDA_Mar23.pptxfakenews_DBDA_Mar23.pptx
fakenews_DBDA_Mar23.pptx
deepmitra816 views

QRS16: NOTICE: A Framework for Non-functional Testing of Compilers

  • 1. NOTICE: A Framework for Non-functional Testing of Compilers Mohamed BOUSSAA Olivier BARAIS Gerson SUNYE Benoit BAUDRY 2016 IEEE International Conference on Software Quality, Reliability & Security (QRS 2016) August 1-3, 2016 - Vienna, Austria INRIA Rennes, France 2016 IEEE International Conference on Software Quality, Reliability & Security (QRS 2016) August 1-3, 2016 - Vienna, Austria 1
  • 2. a1. Context a2. Motivating Example a3. NOTICE: A Framework for Non-functional Testing of Compilers a4. Performance Evaluation a5. Conclusion Outline 2
  • 3. Motivation C Compilers Source code Machine code Optimizations Current innovations in science and industry demand ever-increasing computing resources while placing strict requirements on system performance, power consumption, size, response, reliability, portability and design time Resourceconstraints 3
  • 4. Compiler fine/auto-tuning is complex 4  Huge design space for optimization options (more than 150 optimizations) • compiling a program means trading off between various objectives • compilation time, code quality, code size, ...  Constructing a good set of optimization levels (-Ox) is hard • conflicting objectives, complex interactions, unknown effect of some optimizations, ... 4
  • 5. Trying to please everyone 5  Program-independent universal sequences (e.g., -O1, -O2, -O3, etc.)  Based on heuristics and experience  Each optimization level allows trading off various objectives • O1: "take your time, give it your best shot" • O2: "optimize, and be quick about it" • O3: "I’m feeling lucky, and have lots of time" How efficient are predefined/universal compiler levels? 5
  • 6. Motivating Example  GCC 4.8.4: - 78 optimizations - 278 combinations 6 Speedup, Memory, etc. Resource Constraints WHY ALWAYS ME !! - Testing each optimization configuration is impossible -BOSS: Clients complain about the high memory consumption -BOSS: Is it possible to consume less CPU? we don’t have enough resources/money -BOSS: Please, can we optimize even more ? Good luck Son !! - Heuristics are needed 6
  • 7. NOTICE: A Framework for Non-functional Testing of Compilers https://noticegcc.wordpress.com 7
  • 8. Contributions 1- Diversity-based exploration  Novel formulation of the compiler optimization problem using Novelty Search  Diverse optimization sequences  Explore the large search space by considering Novelty as the main objective 2- Microservice-based infrastructure  Execute and monitor of the different variants of optimized code using system containers  Resource isolation and management  Provide a fine-grained understanding and analysis of compilers behavior regarding optimizations  Automatic extraction of non-functional properties relative to resource usage Finely auto-tuning compilers according to user (non-functional) requirements We propose: 8
  • 9. Diversity-based exploration gcc –c test.c –fno-dce –fno-dse –fdce -fno-align-loops … Mutation: Crossover: Best solution Solution with best non-functional improvement 0 0 1 0 … Step 2: Evaluation … Archive: Novelty metric: Step 3: Selection Step 4: Evolutionary operators 0 1 1 1 0 … 0 1 1 1 0 … 1 0 0 1 1 … Go To Step 2 Solution representation: Saves solutions that get a novelty metric value higher than a specific novelty threshold value. Calculate the distance of one solution from its K Nearest neighbors in current population and in the Archive. Step 1: Random generation 9 Select solutions to evolve based on novelty scores. Tournament selection:
  • 10. Contributions 1- Diversity-based exploration  Novel formulation of the compiler optimization problem using Novelty Search  Diverse optimization sequences  Explore the large search space by considering Novelty as the main objective 2- Microservice-based infrastructure  Execute and monitor of the different variants of optimized code using lightweight system containers  Provide a fine-grained understanding and analysis of compilers behavior regarding optimizations  Resource isolation and management  Automatic extraction of non-functional properties relative to resource usage Finely auto-tuning compilers according to user (non-functional) requirements We propose: 10
  • 11. NOTICE Infrastructure 000 000 NOTICE Compile and execute optimized code within a new container instance Gather at runtime non- functional properties of running programs under test Save information relative to resource consumptions within a times series database Analysis of the performance and non-functional properties of programs under test 1 2 3 4 Code Execution Runtime Monitoring Time series Database Performance Analysis 11
  • 12. NOTICE Infrastructure Optimizations Component Under Test Monitoring Component Back-end Database Component Cgroup file systems Running… Monitoring records Front-end Visualization Component Time-series database HTTP Requests 12
  • 14. Experimental Setup v4.8.4 Random C code generator For monitoring For storage Optimizations Mono Objective Novelty Search (NS) Genetic Algo (GA) Random Search (RS) Multi Objective Novelty Search (NS-II) NSGA-II Speedup (S) Meta-heuristics Program under test Compiler Algorithm parameters Evaluation metrics Memory consumption reduction (MR) CPU consumption reduction (CR) Over -O0 Trade-off <execution time - memory usage> 14
  • 15. Research Questions RQ1: Mono-objective SBSE Validation. Optimizations Non-functional metric Training set programs Best sequence RQ2: Sensitivity of input programs to optimization sequences Unseen programs Non-functional improvementBest sequence in RQ1 RQ3: Impact of speedup on resource consumption. RQ4: Trade-offs between non-functional properties. Best Speedup Sequence In RQ1 Impact on resource consumption Optimizations Pareto front solutions 15 Training set programs Multi-objective search Mono-objective search Non-functional Trade-off <time-memory> Input program
  • 16. RQ1- Results RQ1: Mono-objective SBSE Validation. - Training set: 10 Csmith programs - Average S, MR, and CR - Comparison: Ox, RS, GA and NS Key findings for RQ1: – Best discovered optimization sequences using mono-objective search techniques always provide better results than standard GCC optimization levels. – Novelty Search is a good candidate to improve code in terms of non-functional properties since it is able to discover optimization combinations that outperform RS and GA. Search for best optimization sequence Best sequence Optimizations Non-functional Metric Training set programs 16
  • 17. RQ2- Results Key findings for RQ2: – It is possible to build general optimization sequences that perform better than standard optimization levels – Best discovered sequences in RQ1 can be mostly used to improve the memory and CPU consumption of Csmith programs. To answer RQ2, Csmith programs are sensitive to compiler optimizations. RQ2: Sensitivity. - 100 unseen Csmith programs - O2 vs O3 vs NS Unseen programs Non-functional improvement Best Sequence In RQ1 17
  • 18. RQ3- Results RQ3: Impact of optimizations on resource consumption. - Ox vs RS vs GA vs NS Key findings for RQ3: – Optimizing software performance can induce undesirable effects on system resources. – A trade-off is needed to find a correlation between software performance and resource usage. Best Speedup Sequence In RQ1 Training set programs Impact on Resource CPU & memory 18 Memory reduction Increase of resource usage CPU reduction
  • 19. RQ4- Results RQ4: Trade-offs between non-functional properties. - 1 Csmith program - Trade-off <execution time-memory usage> Key findings for RQ4: – NOTICE is able to construct optimization levels that represent optimal trade-offs between non-functional properties. – NS is more effective when it is applied for mono-objective search. – NSGA-II performs better than our NS adaptation for multi-objective optimization. However, NS-II performs clearly better than standard GCC optimizations and previously discovered sequences in RQ1. 19 Optimizations Pareto front solutions Multi-objective search Trade-off time/memory Input program Pareto front NS-II (multi-objective) Ofast O3 O2 O1 Best CPU reduction (mono-objective) Best memory reduction (mono-objective) Pareto front NSGA-II (multi-objective)
  • 21. Conclusion 21  Novel formulation of the compiler optimization problem based on Novelty Search  Novelty Search is able to generate effective optimizations  Automated tool for automatic extraction of non-functional properties of optimized code  Automatically extract information about memory and CPU consumption Summary  Explore more trade-offs among resource usage metrics  Evaluate NOTICE: • on real world benchmarks • other case studies (i.e., compilers, programs, etc) Future directions 21
  • 25.  Functional Testing of Compilers Literature Overview 25
  • 26.  Non-Functional Testing of Compilers Literature Overview 26
  • 27. Prior work is insufficient Testing the non-functional properities pose several new challenges: - Different cost-benefit trade-offs (e.g., Speedup/memory or CPU usage) - Finely auto-tuning compilers according to user (non-functional) requirements - Performance is the major concern (e.g., speedup) - Ignore other important non-functional properties (e.g., resource consumption properties) - Evaluation is based on a small set of input programs (e.g., Spec CPU benchmarks) 27
  • 28. Given a set of compiler optimization options {F1, F2, ..., Fn}, How can we find the combination that maximize program performance better than standard optimization levels ? Do this efficiently, without the use of a priori knowledge of the optimizations and their interactions From to From to Problem Statement 28
  • 29. NSGA-II overview • NSGA-II: Non-dominated Sorting Genetic Algorithm (K. Deb et al., ’02) Parent Population Offspring Population Non-dominated sorting F1 F2 F3 F4 Crowding distance sorting Population in next generation MOEA Framework http://moeaframework.org/ 29