SlideShare ist ein Scribd-Unternehmen logo
1 von 57
Downloaden Sie, um offline zu lesen
Optimizing the Performance-RelatedOptimizing the Performance-Related
Configurations of ORM FrameworksConfigurations of ORM Frameworks
Ravjot Singh, Cor-Paul Bezemer,Weiyi Shang,Ahmed E. Hassan
Using a Multi-Objective Genetic AlgorithmUsing a Multi-Objective Genetic Algorithm
2
Configuration is DIFFICULTConfiguration is DIFFICULT
3
27% of customer issues are27% of customer issues are
due to misconfigurationdue to misconfiguration
4
20% of misconfigurations cause20% of misconfigurations cause
performance degradationsperformance degradations
5
A popular online store estimates a $1.6A popular online store estimates a $1.6
billion loss for a 1-second slowdownbillion loss for a 1-second slowdown
6
Databases are at the coreDatabases are at the core
of many large systemsof many large systems
7
Software developers knowSoftware developers know
how to think in objects...how to think in objects...
8
But have less experienceBut have less experience
with databaseswith databases
9
Object-relational mappingObject-relational mapping
(ORM) helps developers(ORM) helps developers
CODE
10
Code without ORM isCode without ORM is
tedioustedious
public class Person {
// ...
public String getName(){
sql = “SELECT name FROM … WHERE …”;
ResultSet rs = stmt.executeQuery(sql);
while(rs.next())
return rs.getString(“name”);
}
}
11
Code with ORM is cleanCode with ORM is clean
@Entity
public class Person {
@Id Integer getId() { ... }
public String getName(){
return this.name;
}
}
12
Several popular ORMSeveral popular ORM
frameworks existframeworks exist
13
ORM has many configurationORM has many configuration
optionsoptions
14
ORM configuration is…ORM configuration is…
guess what?guess what?
15
ORM configuration is…ORM configuration is…
guess what? Difficult!guess what? Difficult!
16
The impact of one ORMThe impact of one ORM
configuration optionconfiguration option
hibernate.max_fetch_depth = {0|1|2|3|...}
17
The impact of one ORMThe impact of one ORM
configuration optionconfiguration option
hibernate.max_fetch_depth = {0|1|2|3|...}
Optimal configuration depends on what you need!
18
Should we care about ORMShould we care about ORM
performance configuration?performance configuration?
Analyze 11 boolean configuration options
hence 211
= 2048 configurations
19
We compare the 'default' withWe compare the 'default' with
the optimal configurationthe optimal configuration
Default configuration
System Tests
Run tests
Default
execution
time
20
We compare the 'default' withWe compare the 'default' with
the optimal configurationthe optimal configuration
Default configuration
System Tests
Run tests
Optimal configuration
System Tests
Default
execution
time
Optimal
execution
time
Run tests
21
We compare the 'default' withWe compare the 'default' with
the optimal configurationthe optimal configuration
Default configuration
System Tests
Run tests
Optimal configuration
System Tests
Compare
Default
execution
time
Optimal
execution
time
Run tests
22
Yes, we should care about ORMYes, we should care about ORM
performance configuration!performance configuration!
89% 96%
of the test cases are significantly
slower using default!
23
How can we guide ORMHow can we guide ORM
performance configuration?performance configuration?
24
Optimize ORM configurationOptimize ORM configuration
by trial-and-errorby trial-and-error
Randomly select
configuration A
25
Optimize ORM configurationOptimize ORM configuration
by trial-and-errorby trial-and-error
Evaluate configuration A
on some workload W
Randomly select
configuration A
26
Optimize ORM configurationOptimize ORM configuration
by trial-and-errorby trial-and-error
Evaluate configuration A
on some workload W
Compare execution time for configuration A
with execution time for current best configuration
Randomly select
configuration A
27
Optimize ORM configurationOptimize ORM configuration
by trial-and-errorby trial-and-error
Evaluate configuration A
on some workload W
Compare execution time for configuration A
with execution time for current best configuration
Randomly select
configuration A
Use best configuration
28
Optimize ORM configurationOptimize ORM configuration
by trial-and-errorby trial-and-error
Evaluate configuration A
on some workload W
Compare execution time for configuration A
with execution time for current best configuration
Randomly select
configuration A
Use best configuration
29
An evolutionary/genetic algorithmAn evolutionary/genetic algorithm
guides this trial-and-error processguides this trial-and-error process
30
Genetic algorithm conceptGenetic algorithm concept
Optimize population based on
one or more objectives
We start from the 'default'
configuration as supplied by
the developer
31
Genetic algorithm conceptGenetic algorithm concept
1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1+
32
Genetic algorithm conceptGenetic algorithm concept
1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 1 0 0 0 0 0 1
+
33
Genetic algorithm conceptGenetic algorithm concept
1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1
1 1 0 0 0 0 0 1
1 1 0 0 0 1 0 1
+
34
Genetic algorithm conceptGenetic algorithm concept
1 1 0 0 0 0 0 0
1 0 0 1 0 0 0 1
1 1 0 0 0 1 0 1
Execution time = 50s
Execution time = 60s
Execution time = 30s
35
Genetic algorithm conceptGenetic algorithm concept
1 1 0 0 0 0 0 0
1 0 0 1 0 0 0 1
1 1 0 0 0 1 0 1
Execution time = 50s
Execution time = 60s
Execution time = 30s
36
Optimizing ORMOptimizing ORM
performance configurationperformance configuration
Objectives:
CPU
Memory
Execution time
37
Optimizing ORMOptimizing ORM
performance configurationperformance configuration
Objectives:
CPU
Memory
Execution time
Calculate Δ with
default configuration
38
Evaluation of our approachEvaluation of our approach
1. Closeness of configurations found by
our approach to the optimal
configuration
2. Speed with which we can find sub-
optimal configurations
39
ExperimentsExperiments
Default configuration
Tests
Repeat 100 times
Optimal configuration
40
Closeness of configurationsCloseness of configurations
to the optimalto the optimal
We rank all existing configurations based on
dominance
Configuration A dominates configuration B if:
1. B is not better than A for all objectives
2.A is better than B for at least one objective
41
Ranking of configurationsRanking of configurations
Configuration CPU usage Memory
usage
Execution time
Default 0 0 0
A +50% +50% 0
B -80% -20% 0
C 0 -80% -20%
42
Ranking of configurationsRanking of configurations
Configuration CPU usage Memory
usage
Execution time
Default 0 0 0
A +50% +50% 0
B -80% -20% 0
C 0 -80% -20%
Rank 1: B and C
Rank 2: default
Rank 3:A
43
The genetic algorithm findsThe genetic algorithm finds
configurations close to the best rankconfigurations close to the best rank
BEST WORST
44
Speed with whichSpeed with which
configurations are foundconfigurations are found
Depends on:
- Workload
- Application
- Data
45
The genetic algorithm findsThe genetic algorithm finds
configurations fast (~5-20 minutes)configurations fast (~5-20 minutes)
46
Yes, we should care about ORMYes, we should care about ORM
performance configuration!performance configuration!
89% 96%
of the test cases are significantly
slower using default!
47
48
How can we guide ORMHow can we guide ORM
performance configuration?performance configuration?
49
50
The genetic algorithm findsThe genetic algorithm finds
configurations close to the optimal rankconfigurations close to the optimal rank
51
52
The genetic algorithm findsThe genetic algorithm finds
configurations fast (~5-20 minutes)configurations fast (~5-20 minutes)
53
54
Cor-Paul Bezemer
bezemer@cs.queensu.ca
http://sailhome.cs.queensu.ca/~corpaul/
55
56
Studied configuration optionsStudied configuration options
order_updates
jdbc.batch_size
order_inserts
connection.release_mode
default_batch_fetch_size
jdbc.batch_versioned_data
max_fetch_depth
id.new_generator_mappings
jdbc.fetch_size
bytecode.use_reflection_optimizer
cache.use_second_level_cache
57
Yes, we should care about ORMYes, we should care about ORM
performance configuration!performance configuration!

