SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Towards	
  Detecting	
  
Performance	
  Anti-­‐Patterns	
  
Using	
  Classi8ication	
  Techniques	
  
Manjala	
  Peiris	
  and	
  James	
  H.	
  Hill	
  
1st	
  Interna4onal	
  Workshop	
  on	
  Machine	
  Learning	
  &	
  Informa4on	
  
Retrieval	
  for	
  SoBware	
  Evolu4on	
  
Nov	
  11,	
  2013,	
  Silicon	
  Valley,	
  California,	
  USA.	
  
	
  
Motivation:	
  Software	
  
Performance	
  Anti-­‐Patterns	
  
•  Common	
  design	
  choices	
  that	
  
have	
  nega4ve	
  consequences	
  
•  Solely	
  focus	
  on	
  performance	
  
of	
  the	
  system	
  
•  e.g.:	
  throughput,	
  response	
  
4me	
  

•  Suggests	
  solu4ons	
  and	
  
refactoring	
  
•  e.g.,	
  One	
  lane	
  bridge,	
  
Excessive	
  dynamic	
  alloca4ons,	
  
God	
  Class	
  
One	
  Lane	
  Bridge	
  (Smith	
  et	
  al.)	
  
Reasons	
  for	
  An+-­‐Pa.ern	
  
•  Lack	
  of	
  concurrency	
  
•  Limited	
  to	
  number	
  of	
  
resources	
  
•  Not	
  u4lizing	
  available	
  
resources	
  
Consequences	
  
•  Low	
  system	
  throughput	
  
•  High	
  latency	
  
•  High	
  response	
  4me	
  
	
  

One or few processes/
threads are allowed to
execute concurrently
Excessive	
  Dynamic	
  Allocations	
  
(Smith	
  et	
  al.)	
  
Reason for Anti-Pattern
•  Objects are created when
they are first accessed
and then destroyed when
no longer needed.
Consequences
•  The cost of dynamic
allocations
	
  
	
  
	
  

N-­‐	
  Number	
  of	
  Calls	
  
Sc	
  ,Sd-­‐	
  Costs	
  for	
  an	
  object	
  crea6on	
  and	
  dele6on	
  
	
  
Why	
  Automatic	
  Detection	
  of	
  	
  
Performance	
  Anti-­‐Patterns	
  
•  Difficult to manually analyze large amount of performance
data
•  Make sense of large amount of performance data rather
than just showing it to users
•  Provides intuitions to system designers where the
refactoring is required	
  
Current	
  Approaches	
  for	
  Anti-­‐
Pattern	
  detection	
  
Approach	
  based	
  on	
  so7ware	
  
design	
  ar+facts	
  
1.  Annotate	
  the	
  soBware	
  
design	
  
2.  Runs	
  simula4ons	
  and	
  
gather	
  performance	
  data	
  
3.  Apply	
  rules	
  
	
  
Approaches	
  based	
  on	
  run+me	
  
data	
  
•  Architecture	
  dependent	
  (e.g.:	
  
J2EE	
  an4-­‐paYerns)	
  
•  Requires	
  architecture	
  specific	
  
deployment	
  details	
  
Non-­‐intrusive	
  Performance	
  Anti-­‐
Pattern	
  Detector	
  (NiPAD)	
  
•  Collect	
  system	
  performance	
  metrics	
  
•  SoBware	
  execu4on	
  with	
  a	
  
performance	
  an4-­‐paYern	
  (Class	
  0)	
  
•  SoBware	
  execu4on	
  without	
  the	
  
performance	
  an4-­‐paYern	
  (Class	
  1)	
  
•  Normalize	
  the	
  data	
  
•  Train	
  a	
  classifier	
  
•  Naïve	
  Bayes,	
  Logis4c	
  Regression,	
  
FLD,	
  SVM	
  (Linear),	
  SVM	
  (RBF)	
  
•  Predict	
  for	
  new	
  performance	
  data	
  for	
  
which	
  the	
  class	
  label	
  is	
  unknown	
  
System	
  level	
  Metrics	
  
Metric

Descrip+on

CPU	
  Idle	
  Time

The	
  4me	
  CPU	
  is	
  idle	
  not	
  doing	
  any	
  work

