SlideShare una empresa de Scribd logo
1 de 28
Descargar para leer sin conexión
Threads and Concurrency
Identifying Performance Deviations in
Thread Pools
PRESENTED BY
158217G - PUSHPALANKA JAYAWARDHANA
158248C - SALIYA SAMARAWICKRAMA
Mark D. Syer, Bram Adams and Ahmed E. Hassan
Reference:
M. D. Syer, B. Adams, and A. E. Hassan,"Identifying performance deviations in thread pools," in Proceedings of the International Conference on Software Maintenance,
sep 2011, pp. 83-92
Line Up
 Objective
 Thread pools
 Performance deviations in thread pools
 Methodology
 Related work, results& limitations
 Hiding the thread complexity
 Summary
2
Objective
Introduce a methodology to identify threads with
performance deviations in thread pools.
Significance
 ULS systems vastly use thread pool pattern in high concurrent implementations
 Isolating the deviating threads need immense effort
source: http://farm3.static.flickr.com/2275/2153328067_2aeda0e4d2_m.jpg
3
Thread Pools
 What is a thread pools?
 Benefits of thread pools
 Thread creation/destroying overhead reduced
 Improved responsiveness
 Issues related to thread pools
 Idle threads
 Dead locks
 Thread leakages
 Get the suitable tuning
 No control over the state and priority of the thread
source: https://www10.informatik.uni-erlangen.de/~buildscript/pe/trunk/doc/html/threadpool.png
4
Performance Deviations in Thread
Pools
 Why is it hard to identify deviations?
 No detailed log entries
 Require thorough knowledge on system architecture
 Hard to detect concurrency issues
 Hard to track threads in the pool in isolation
 Lacking tool support
 Require heavy instrumentation
 Hard to interpret hardware sensor gathered data
source: http://connect.greenbeacon.com/wp-content/uploads/2014/12/tracker.jpg,
http://blog.infostruction.com/wp-content/uploads/2010/11/networksecurity.jpg
5
Method to Identify
 Iterative, top down approach
 Apply statistical analysis on resource usage logs
 Measure dissimilarity between resource usage
 Isolate the most deviating abstractions
source: http://static2.xlstat.com/images/content/home-slides-03.jpg.pagespeed.ce.vt3YFEFWQF.jpg
6
Method in Detail
► More resource usage metrics
► More accurate understanding on behavior
► Higher level abstractions
► Pooled threads in one machine
► Threads created in one hour slot
7
Method in Detail
Click to add text
►Why Co-variance matrix?
► Robust to noise in the performance data
► Factor out time
► compare load tests of deviating lengths
8
Co-variance measures
 A measure of how much two random variables change together
9
CPUMem
Co-variance Ctd.. 10
M C H
source: http://images.wisegeek.com/black-desktop-computer.jpg, http://stattrek.com/matrix-algebra/covariance-matrix.aspx
2
Forstner and Moonen Distance
Matrix
Method in Detail
Click to add text
► Merge the least distant abstraction to cluster
► Ward's method - least distance between cluster centroids after merge
► Stop when all in one cluster made
11
Method in Detail
Click to add text
12
Method in Detail
► Recursivelyimprove the dendrogram via an algorithm
► Stops when clusters are in good fit
► Isolate the deviations
13
Ranking Algorithm 14
Case Study - Background
 Qualitatively evaluate the deviated threads
 Calculate the precision & recall value
 Load test using synthetically injected deviations
 System
 ULA system in e-commerce domain
 Time duration 16 hours
15
Case Study
Resource Measured
CPU CPU time usage as %
Virtual Bytes Virtual address space usage
Private Bytes Private memory usage
Handles # of open file handles
MicroThread # allocated micro threads
16
 Sampled every 7 seconds
 Each has
 Thread ID
 Time
 Value of each resource usage
Case Study 17
 Thread pool contains 40 threads
 Each process one work item
 Each item completion time two hours
 Threads with identical life time grouped
 Group called a “Wave”
 Wave length 2 hours and 5 minutes
 Observe 8 Waves
 Using pvclust , hierarchical clustering done
 Ranking done as per slide
Results - Qualitative 18
Results of first wave Ranking of waves
Results - Qualitative 19
 T1W1 in solid line
 T1W8 in dotted line
 T1W5 in dashed line