Weitere ähnliche Inhalte

Andere mochten auch

Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level Problems
Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level ProblemsModular Multi-Objective Genetic Algorithm for Large Scale Bi-level Problems
Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level ProblemsStefano Costanzo
 
Genetic Algorithms for optimization
Genetic Algorithms for optimizationGenetic Algorithms for optimization
Genetic Algorithms for optimizationFethi Candan
 
A Multi-Objective Genetic Algorithm for Pruning Support Vector Machines
A Multi-Objective Genetic Algorithm for Pruning Support Vector MachinesA Multi-Objective Genetic Algorithm for Pruning Support Vector Machines
A Multi-Objective Genetic Algorithm for Pruning Support Vector MachinesMohamed Farouk
 
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...Masahiro Kanazaki
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkVolker Hirsch
 

Andere mochten auch (6)

Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level Problems
Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level ProblemsModular Multi-Objective Genetic Algorithm for Large Scale Bi-level Problems
Modular Multi-Objective Genetic Algorithm for Large Scale Bi-level Problems
 
Genetic Algorithms for optimization
Genetic Algorithms for optimizationGenetic Algorithms for optimization
Genetic Algorithms for optimization
 
A Multi-Objective Genetic Algorithm for Pruning Support Vector Machines
A Multi-Objective Genetic Algorithm for Pruning Support Vector MachinesA Multi-Objective Genetic Algorithm for Pruning Support Vector Machines
A Multi-Objective Genetic Algorithm for Pruning Support Vector Machines
 
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...
Multi-objective Genetic Algorithm Applied to Conceptual Design of Single-stag...
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 
TEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of WorkTEDx Manchester: AI & The Future of Work
TEDx Manchester: AI & The Future of Work
 