CPU	
  User	
  Time

CPU	
  u4liza4on	
  for	
  user	
  applica4ons

CPU	
  System	
  Time CPU	
  u4liza4on	
  for	
  system	
  level	
  programs
Free	
  Memory

Total	
  free	
  memory	
  when	
  invoking	
  the	
  applica4on

Cached	
  Memory

Total	
  cached	
  memory	
  available	
  when	
  invoking	
  the	
  
applica4on

Total	
  Commits

Total	
  number	
  of	
  commits

•  Metrics	
  are	
  collected	
  every	
  1	
  second	
  epochs	
  
CPU	
  Times	
  with	
  One	
  Lane	
  
Bridge	
  
CPU	
  Times	
  without	
  One	
  Lane	
  
Bridge	
  
Experiments	
  with	
  Apache	
  Web	
  
Server	
  
•  Emula4ng	
  One	
  Lane	
  Bridge	
  An4-­‐PaYern	
  
•  Use	
  Apache	
  Benchmark	
  to	
  generate	
  a	
  load	
  
•  Server	
  configura4ons	
  
One	
  Lane	
  Bridge

Without	
  One	
  Lane	
  Bridge

300	
  concurrent	
  clients	
  sending	
  	
  
1	
  million	
  requests,	
  server	
  has	
  
150	
  threads

300	
  concurrent	
  clients	
  sending	
  1	
  
million	
  request,	
  server	
  has	
  300	
  
threads

200 records for training 400 records for testing
Classi8ication	
  Results	
  for	
  One	
  
Lane	
  Bridge	
  
One	
  Lane	
  Bridge	
  
1	
  
0.9	
  
0.8	
  

Accuracy	
  

0.7	
  
0.6	
  

Naïve	
  Bayes	
  

0.5	
  

Logis4c	
  Regression	
  

0.4	
  

FLD	
  

0.3	
  

SVM	
  (Linear)	
  

0.2	
  

SVM	
  (RBF)	
  

0.1	
  
0	
  
Naïve	
  Bayes	
  

Logis4c	
  
Regression	
  

FLD	
  
Classifier	
  

SVM	
  (Linear)	
  

SVM	
  (RBF)	
  
Classi8ication	
  Results	
  for	
  One	
  Lane	
  
Bridge	
  with	
  Noise	
  
One	
  Lane	
  Bridge	
  with	
  Noise	
  

0.8	
  
0.7	
  
0.6	
  

Naïve	
  Bayes	
  

0.5	
  

Logis4c	
  Regression	
  
0.4	
  
FLD	
  
0.3	
  

SVM	
  (Linear)	
  

0.2	
  

SVM	
  (RBF)	
  

0.1	
  
0	
  
Naïve	
  Bayes	
  

Logis4c	
  
Regression	
  

FLD	
  

SVM	
  (Linear)	
  

SVM	
  (RBF)	
  
Experiments	
  with	
  Apache	
  Web	
  
Server	
  
•  Emula4ng	
  Excessive	
  Dynamic	
  Alloca4on	
  an4-­‐paYern	
  
•  Server	
  configura4ons	
  
Excessive	
  Dynamic	
  
Alloca+ons

Without	
  Excessive	
  Dynamic	
  
Alloca+ons

•  300	
  concurrent	
  clients	
  
•  300	
  concurrent	
  clients	
  
sending	
  1	
  million	
  requests,	
  
sending	
  1	
  million	
  request,	
  
server	
  has	
  300	
  threads	
  
server	
  has	
  300	
  threads	
  
•  Memory	
  pool	
  size	
  of	
  1kb
•  Memory	
  pool	
  size	
  of	
  1Mb
200 records for training 400 records for testing
Classi8ication	
  Results	
  for	
  Excessive	
  
Dynamic	
  Allocations	
  
Excessive	
  Dynamic	
  Alloca+on	
  
0.7	
  
0.6	
  

Accuracy	
  

0.5	
  
Naïve	
  Bayes	
  

0.4	
  

Logis4c	
  Regression	
  

0.3	
  

FLD	
  

0.2	
  

SVM	
  (Linear)	
  

0.1	
  

SVM	
  (RBF)	
  