Virtual memory allocation
Results - Qualitative 20
T1W1 in detail
Results – Quantitative 21
Results Summary & Limitations
 High precision
 Identify IO & memory leaks
 identify CPU spikes
This evaluated has been done using a single softwaresystem, so this results may differ for
other systems…
22
Summary
 Threads vs thread pools
 Benefits & risks related to thread pools
 Light weight statistical approach to detect risks
23
Thank You..!
24
Hiding Complexity
 Android handler
 AsyncTask
25
Optional
An Experience On Multithreading Using Android's Handler Class
26
Qualitative Evaluation
 Selecting the abstractions to visualize based on ranking
 Normalizing the time scale
 Under sampling the metrics by averaging every two minutes to
remove single-point anomalies and noise.
 Plotting the under sampled metrics.
 Plotting additional details, such as the average and standard
deviation, as needed. The
27
Results – Average of All Test 28

Más contenido relacionado

Similar a Threads and Concurrency Identifying Performance Deviations in Thread Pools

ECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comlechenau125
 
week_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxweek_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxmivomi1
 
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARN
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARNMLConf 2013: Metronome and Parallel Iterative Algorithms on YARN
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARNJosh Patterson
 
A TALE of DATA PATTERN DISCOVERY IN PARALLEL
A TALE of DATA PATTERN DISCOVERY IN PARALLELA TALE of DATA PATTERN DISCOVERY IN PARALLEL
A TALE of DATA PATTERN DISCOVERY IN PARALLELJenny Liu
 
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...Editor IJCATR
 
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2Aws Ali
 
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...CPqD
 
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0Mohsen Sadok
 
Automatic Analyzing System for Packet Testing and Fault Mapping
Automatic Analyzing System for Packet Testing and Fault MappingAutomatic Analyzing System for Packet Testing and Fault Mapping
Automatic Analyzing System for Packet Testing and Fault MappingIRJET Journal
 
Cloud data management
Cloud data managementCloud data management
Cloud data managementambitlick
 
Nobo green part_3_asm_mukter
Nobo green part_3_asm_mukterNobo green part_3_asm_mukter
Nobo green part_3_asm_mukterMukter Zaman
 
WSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.pptWSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.pptAbyThomas54
 
Agile performance engineering with cloud 2016
Agile performance engineering with cloud   2016Agile performance engineering with cloud   2016
Agile performance engineering with cloud 2016Ken Chan
 
Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Vincenzo Gulisano
 
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...chokrio
 

Similar a Threads and Concurrency Identifying Performance Deviations in Thread Pools (20)

ECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.comECET 375 Invent Yourself/newtonhelp.com
ECET 375 Invent Yourself/newtonhelp.com
 
week_2Lec02_CS422.pptx
week_2Lec02_CS422.pptxweek_2Lec02_CS422.pptx
week_2Lec02_CS422.pptx
 
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARN
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARNMLConf 2013: Metronome and Parallel Iterative Algorithms on YARN
MLConf 2013: Metronome and Parallel Iterative Algorithms on YARN
 
A TALE of DATA PATTERN DISCOVERY IN PARALLEL
A TALE of DATA PATTERN DISCOVERY IN PARALLELA TALE of DATA PATTERN DISCOVERY IN PARALLEL
A TALE of DATA PATTERN DISCOVERY IN PARALLEL
 
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...
A New Method for Reducing Energy Consumption in Wireless Sensor Networks usin...
 
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2
An alternative Routing Mechanisms for Mobile Ad-hoc NetworksPresentation2
 
shashank_spdp1993_00395543
shashank_spdp1993_00395543shashank_spdp1993_00395543
shashank_spdp1993_00395543
 
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...
The ACTION Project: Applications Coordinate with Transport, IP and Optical Ne...
 
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
A study of Machine Learning approach for Predictive Maintenance in Industry 4.0
 
Netsim experiment manual
Netsim experiment manualNetsim experiment manual
Netsim experiment manual
 
Cg34503507
Cg34503507Cg34503507
Cg34503507
 
Automatic Analyzing System for Packet Testing and Fault Mapping
Automatic Analyzing System for Packet Testing and Fault MappingAutomatic Analyzing System for Packet Testing and Fault Mapping
Automatic Analyzing System for Packet Testing and Fault Mapping
 
Simulation
SimulationSimulation
Simulation
 