Ähnlich wie Optimizing the Performance-Related Configurations of Object-Relational Mapping Frameworks Using a Multi-Objective Genetic Algorithm

Clean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & WatirClean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & WatirDanny Smith
 
Webinar: Does Your Data Center Need NVMe?
Webinar: Does Your Data Center Need NVMe?Webinar: Does Your Data Center Need NVMe?
Webinar: Does Your Data Center Need NVMe?Storage Switzerland
 
Dev confus.2020 compliance operator
Dev confus.2020 compliance operatorDev confus.2020 compliance operator
Dev confus.2020 compliance operatorjaormx
 
Continuous Performance Testing for Microservices
Continuous Performance Testing for MicroservicesContinuous Performance Testing for Microservices
Continuous Performance Testing for MicroservicesVincenzo Ferme
 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016MLconf
 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkSigOpt
 
Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)JovanZ
 
ICSE2014
ICSE2014ICSE2014
ICSE2014swy351
 
TEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTINGTEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTINGsuhasreddy1
 
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataВладимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataMail.ru Group
 
Database Performance Tuning Introduction
Database  Performance Tuning IntroductionDatabase  Performance Tuning Introduction
Database Performance Tuning IntroductionMyOnlineITCourses
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography & Mass Spectrometry Solutions
 
Intrusion detection system with GA
Intrusion detection system with GAIntrusion detection system with GA
Intrusion detection system with GAChungHsiangHsueh
 
SOFTWARE ENGINEERING UNIT 6 Ch 13
SOFTWARE ENGINEERING UNIT 6 Ch 13SOFTWARE ENGINEERING UNIT 6 Ch 13
SOFTWARE ENGINEERING UNIT 6 Ch 13Azhar Shaik
 

Ähnlich wie Optimizing the Performance-Related Configurations of Object-Relational Mapping Frameworks Using a Multi-Objective Genetic Algorithm (20)

Icse2018 autonomic
Icse2018 autonomicIcse2018 autonomic
Icse2018 autonomic
 
Bayesian Global Optimization
Bayesian Global OptimizationBayesian Global Optimization
Bayesian Global Optimization
 