0	
  
Naïve	
  Bayes	
  

Logis4c	
  Regression	
  

FLD	
  

SVM	
  (Linear)	
  

SVM	
  (RBF)	
  

Classifier	
  

Reason for poor classification performance
•  Emery et al. shows custom memory allocation techniques
does not have much advantages
Cost	
  Analysis	
  for	
  One	
  Lane	
  
Bridge	
  
Classifier	
  

Sensi+vity	
  

Specificity	
  

Precision	
  

Accuracy	
  

Logis4c	
  

0.95	
  

0.62	
  

0.53	
  

0.76	
  

FLD	
  

0.95	
  

0.66	
  

0.56	
  

0.7	
  

Naïve	
  Bayes	
  

0.92	
  

0.28	
  

0.38	
  

0.5	
  

SVM	
  (Linear)	
  

0.98	
  

0.92	
  

0.84	
  

0.94	
  

SVM	
  (RBF)	
  

0.96	
  

0.7	
  

0.61	
  

0.75	
  

•  Posi4ve	
  class	
  is	
  the	
  one	
  which	
  does	
  not	
  have	
  the	
  An4-­‐paYern	
  
•  Predicts	
  these	
  situa4ons	
  more	
  accurately	
  

•  Cost	
  of	
  misclassifica4on	
  depends	
  on	
  the	
  nature	
  of	
  the	
  
soBware	
  and	
  soBware	
  development	
  cost	
  
•  This	
  technique	
  will	
  eliminate	
  unnecessary	
  soBware	
  tes4ng	
  
•  Not	
  good	
  for	
  real	
  4me	
  soBware	
  systems	
  	
  
Cost	
  Analysis	
  for	
  One	
  Lane	
  
Bridge	
  
Classifier	
  

Sensi+vity	
  

Specificity	
  

Precision	
  

Accuracy	
  

Logis4c	
  

0.95	
  

0.62	
  

0.53	
  

0.76	
  

FLD	
  

0.95	
  

0.66	
  

0.56	
  

0.7	
  

Naïve	
  Bayes	
  

0.92	
  

0.28	
  

0.38	
  

0.5	
  

SVM	
  (Linear)	
  

0.98	
  

0.92	
  

0.84	
  

0.94	
  

SVM	
  (RBF)	
  

0.96	
  

0.7	
  

0.61	
  

0.75	
  

•  Posi4ve	
  class	
  is	
  the	
  one	
  which	
  does	
  not	
  have	
  the	
  An4-­‐paYern	
  
•  Predicts	
  these	
  situa4ons	
  more	
  accurately	
  

•  Cost	
  of	
  misclassifica4on	
  depends	
  on	
  the	
  nature	
  of	
  the	
  
soBware	
  and	
  soBware	
  development	
  cost	
  
•  This	
  technique	
  will	
  eliminate	
  unnecessary	
  soBware	
  tes4ng	
  
•  Not	
  good	
  for	
  real	
  4me	
  soBware	
  systems	
  	
  
Concluding	
  Remarks	
  
Limita+ons	
  
•  System	
  level	
  performance	
  metrics	
  
may	
  not	
  show	
  enough	
  varia4ons	
  
•  e.g.,	
  Excessive	
  Dynamic	
  
Alloca4ons	
  
•  Bad	
  performance	
  may	
  be	
  for	
  some	
  
other	
  reasons	
  
•  e.g.,	
  Configura4on	
  errors,	
  bad	
  
user	
  inputs	
  
Future	
  work	
  
•  Currently	
  including	
  behavior	
  of	
  the	
  
soBware	
  applica4on	
  in	
  analysis	
  
•  Applying	
  this	
  technique	
  to	
  other	
  
soBware	
  applica4ons	
  
Questions	
  

Contenu connexe

Tendances

Salesforce Batch processing - Atlanta SFUG
Salesforce Batch processing - Atlanta SFUGSalesforce Batch processing - Atlanta SFUG
Salesforce Batch processing - Atlanta SFUG
vraopolisetti
 
“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”
IT Weekend
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
Ortus Solutions, Corp
 

Tendances (20)

Scala profiling
Scala profilingScala profiling
Scala profiling
 