Cloud data management
Cloud data managementCloud data management
Cloud data management
 
Nobo green part_3_asm_mukter
Nobo green part_3_asm_mukterNobo green part_3_asm_mukter
Nobo green part_3_asm_mukter
 
WSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.pptWSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.ppt
 
Agile performance engineering with cloud 2016
Agile performance engineering with cloud   2016Agile performance engineering with cloud   2016
Agile performance engineering with cloud 2016
 
Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)Crash course on data streaming (with examples using Apache Flink)
Crash course on data streaming (with examples using Apache Flink)
 
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...
Ameliorate Threshold Distributed Energy Efficient Clustering Algorithm for He...
 
Abraham q3 2008
Abraham q3 2008Abraham q3 2008
Abraham q3 2008
 

Más de Pushpalanka Jayawardhana

Authorization for workloads in a dynamically scaling heterogeneous system
Authorization for workloads in a  dynamically scaling heterogeneous systemAuthorization for workloads in a  dynamically scaling heterogeneous system
Authorization for workloads in a dynamically scaling heterogeneous systemPushpalanka Jayawardhana
 
The role of IAM in OpenBanking and where do we stand
The role of IAM in OpenBanking and where do we stand The role of IAM in OpenBanking and where do we stand
The role of IAM in OpenBanking and where do we stand Pushpalanka Jayawardhana
 
Identity mediation for enterprise identity bus
Identity mediation for enterprise identity busIdentity mediation for enterprise identity bus
Identity mediation for enterprise identity busPushpalanka Jayawardhana
 
Approximate Protocol for Privacy Preserving Associate Rule Mining
Approximate Protocol for Privacy Preserving Associate Rule MiningApproximate Protocol for Privacy Preserving Associate Rule Mining
Approximate Protocol for Privacy Preserving Associate Rule MiningPushpalanka Jayawardhana
 
Leveraging federation capabilities of identity server for api gateway
Leveraging federation capabilities  of identity server for api gatewayLeveraging federation capabilities  of identity server for api gateway
Leveraging federation capabilities of identity server for api gatewayPushpalanka Jayawardhana
 
Feedback queuing models for time shared systems
Feedback queuing models for time shared systemsFeedback queuing models for time shared systems
Feedback queuing models for time shared systemsPushpalanka Jayawardhana
 

Más de Pushpalanka Jayawardhana (11)

Authorization for workloads in a dynamically scaling heterogeneous system
Authorization for workloads in a  dynamically scaling heterogeneous systemAuthorization for workloads in a  dynamically scaling heterogeneous system
Authorization for workloads in a dynamically scaling heterogeneous system
 
The role of IAM in OpenBanking and where do we stand
The role of IAM in OpenBanking and where do we stand The role of IAM in OpenBanking and where do we stand
The role of IAM in OpenBanking and where do we stand
 
Frictionless Adaption of PSD2 with WSO2
Frictionless Adaption of PSD2 with WSO2Frictionless Adaption of PSD2 with WSO2
Frictionless Adaption of PSD2 with WSO2
 
Identity mediation for enterprise identity bus
Identity mediation for enterprise identity busIdentity mediation for enterprise identity bus
Identity mediation for enterprise identity bus
 
Approximate Protocol for Privacy Preserving Associate Rule Mining
Approximate Protocol for Privacy Preserving Associate Rule MiningApproximate Protocol for Privacy Preserving Associate Rule Mining
Approximate Protocol for Privacy Preserving Associate Rule Mining
 
Leveraging federation capabilities of identity server for api gateway
Leveraging federation capabilities  of identity server for api gatewayLeveraging federation capabilities  of identity server for api gateway
Leveraging federation capabilities of identity server for api gateway
 
Feedback queuing models for time shared systems
Feedback queuing models for time shared systemsFeedback queuing models for time shared systems
Feedback queuing models for time shared systems
 
Big Data CDR Analyzer - Kanthaka
Big Data CDR Analyzer - KanthakaBig Data CDR Analyzer - Kanthaka
Big Data CDR Analyzer - Kanthaka
 
Kanthaka - High Volume CDR Analyzer
Kanthaka - High Volume CDR AnalyzerKanthaka - High Volume CDR Analyzer
Kanthaka - High Volume CDR Analyzer
 