Clean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & WatirClean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & Watir
 
Webinar: Does Your Data Center Need NVMe?
Webinar: Does Your Data Center Need NVMe?Webinar: Does Your Data Center Need NVMe?
Webinar: Does Your Data Center Need NVMe?
 
Dev confus.2020 compliance operator
Dev confus.2020 compliance operatorDev confus.2020 compliance operator
Dev confus.2020 compliance operator
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Continuous Performance Testing for Microservices
Continuous Performance Testing for MicroservicesContinuous Performance Testing for Microservices
Continuous Performance Testing for Microservices
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
Scott Clark, Co-Founder and CEO, SigOpt at MLconf SF 2016
 
MLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott ClarkMLConf 2016 SigOpt Talk by Scott Clark
MLConf 2016 SigOpt Talk by Scott Clark
 
Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)Cim Automation 0909 Xx (Linkedin)
Cim Automation 0909 Xx (Linkedin)
 
ICSE2014
ICSE2014ICSE2014
ICSE2014
 
Test execution may_04_2006
Test execution may_04_2006Test execution may_04_2006
Test execution may_04_2006
 
TEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTINGTEST EXECUTION AND REPORTING
TEST EXECUTION AND REPORTING
 
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough dataВладимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
Владимир Гулин, Mail.Ru Group, Learning to rank using clickthrough data
 
Foutse_Khomh.pptx
Foutse_Khomh.pptxFoutse_Khomh.pptx
Foutse_Khomh.pptx
 
Database Performance Tuning Introduction
Database  Performance Tuning IntroductionDatabase  Performance Tuning Introduction
Database Performance Tuning Introduction
 
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
Chromatography Data System: Getting It “Right First Time” Seminar Series – Pa...
 
Intrusion detection system with GA
Intrusion detection system with GAIntrusion detection system with GA
Intrusion detection system with GA
 
SOFTWARE ENGINEERING UNIT 6 Ch 13
SOFTWARE ENGINEERING UNIT 6 Ch 13SOFTWARE ENGINEERING UNIT 6 Ch 13
SOFTWARE ENGINEERING UNIT 6 Ch 13
 

Kürzlich hochgeladen

Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsOrtegaSyrineMay
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusNazaninKarimi6
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....muralinath2
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxANSARKHAN96
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Silpa
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxseri bangash
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxSilpa
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learninglevieagacer
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxSuji236384
 
Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Silpa
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLkantirani197
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspectsmuralinath2
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY1301aanya
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Serviceshivanisharma5244
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsbassianu17
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxDiariAli
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...Monika Rani
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxSilpa
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsSérgio Sacani
 

Kürzlich hochgeladen (20)

Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
Human & Veterinary Respiratory Physilogy_DR.E.Muralinath_Associate Professor....
 
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptxTHE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
THE ROLE OF BIOTECHNOLOGY IN THE ECONOMIC UPLIFT.pptx
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
The Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptxThe Mariana Trench remarkable geological features on Earth.pptx
The Mariana Trench remarkable geological features on Earth.pptx
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
module for grade 9 for distance learning
module for grade 9 for distance learningmodule for grade 9 for distance learning
module for grade 9 for distance learning
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.Phenolics: types, biosynthesis and functions.
Phenolics: types, biosynthesis and functions.
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort ServiceCall Girls Ahmedabad +917728919243 call me Independent Escort Service
Call Girls Ahmedabad +917728919243 call me Independent Escort Service
 
Genetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditionsGenetics and epigenetics of ADHD and comorbid conditions
Genetics and epigenetics of ADHD and comorbid conditions
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
 
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS  ESCORT SERVICE In Bhiwan...
Bhiwandi Bhiwandi ❤CALL GIRL 7870993772 ❤CALL GIRLS ESCORT SERVICE In Bhiwan...
 
Genome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptxGenome sequencing,shotgun sequencing.pptx
Genome sequencing,shotgun sequencing.pptx
 
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune WaterworldsBiogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
Biogenic Sulfur Gases as Biosignatures on Temperate Sub-Neptune Waterworlds
 