Salesforce Batch processing - Atlanta SFUG
Salesforce Batch processing - Atlanta SFUGSalesforce Batch processing - Atlanta SFUG
Salesforce Batch processing - Atlanta SFUG
 
Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...
Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...
Building Large Scale Machine Learning Applications with Pipelines-(Evan Spark...
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
 
Scala in practice
Scala in practiceScala in practice
Scala in practice
 
Monitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance AnalysisMonitorama 2015 Netflix Instance Analysis
Monitorama 2015 Netflix Instance Analysis
 
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objectsBacking Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
Backing Data Silo Atack: Alfresco sharding, SOLR for non-flat objects
 
Deep dive into Apache Kafka consumption
Deep dive into Apache Kafka consumptionDeep dive into Apache Kafka consumption
Deep dive into Apache Kafka consumption
 
PHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLitePHP, the GraphQL ecosystem and GraphQLite
PHP, the GraphQL ecosystem and GraphQLite
 
Stream Processing Metamorphosis - A Kafka's tale
Stream Processing Metamorphosis - A Kafka's taleStream Processing Metamorphosis - A Kafka's tale
Stream Processing Metamorphosis - A Kafka's tale
 
Java Performance Tuning
Java Performance TuningJava Performance Tuning
Java Performance Tuning
 
“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”“Using C#/.NET – “Controversial Topics & Common Mistakes”
“Using C#/.NET – “Controversial Topics & Common Mistakes”
 
Operationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML ModelsOperationalizing Machine Learning: Serving ML Models
Operationalizing Machine Learning: Serving ML Models
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
Java 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala StoryJava 8 and Beyond, a Scala Story
Java 8 and Beyond, a Scala Story
 
Multi core programming 1
Multi core programming 1Multi core programming 1
Multi core programming 1
 
Preso-v0.1
Preso-v0.1Preso-v0.1
Preso-v0.1
 
Into The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applicationsInto The Box 2018 | Assert control over your legacy applications
Into The Box 2018 | Assert control over your legacy applications
 
Lock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin CoroutinesLock-free algorithms for Kotlin Coroutines
Lock-free algorithms for Kotlin Coroutines
 
Tips to improve your code review
Tips to improve your code reviewTips to improve your code review
Tips to improve your code review
 

En vedette

Dmitriy evdokimov. light and dark side of code instrumentation
Dmitriy evdokimov. light and dark side of code instrumentationDmitriy evdokimov. light and dark side of code instrumentation
Dmitriy evdokimov. light and dark side of code instrumentation
Yury Chemerkin
 

En vedette (9)

PAD: Performance Anomaly Detection in Multi-Server Distributed Systems
PAD: Performance Anomaly Detection in Multi-Server Distributed SystemsPAD: Performance Anomaly Detection in Multi-Server Distributed Systems
PAD: Performance Anomaly Detection in Multi-Server Distributed Systems
 
Developing Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software SystemsDeveloping Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software Systems
 
Using Pin++ to Author Highly Configurable Pintools for Pin
Using Pin++ to Author Highly Configurable Pintools for PinUsing Pin++ to Author Highly Configurable Pintools for Pin
Using Pin++ to Author Highly Configurable Pintools for Pin
 
"CLOUD INSTRUMENTATION", AN APPLICATION TO CLOUD COMPUTING
"CLOUD INSTRUMENTATION", AN APPLICATION TO CLOUD COMPUTING"CLOUD INSTRUMENTATION", AN APPLICATION TO CLOUD COMPUTING
"CLOUD INSTRUMENTATION", AN APPLICATION TO CLOUD COMPUTING
 
Instrumentation of Software Systems
Instrumentation of Software SystemsInstrumentation of Software Systems
Instrumentation of Software Systems
 
B+ trees
B+ treesB+ trees
B+ trees
 
Dmitriy evdokimov. light and dark side of code instrumentation
Dmitriy evdokimov. light and dark side of code instrumentationDmitriy evdokimov. light and dark side of code instrumentation
Dmitriy evdokimov. light and dark side of code instrumentation
 
How cloud computing enables Tradeshift to deliver continuous and global e-inv...
How cloud computing enables Tradeshift to deliver continuous and global e-inv...How cloud computing enables Tradeshift to deliver continuous and global e-inv...
How cloud computing enables Tradeshift to deliver continuous and global e-inv...
 
Analytics for large-scale time series and event data
Analytics for large-scale time series and event dataAnalytics for large-scale time series and event data
Analytics for large-scale time series and event data
 

Similaire à Towards Detecting Performance Anti-patterns Using Classification Techniques

Instrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of AbstractionInstrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of Abstraction
ESUG
 
Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)
DVClub
 