Experience at WSO2 as an Intern
Experience at WSO2 as an InternExperience at WSO2 as an Intern
Experience at WSO2 as an Intern
 
Cosmology in general
Cosmology in generalCosmology in general
Cosmology in general
 

Último

JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIIvo Andreev
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Neo4j
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeNeo4j
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesShyamsundar Das
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024Mind IT Systems
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Jaydeep Chhasatia
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfBrain Inventory
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?AmeliaSmith90
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxAutus Cyber Tech
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesSoftwareMill
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Projectwajrcs
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...OnePlan Solutions
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorShane Coughlan
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기Chiwon Song
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyRaymond Okyere-Forson
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionsNirav Modi
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntelliSource Technologies
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9Jürgen Gutsch
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampVICTOR MAESTRE RAMIREZ
 

Último (20)

JS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AIJS-Experts - Cybersecurity for Generative AI
JS-Experts - Cybersecurity for Generative AI
 
Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!Webinar - IA generativa e grafi Neo4j: RAG time!
Webinar - IA generativa e grafi Neo4j: RAG time!
 
IA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG timeIA Generativa y Grafos de Neo4j: RAG time
IA Generativa y Grafos de Neo4j: RAG time
 
Watermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security ChallengesWatermarking in Source Code: Applications and Security Challenges
Watermarking in Source Code: Applications and Security Challenges
 
Top Software Development Trends in 2024
Top Software Development Trends in  2024Top Software Development Trends in  2024
Top Software Development Trends in 2024
 
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
Optimizing Business Potential: A Guide to Outsourcing Engineering Services in...
 
Kawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in TrivandrumKawika Technologies pvt ltd Software Development Company in Trivandrum
Kawika Technologies pvt ltd Software Development Company in Trivandrum
 
Why Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdfWhy Choose Brain Inventory For Ecommerce Development.pdf
Why Choose Brain Inventory For Ecommerce Development.pdf
 
How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?How Does the Epitome of Spyware Differ from Other Malicious Software?
How Does the Epitome of Spyware Differ from Other Malicious Software?
 
ERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptxERP For Electrical and Electronics manufecturing.pptx
ERP For Electrical and Electronics manufecturing.pptx
 
Growing Oxen: channel operators and retries
Growing Oxen: channel operators and retriesGrowing Oxen: channel operators and retries
Growing Oxen: channel operators and retries
 
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example ProjectMastering Kubernetes - Basics and Advanced Concepts using Example Project
Mastering Kubernetes - Basics and Advanced Concepts using Example Project
 
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
Transforming PMO Success with AI - Discover OnePlan Strategic Portfolio Work ...
 
OpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS CalculatorOpenChain Webinar: Universal CVSS Calculator
OpenChain Webinar: Universal CVSS Calculator
 
20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기20240330_고급진 코드를 위한 exception 다루기
20240330_고급진 코드를 위한 exception 다루기
 
AI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human BeautyAI Embracing Every Shade of Human Beauty
AI Embracing Every Shade of Human Beauty
 
eAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspectionseAuditor Audits & Inspections - conduct field inspections
eAuditor Audits & Inspections - conduct field inspections
 
Introduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptxIntroduction-to-Software-Development-Outsourcing.pptx
Introduction-to-Software-Development-Outsourcing.pptx
 
About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9About .NET 8 and a first glimpse into .NET9
About .NET 8 and a first glimpse into .NET9
 
Deep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - DatacampDeep Learning for Images with PyTorch - Datacamp
Deep Learning for Images with PyTorch - Datacamp
 