Optimizing the Performance-Related Configurations of Object-Relational Mapping Frameworks Using a Multi-Objective Genetic Algorithm

  • 1. Optimizing the Performance-RelatedOptimizing the Performance-Related Configurations of ORM FrameworksConfigurations of ORM Frameworks Ravjot Singh, Cor-Paul Bezemer,Weiyi Shang,Ahmed E. Hassan Using a Multi-Objective Genetic AlgorithmUsing a Multi-Objective Genetic Algorithm
  • 3. 3 27% of customer issues are27% of customer issues are due to misconfigurationdue to misconfiguration
  • 4. 4 20% of misconfigurations cause20% of misconfigurations cause performance degradationsperformance degradations
  • 5. 5 A popular online store estimates a $1.6A popular online store estimates a $1.6 billion loss for a 1-second slowdownbillion loss for a 1-second slowdown
  • 6. 6 Databases are at the coreDatabases are at the core of many large systemsof many large systems
  • 7. 7 Software developers knowSoftware developers know how to think in objects...how to think in objects...
  • 8. 8 But have less experienceBut have less experience with databaseswith databases
  • 9. 9 Object-relational mappingObject-relational mapping (ORM) helps developers(ORM) helps developers CODE
  • 10. 10 Code without ORM isCode without ORM is tedioustedious public class Person { // ... public String getName(){ sql = “SELECT name FROM … WHERE …”; ResultSet rs = stmt.executeQuery(sql); while(rs.next()) return rs.getString(“name”); } }
  • 11. 11 Code with ORM is cleanCode with ORM is clean @Entity public class Person { @Id Integer getId() { ... } public String getName(){ return this.name; } }
  • 12. 12 Several popular ORMSeveral popular ORM frameworks existframeworks exist
  • 13. 13 ORM has many configurationORM has many configuration optionsoptions
  • 14. 14 ORM configuration is…ORM configuration is… guess what?guess what?
  • 15. 15 ORM configuration is…ORM configuration is… guess what? Difficult!guess what? Difficult!
  • 16. 16 The impact of one ORMThe impact of one ORM configuration optionconfiguration option hibernate.max_fetch_depth = {0|1|2|3|...}
  • 17. 17 The impact of one ORMThe impact of one ORM configuration optionconfiguration option hibernate.max_fetch_depth = {0|1|2|3|...} Optimal configuration depends on what you need!
  • 18. 18 Should we care about ORMShould we care about ORM performance configuration?performance configuration? Analyze 11 boolean configuration options hence 211 = 2048 configurations
  • 19. 19 We compare the 'default' withWe compare the 'default' with the optimal configurationthe optimal configuration Default configuration System Tests Run tests Default execution time
  • 20. 20 We compare the 'default' withWe compare the 'default' with the optimal configurationthe optimal configuration Default configuration System Tests Run tests Optimal configuration System Tests Default execution time Optimal execution time Run tests
  • 21. 21 We compare the 'default' withWe compare the 'default' with the optimal configurationthe optimal configuration Default configuration System Tests Run tests Optimal configuration System Tests Compare Default execution time Optimal execution time Run tests
  • 22. 22 Yes, we should care about ORMYes, we should care about ORM performance configuration!performance configuration! 89% 96% of the test cases are significantly slower using default!
  • 23. 23 How can we guide ORMHow can we guide ORM performance configuration?performance configuration?
  • 24. 24 Optimize ORM configurationOptimize ORM configuration by trial-and-errorby trial-and-error Randomly select configuration A
  • 25. 25 Optimize ORM configurationOptimize ORM configuration by trial-and-errorby trial-and-error Evaluate configuration A on some workload W Randomly select configuration A
  • 26. 26 Optimize ORM configurationOptimize ORM configuration by trial-and-errorby trial-and-error Evaluate configuration A on some workload W Compare execution time for configuration A with execution time for current best configuration Randomly select configuration A
  • 27. 27 Optimize ORM configurationOptimize ORM configuration by trial-and-errorby trial-and-error Evaluate configuration A on some workload W Compare execution time for configuration A with execution time for current best configuration Randomly select configuration A Use best configuration
  • 28. 28 Optimize ORM configurationOptimize ORM configuration by trial-and-errorby trial-and-error Evaluate configuration A on some workload W Compare execution time for configuration A with execution time for current best configuration Randomly select configuration A Use best configuration
  • 29. 29 An evolutionary/genetic algorithmAn evolutionary/genetic algorithm guides this trial-and-error processguides this trial-and-error process
  • 30. 30 Genetic algorithm conceptGenetic algorithm concept Optimize population based on one or more objectives We start from the 'default' configuration as supplied by the developer
  • 31. 31 Genetic algorithm conceptGenetic algorithm concept 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1+
  • 32. 32 Genetic algorithm conceptGenetic algorithm concept 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 +
  • 33. 33 Genetic algorithm conceptGenetic algorithm concept 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 0 1 0 1 +
  • 34. 34 Genetic algorithm conceptGenetic algorithm concept 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 Execution time = 50s Execution time = 60s Execution time = 30s
  • 35. 35 Genetic algorithm conceptGenetic algorithm concept 1 1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 0 0 0 1 0 1 Execution time = 50s Execution time = 60s Execution time = 30s
  • 36. 36 Optimizing ORMOptimizing ORM performance configurationperformance configuration Objectives: CPU Memory Execution time
  • 37. 37 Optimizing ORMOptimizing ORM performance configurationperformance configuration Objectives: CPU Memory Execution time Calculate Δ with default configuration
  • 38. 38 Evaluation of our approachEvaluation of our approach 1. Closeness of configurations found by our approach to the optimal configuration 2. Speed with which we can find sub- optimal configurations
  • 40. 40 Closeness of configurationsCloseness of configurations to the optimalto the optimal We rank all existing configurations based on dominance Configuration A dominates configuration B if: 1. B is not better than A for all objectives 2.A is better than B for at least one objective
  • 41. 41 Ranking of configurationsRanking of configurations Configuration CPU usage Memory usage Execution time Default 0 0 0 A +50% +50% 0 B -80% -20% 0 C 0 -80% -20%
  • 42. 42 Ranking of configurationsRanking of configurations Configuration CPU usage Memory usage Execution time Default 0 0 0 A +50% +50% 0 B -80% -20% 0 C 0 -80% -20% Rank 1: B and C Rank 2: default Rank 3:A
  • 43. 43 The genetic algorithm findsThe genetic algorithm finds configurations close to the best rankconfigurations close to the best rank BEST WORST
  • 44. 44 Speed with whichSpeed with which configurations are foundconfigurations are found Depends on: - Workload - Application - Data
  • 45. 45 The genetic algorithm findsThe genetic algorithm finds configurations fast (~5-20 minutes)configurations fast (~5-20 minutes)
  • 46. 46 Yes, we should care about ORMYes, we should care about ORM performance configuration!performance configuration! 89% 96% of the test cases are significantly slower using default!
  • 47. 47
  • 48. 48 How can we guide ORMHow can we guide ORM performance configuration?performance configuration?
  • 49. 49
  • 50. 50 The genetic algorithm findsThe genetic algorithm finds configurations close to the optimal rankconfigurations close to the optimal rank
  • 51. 51
  • 52. 52 The genetic algorithm findsThe genetic algorithm finds configurations fast (~5-20 minutes)configurations fast (~5-20 minutes)
  • 53. 53
  • 55. 55
  • 56. 56 Studied configuration optionsStudied configuration options order_updates jdbc.batch_size order_inserts connection.release_mode default_batch_fetch_size jdbc.batch_versioned_data max_fetch_depth id.new_generator_mappings jdbc.fetch_size bytecode.use_reflection_optimizer cache.use_second_level_cache
  • 57. 57 Yes, we should care about ORMYes, we should care about ORM performance configuration!performance configuration!