2012 S&P Paper Reading Session1
2012 S&P Paper Reading Session12012 S&P Paper Reading Session1
2012 S&P Paper Reading Session1
Chong-Kuan Chen
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
Abdul Manaf
 
Dealing with the Three Horrible Problems in Verification
Dealing with the Three Horrible Problems in VerificationDealing with the Three Horrible Problems in Verification
Dealing with the Three Horrible Problems in Verification
DVClub
 
Solr Black Belt Pre-conference
Solr Black Belt Pre-conferenceSolr Black Belt Pre-conference
Solr Black Belt Pre-conference
Erik Hatcher
 

Similaire à Towards Detecting Performance Anti-patterns Using Classification Techniques (20)

Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...Scaling ingest pipelines with high performance computing principles - Rajiv K...
Scaling ingest pipelines with high performance computing principles - Rajiv K...
 
Instrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of AbstractionInstrumentation & the Pitfalls of Abstraction
Instrumentation & the Pitfalls of Abstraction
 
Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)Finding Bugs Faster with Assertion Based Verification (ABV)
Finding Bugs Faster with Assertion Based Verification (ABV)
 
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...Demo  how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
Demo how to efficiently evaluate nf-vi performance by leveraging opnfv testi...
 
Lect 1.pptx
Lect 1.pptxLect 1.pptx
Lect 1.pptx
 
2012 S&P Paper Reading Session1
2012 S&P Paper Reading Session12012 S&P Paper Reading Session1
2012 S&P Paper Reading Session1
 
Maria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High AvailabilityMaria DB Galera Cluster for High Availability
Maria DB Galera Cluster for High Availability
 
MariaDB Galera Cluster
MariaDB Galera ClusterMariaDB Galera Cluster
MariaDB Galera Cluster
 
Luncheon 2015-01-15 - Managing Security Requirements in Software Projects by ...
Luncheon 2015-01-15 - Managing Security Requirements in Software Projects by ...Luncheon 2015-01-15 - Managing Security Requirements in Software Projects by ...
Luncheon 2015-01-15 - Managing Security Requirements in Software Projects by ...
 
AWS Meetup - Nordstrom Data Lab and the AWS Cloud
AWS Meetup - Nordstrom Data Lab and the AWS CloudAWS Meetup - Nordstrom Data Lab and the AWS Cloud
AWS Meetup - Nordstrom Data Lab and the AWS Cloud
 
Getting started with Riak in the Cloud
Getting started with Riak in the CloudGetting started with Riak in the Cloud
Getting started with Riak in the Cloud
 
Tale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache FlinkTale of two streaming frameworks- Apace Storm & Apache Flink
Tale of two streaming frameworks- Apace Storm & Apache Flink
 
Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)Tale of two streaming frameworks (Karthik D - Walmart)
Tale of two streaming frameworks (Karthik D - Walmart)
 
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in FirmwareUsing Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
Using Static Binary Analysis To Find Vulnerabilities And Backdoors in Firmware
 
Dealing with the Three Horrible Problems in Verification
Dealing with the Three Horrible Problems in VerificationDealing with the Three Horrible Problems in Verification
Dealing with the Three Horrible Problems in Verification
 
Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016Functional Tests. PHP Unconf 2016
Functional Tests. PHP Unconf 2016
 
Apache HAWQ and Apache MADlib: Journey to Apache
Apache HAWQ and Apache MADlib: Journey to ApacheApache HAWQ and Apache MADlib: Journey to Apache
Apache HAWQ and Apache MADlib: Journey to Apache
 
BTV PHP - Building Fast Websites
BTV PHP - Building Fast WebsitesBTV PHP - Building Fast Websites
BTV PHP - Building Fast Websites
 