Threads and Concurrency Identifying Performance Deviations in Thread Pools

  • 1. Threads and Concurrency Identifying Performance Deviations in Thread Pools PRESENTED BY 158217G - PUSHPALANKA JAYAWARDHANA 158248C - SALIYA SAMARAWICKRAMA Mark D. Syer, Bram Adams and Ahmed E. Hassan Reference: M. D. Syer, B. Adams, and A. E. Hassan,"Identifying performance deviations in thread pools," in Proceedings of the International Conference on Software Maintenance, sep 2011, pp. 83-92
  • 2. Line Up  Objective  Thread pools  Performance deviations in thread pools  Methodology  Related work, results& limitations  Hiding the thread complexity  Summary 2
  • 3. Objective Introduce a methodology to identify threads with performance deviations in thread pools. Significance  ULS systems vastly use thread pool pattern in high concurrent implementations  Isolating the deviating threads need immense effort source: http://farm3.static.flickr.com/2275/2153328067_2aeda0e4d2_m.jpg 3
  • 4. Thread Pools  What is a thread pools?  Benefits of thread pools  Thread creation/destroying overhead reduced  Improved responsiveness  Issues related to thread pools  Idle threads  Dead locks  Thread leakages  Get the suitable tuning  No control over the state and priority of the thread source: https://www10.informatik.uni-erlangen.de/~buildscript/pe/trunk/doc/html/threadpool.png 4
  • 5. Performance Deviations in Thread Pools  Why is it hard to identify deviations?  No detailed log entries  Require thorough knowledge on system architecture  Hard to detect concurrency issues  Hard to track threads in the pool in isolation  Lacking tool support  Require heavy instrumentation  Hard to interpret hardware sensor gathered data source: http://connect.greenbeacon.com/wp-content/uploads/2014/12/tracker.jpg, http://blog.infostruction.com/wp-content/uploads/2010/11/networksecurity.jpg 5
  • 6. Method to Identify  Iterative, top down approach  Apply statistical analysis on resource usage logs  Measure dissimilarity between resource usage  Isolate the most deviating abstractions source: http://static2.xlstat.com/images/content/home-slides-03.jpg.pagespeed.ce.vt3YFEFWQF.jpg 6
  • 7. Method in Detail ► More resource usage metrics ► More accurate understanding on behavior ► Higher level abstractions ► Pooled threads in one machine ► Threads created in one hour slot 7
  • 8. Method in Detail Click to add text ►Why Co-variance matrix? ► Robust to noise in the performance data ► Factor out time ► compare load tests of deviating lengths 8
  • 9. Co-variance measures  A measure of how much two random variables change together 9 CPUMem
  • 10. Co-variance Ctd.. 10 M C H source: http://images.wisegeek.com/black-desktop-computer.jpg, http://stattrek.com/matrix-algebra/covariance-matrix.aspx 2 Forstner and Moonen Distance Matrix
  • 11. Method in Detail Click to add text ► Merge the least distant abstraction to cluster ► Ward's method - least distance between cluster centroids after merge ► Stop when all in one cluster made 11
  • 12. Method in Detail Click to add text 12
  • 13. Method in Detail ► Recursivelyimprove the dendrogram via an algorithm ► Stops when clusters are in good fit ► Isolate the deviations 13
  • 15. Case Study - Background  Qualitatively evaluate the deviated threads  Calculate the precision & recall value  Load test using synthetically injected deviations  System  ULA system in e-commerce domain  Time duration 16 hours 15
  • 16. Case Study Resource Measured CPU CPU time usage as % Virtual Bytes Virtual address space usage Private Bytes Private memory usage Handles # of open file handles MicroThread # allocated micro threads 16  Sampled every 7 seconds  Each has  Thread ID  Time  Value of each resource usage
  • 17. Case Study 17  Thread pool contains 40 threads  Each process one work item  Each item completion time two hours  Threads with identical life time grouped  Group called a “Wave”  Wave length 2 hours and 5 minutes  Observe 8 Waves  Using pvclust , hierarchical clustering done  Ranking done as per slide
  • 18. Results - Qualitative 18 Results of first wave Ranking of waves
  • 19. Results - Qualitative 19  T1W1 in solid line  T1W8 in dotted line  T1W5 in dashed line Virtual memory allocation
  • 20. Results - Qualitative 20 T1W1 in detail
  • 22. Results Summary & Limitations  High precision  Identify IO & memory leaks  identify CPU spikes This evaluated has been done using a single softwaresystem, so this results may differ for other systems… 22
  • 23. Summary  Threads vs thread pools  Benefits & risks related to thread pools  Light weight statistical approach to detect risks 23
  • 25. Hiding Complexity  Android handler  AsyncTask 25
  • 26. Optional An Experience On Multithreading Using Android's Handler Class 26
  • 27. Qualitative Evaluation  Selecting the abstractions to visualize based on ranking  Normalizing the time scale  Under sampling the metrics by averaging every two minutes to remove single-point anomalies and noise.  Plotting the under sampled metrics.  Plotting additional details, such as the average and standard deviation, as needed. The 27
  • 28. Results – Average of All Test 28