Solr Black Belt Pre-conference
Solr Black Belt Pre-conferenceSolr Black Belt Pre-conference
Solr Black Belt Pre-conference
 
Apache Cloudstack QA Strategy
Apache Cloudstack QA StrategyApache Cloudstack QA Strategy
Apache Cloudstack QA Strategy
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

Towards Detecting Performance Anti-patterns Using Classification Techniques

  • 1. Towards  Detecting   Performance  Anti-­‐Patterns   Using  Classi8ication  Techniques   Manjala  Peiris  and  James  H.  Hill   1st  Interna4onal  Workshop  on  Machine  Learning  &  Informa4on   Retrieval  for  SoBware  Evolu4on   Nov  11,  2013,  Silicon  Valley,  California,  USA.    
  • 2. Motivation:  Software   Performance  Anti-­‐Patterns   •  Common  design  choices  that   have  nega4ve  consequences   •  Solely  focus  on  performance   of  the  system   •  e.g.:  throughput,  response   4me   •  Suggests  solu4ons  and   refactoring   •  e.g.,  One  lane  bridge,   Excessive  dynamic  alloca4ons,   God  Class  
  • 3. One  Lane  Bridge  (Smith  et  al.)   Reasons  for  An+-­‐Pa.ern   •  Lack  of  concurrency   •  Limited  to  number  of   resources   •  Not  u4lizing  available   resources   Consequences   •  Low  system  throughput   •  High  latency   •  High  response  4me     One or few processes/ threads are allowed to execute concurrently
  • 4. Excessive  Dynamic  Allocations   (Smith  et  al.)   Reason for Anti-Pattern •  Objects are created when they are first accessed and then destroyed when no longer needed. Consequences •  The cost of dynamic allocations       N-­‐  Number  of  Calls   Sc  ,Sd-­‐  Costs  for  an  object  crea6on  and  dele6on    
  • 5. Why  Automatic  Detection  of     Performance  Anti-­‐Patterns   •  Difficult to manually analyze large amount of performance data •  Make sense of large amount of performance data rather than just showing it to users •  Provides intuitions to system designers where the refactoring is required  
  • 6. Current  Approaches  for  Anti-­‐ Pattern  detection   Approach  based  on  so7ware   design  ar+facts   1.  Annotate  the  soBware   design   2.  Runs  simula4ons  and   gather  performance  data   3.  Apply  rules     Approaches  based  on  run+me   data   •  Architecture  dependent  (e.g.:   J2EE  an4-­‐paYerns)   •  Requires  architecture  specific   deployment  details  
  • 7. Non-­‐intrusive  Performance  Anti-­‐ Pattern  Detector  (NiPAD)   •  Collect  system  performance  metrics   •  SoBware  execu4on  with  a   performance  an4-­‐paYern  (Class  0)   •  SoBware  execu4on  without  the   performance  an4-­‐paYern  (Class  1)   •  Normalize  the  data   •  Train  a  classifier   •  Naïve  Bayes,  Logis4c  Regression,   FLD,  SVM  (Linear),  SVM  (RBF)   •  Predict  for  new  performance  data  for   which  the  class  label  is  unknown  
  • 8. System  level  Metrics   Metric Descrip+on CPU  Idle  Time The  4me  CPU  is  idle  not  doing  any  work CPU  User  Time CPU  u4liza4on  for  user  applica4ons CPU  System  Time CPU  u4liza4on  for  system  level  programs Free  Memory Total  free  memory  when  invoking  the  applica4on Cached  Memory Total  cached  memory  available  when  invoking  the   applica4on Total  Commits Total  number  of  commits •  Metrics  are  collected  every  1  second  epochs  
  • 9. CPU  Times  with  One  Lane   Bridge  
  • 10. CPU  Times  without  One  Lane   Bridge  
  • 11. Experiments  with  Apache  Web   Server   •  Emula4ng  One  Lane  Bridge  An4-­‐PaYern   •  Use  Apache  Benchmark  to  generate  a  load   •  Server  configura4ons   One  Lane  Bridge Without  One  Lane  Bridge 300  concurrent  clients  sending     1  million  requests,  server  has   150  threads 300  concurrent  clients  sending  1   million  request,  server  has  300   threads 200 records for training 400 records for testing
  • 12. Classi8ication  Results  for  One   Lane  Bridge   One  Lane  Bridge   1   0.9   0.8   Accuracy   0.7   0.6   Naïve  Bayes   0.5   Logis4c  Regression   0.4   FLD   0.3   SVM  (Linear)   0.2   SVM  (RBF)   0.1   0   Naïve  Bayes   Logis4c   Regression   FLD   Classifier   SVM  (Linear)   SVM  (RBF)  
  • 13. Classi8ication  Results  for  One  Lane   Bridge  with  Noise   One  Lane  Bridge  with  Noise   0.8   0.7   0.6   Naïve  Bayes   0.5   Logis4c  Regression   0.4   FLD   0.3   SVM  (Linear)   0.2   SVM  (RBF)   0.1   0   Naïve  Bayes   Logis4c   Regression   FLD   SVM  (Linear)   SVM  (RBF)  
  • 14. Experiments  with  Apache  Web   Server   •  Emula4ng  Excessive  Dynamic  Alloca4on  an4-­‐paYern   •  Server  configura4ons   Excessive  Dynamic   Alloca+ons Without  Excessive  Dynamic   Alloca+ons •  300  concurrent  clients   •  300  concurrent  clients   sending  1  million  requests,   sending  1  million  request,   server  has  300  threads   server  has  300  threads   •  Memory  pool  size  of  1kb •  Memory  pool  size  of  1Mb 200 records for training 400 records for testing
  • 15. Classi8ication  Results  for  Excessive   Dynamic  Allocations   Excessive  Dynamic  Alloca+on   0.7   0.6   Accuracy   0.5   Naïve  Bayes   0.4   Logis4c  Regression   0.3   FLD   0.2   SVM  (Linear)   0.1   SVM  (RBF)   0   Naïve  Bayes   Logis4c  Regression   FLD   SVM  (Linear)   SVM  (RBF)   Classifier   Reason for poor classification performance •  Emery et al. shows custom memory allocation techniques does not have much advantages
  • 16. Cost  Analysis  for  One  Lane   Bridge   Classifier   Sensi+vity   Specificity   Precision   Accuracy   Logis4c   0.95   0.62   0.53   0.76   FLD   0.95   0.66   0.56   0.7   Naïve  Bayes   0.92   0.28   0.38   0.5   SVM  (Linear)   0.98   0.92   0.84   0.94   SVM  (RBF)   0.96   0.7   0.61   0.75   •  Posi4ve  class  is  the  one  which  does  not  have  the  An4-­‐paYern   •  Predicts  these  situa4ons  more  accurately   •  Cost  of  misclassifica4on  depends  on  the  nature  of  the   soBware  and  soBware  development  cost   •  This  technique  will  eliminate  unnecessary  soBware  tes4ng   •  Not  good  for  real  4me  soBware  systems    
  • 17. Cost  Analysis  for  One  Lane   Bridge   Classifier   Sensi+vity   Specificity   Precision   Accuracy   Logis4c   0.95   0.62   0.53   0.76   FLD   0.95   0.66   0.56   0.7   Naïve  Bayes   0.92   0.28   0.38   0.5   SVM  (Linear)   0.98   0.92   0.84   0.94   SVM  (RBF)   0.96   0.7   0.61   0.75   •  Posi4ve  class  is  the  one  which  does  not  have  the  An4-­‐paYern   •  Predicts  these  situa4ons  more  accurately   •  Cost  of  misclassifica4on  depends  on  the  nature  of  the   soBware  and  soBware  development  cost   •  This  technique  will  eliminate  unnecessary  soBware  tes4ng   •  Not  good  for  real  4me  soBware  systems    
  • 18. Concluding  Remarks   Limita+ons   •  System  level  performance  metrics   may  not  show  enough  varia4ons   •  e.g.,  Excessive  Dynamic   Alloca4ons   •  Bad  performance  may  be  for  some   other  reasons   •  e.g.,  Configura4on  errors,  bad   user  inputs   Future  work   •  Currently  including  behavior  of  the   soBware  applica4on  in  analysis   •  Applying  this  technique  to  other   soBware  applica4ons