SlideShare a Scribd company logo
1 of 51
Download to read offline
Avoiding software fails
Few metrics to improve application reliability
slawomir.michalik@omnilogy.pl
Poznań, 2017/01/31
2 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #Dynatrace
What to do with the fastest car …
3 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #Dynatrace
… if it fails to reach the finish line
In 2005, only 2% of performance
incidents had been predicted
Source: Gartner
What % of problems were predicted in 2015?
A. 75%
B. 46%
C. 11%
D. 3%
E. None of the above
What % of problems were predicted in 2015?
A. 75%
B. 46%
C. 11%
D. 3%
E. None of the above
Why do software projects fail so often?
http://spectrum.ieee.org/computing/software/why-software-fails
Unrealistic or unarticulated project goals
Inaccurate estimates of needed resources
Badly defined system requirements
Poor reporting of the project's statusUnmanaged risks
Poor communication among customers,
developers, and users
Commercial pressures Stakeholder politics
Poor project management
Sloppy development practices
Inability to handle the project's complexity
Use of immature technology
Performance issues increase costs
63% of IT organizations spend 20%+ of the time working
on performance issues
Inability to Innovate
40% of Developers’ time is wasted in triage, stealing a focus
from activities that innovates
The good thing is
80:20
Lets start on the frontend
80/20 rule from Steve
But then we’d focus on the backend
5 Use cases
&
metrics that really pay off…
#1
Pushing without a Plan
Web Site: this shoudn’t happen
Some Ad Company during American Super-Bowl
Total size ~ 20MB
434 Resources in on that page
Web Site: this could be easily eliminated
Obama Care
16 individual
jQuery
-related files that
should be
merged
Most JavaScript files
contains Dev
documentation,
which makes up to
80% of the file size
Web Site: this shoudn’t happen
Fifa.com doring Woldcup
Favicon
the Largest element
Some heavy CSS & JS +150kb
• Developers not using the browser built-in diagnostics tools
• Testers not doing a sanity checks with the same tools
• Some tools for you
• Built-in Inspectors via Ctrl-Shift-I in Chrome and Firefox
• YSlow, PageSpeed
• Dynatrace Ajax Edition
• Level-Up: Automate Testing & Diagnostics Check
Lessons Learnt – NO Excuses for …
# Resources
# of Domains
Usage of CDNs
Page Load & Size
#2
Not every Architect makes
good decisions
• Symptoms
• HTML takes 60-120s to render
• High GC Time
• Developer Assumptions
• Bad GC Tuning
• Probably bad DB performance as rendering was simple
• Resulted in: months of finger-pointing between Dev & DBA
Project: Online Room Reservation System
Developers-built monitoring
void roomreservationReport(int officeId)
{
long startTime = System.currentTimeMillis();
Object data = loadDataForOffice(officeId);
long dataLoadTime = System.currentTimeMillis() - startTime;
generateReport(data, officeId);
}
Result:
Avg. Data Load Time: 41s!
DB Tool says:
Avg. SQL Query: <1ms!
#1: Loading too much data
24889! Calls to the DB API
High CPU & High Memory Usage
to keep all data in Memory
#2: On individual connections 12444!
individual connections
Individual SQL
really fast <1ms
Classical N+1 Query Problem
#3: Putting all data in temp Hashtable
Lots of time spent in
Hashtable.get
Called from their
Entity Objects
• …You know what code is doing
• Challenge the developers
• Don’t use Hashtabels as workaround, use O/R mappers
• Explore Tools that “might seem” out of your league!
• Built-In Database Analysis Tools
• “Logging” options of Frameworks such as Hibernate, …
• JMX, Perf Counters, … of your Application Servers
• APM (Performance Tracing) Tools: Dynatrace Personal Ed.,…
Lessons Learned – Don’t Assume …
# SQL Executions
# of Same SQLs
Conn. Acquisition Time
Root Cause: Deployment Considerations
Log Service provides a Synchronized File
across all JVMs
1M Log exceptions
over 30 min
Production Deployment leads to Log SYNC Issues
Log message Time
In Sync
Two calls comming from
Customr coded methods
Time Spent in Sync & Logging
# of Log Messages
# of Exceptions
#3
Deployment Gone Bad
Test Environment
Production Environment
8x slower
3x more SQL
Test Environment Production Environment
That’s Normal:
Having I/O for Web
Request as main
contributor
Hibernate,
Classloading, XML – The
Key Hotspots
I/O for Web Requests
doesn’t even show up!
These calls all originate
form thousands of calls to
find item by code
Top Contributor
Class.getInterfaces
Called from Hibernates
FieldInterceptionHelper
Top Methods related to
XML Processing
Classloading is triggered through
CustomMonkey and the Xalan Parser
• Plan enough time for proper testing
• Anticipate changed user behavior during peak load
• Only test what really ends up in Production
Lessons Learned
Time Spent in API
# Calls to API
#4
Incorrect Sizing of Pools and
Queues
Online Banking: Slow Balance Check
101s! To Check Balance!
600! SQL Executions87% spent in IIS
#1 Time really spent in IIS?
Tip:
Elapsed Time tells us WHEN a
Method was executed!
Tip:
Thread# gives us insight on
Thread Queues / Switches
Finding:
Thread 32 in IIS waited 87s to pass
control to Thread 30 in ASP.NET
#2 What about these SQL Executions?
Finding:
EVERY SQL statement is
executed on ITS OWN
Connection!
Tip:
Look at “GetConnection”
#2 SQL Executions! continued …
#1: Same SQL is
executed 67! times
#2: NO PREPARATION
because everything
executed on new
Connection
Lessons Learned!
ASP.NET Worker
Thread Pool Sizing!
DB Connection Pools
More Efficient SQL
Idle vs. Busy Threads
# SQLs / Request
# GetConnection
%CPU Starvation
#5
Do know what you Test
23s for One click
22s
$3-5M worth
Data grid
New Generation CRM: Angular.js / Coherence
New Generation CRM: Angular.js / Coherence
7s
for filter execution
Filter Value
Talk to Architects, and
Trace argument’s values 4 performance sensitive methods
# of unique invocations
Response Time
# Images
# Redirects
# and Size of Resources
# SQL Executions
# of SAME SQLs
# Items per Page
# AJAX per Page
Remember: New Metrics When Testing Apps
Time Spent in API
# Calls into API
# Functional Errors
# 3rd Party calls
# of Domains
Total Size
Resource (W3C) Timings: PLT,
DOM Processing/Ready, Page
Interactive
Online Performance Clinics
Every week @
bit.ly/onlineperfclinic
bit.ly/dttrial
Putting it into a Test Automation
12 0 120ms
3 1 68ms
Build 20 testPurchase OK
testSearch OK
Build 17 testPurchase OK
testSearch OK
Build 18 testPurchase FAILED
testSearch OK
Build 19 testPurchase OK
testSearch OK
Build # Test Case Status # SQL # Excep CPU
12 0 120ms
3 1 68ms
12 5 60ms
3 1 68ms
75 0 230ms
3 1 68ms
Test Framework Results Architectural Data
We identified a regression
Problem solved
Exceptions probably reason for failed
tests
Problem fixed but now we have an architectural
regression
Problem fixed but now we have an architectural
regression
Now we have the functional and architectural confidence
Let’s look behind the scenes

More Related Content

What's hot

BlueHat v18 || Improving security posture through increased agility with meas...
BlueHat v18 || Improving security posture through increased agility with meas...BlueHat v18 || Improving security posture through increased agility with meas...
BlueHat v18 || Improving security posture through increased agility with meas...
BlueHat Security Conference
 
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
SAIL_QU
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Denim Group
 

What's hot (19)

Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database Objects
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
BlueHat v18 || Improving security posture through increased agility with meas...
BlueHat v18 || Improving security posture through increased agility with meas...BlueHat v18 || Improving security posture through increased agility with meas...
BlueHat v18 || Improving security posture through increased agility with meas...
 
Static code analysis
Static code analysisStatic code analysis
Static code analysis
 
WSO2 IoTS Device Manufacturer Guide
WSO2 IoTS Device Manufacturer GuideWSO2 IoTS Device Manufacturer Guide
WSO2 IoTS Device Manufacturer Guide
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly DavidoffDevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
DevSecCon Tel Aviv 2018 - End2End containers SSDLC by Vitaly Davidoff
 
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech FestStatic Analysis Techniques For Testing Application Security - Houston Tech Fest
Static Analysis Techniques For Testing Application Security - Houston Tech Fest
 
Flight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An OverviewFlight East 2018 Presentation–Continuous Integration––An Overview
Flight East 2018 Presentation–Continuous Integration––An Overview
 
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
Empircal Studies of Performance Bugs & Performance Analysis Approaches for La...
 
Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT world
 
Issue Tracking
Issue TrackingIssue Tracking
Issue Tracking
 
Filling your AppSec Toolbox - Which Tools, When to Use Them, and Why
Filling your AppSec Toolbox - Which Tools, When to Use Them, and WhyFilling your AppSec Toolbox - Which Tools, When to Use Them, and Why
Filling your AppSec Toolbox - Which Tools, When to Use Them, and Why
 
Agile & Secure SDLC
Agile & Secure SDLCAgile & Secure SDLC
Agile & Secure SDLC
 
Windows 7 – Application Compatibility Toolkit 5.5 Overview
Windows 7 – Application Compatibility Toolkit 5.5 OverviewWindows 7 – Application Compatibility Toolkit 5.5 Overview
Windows 7 – Application Compatibility Toolkit 5.5 Overview
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Code Decay
Code DecayCode Decay
Code Decay
 
Security As A Code :
Security As A Code : Security As A Code :
Security As A Code :
 

Viewers also liked (17)

Aprendizaje autónomo y aprendizaje significativo isidro mateos rodriguez
Aprendizaje autónomo y aprendizaje significativo isidro mateos rodriguezAprendizaje autónomo y aprendizaje significativo isidro mateos rodriguez
Aprendizaje autónomo y aprendizaje significativo isidro mateos rodriguez
 
Electronica
ElectronicaElectronica
Electronica
 
Presentación AO2 OP -Ayotzinapa
Presentación AO2 OP -AyotzinapaPresentación AO2 OP -Ayotzinapa
Presentación AO2 OP -Ayotzinapa
 
Tipos de investigación
Tipos de investigaciónTipos de investigación
Tipos de investigación
 
Juego de informatica
Juego de informaticaJuego de informatica
Juego de informatica
 
Big Data
Big DataBig Data
Big Data
 
INTRODUCCIÓN A LA COMPUTACIÓN EN LA NUBE (CLOUD COMPUTING)
INTRODUCCIÓN A LACOMPUTACIÓN EN LA NUBE(CLOUD COMPUTING)INTRODUCCIÓN A LACOMPUTACIÓN EN LA NUBE(CLOUD COMPUTING)
INTRODUCCIÓN A LA COMPUTACIÓN EN LA NUBE (CLOUD COMPUTING)
 
CIUDADANIA LOS DERECHOS HUMANOS
CIUDADANIA LOS DERECHOS HUMANOSCIUDADANIA LOS DERECHOS HUMANOS
CIUDADANIA LOS DERECHOS HUMANOS
 
Lady gaga
Lady gagaLady gaga
Lady gaga
 
Trabajo de diagnostico
Trabajo de diagnosticoTrabajo de diagnostico
Trabajo de diagnostico
 
Dieta e imagen
Dieta e imagenDieta e imagen
Dieta e imagen
 
Aaj ka trend 07.02.17
Aaj ka trend 07.02.17Aaj ka trend 07.02.17
Aaj ka trend 07.02.17
 
Organizacion
OrganizacionOrganizacion
Organizacion
 
Dieta e imagen
Dieta e imagenDieta e imagen
Dieta e imagen
 
Nube
NubeNube
Nube
 
ACCOUNTANT - RIMAZ - CV
ACCOUNTANT - RIMAZ - CVACCOUNTANT - RIMAZ - CV
ACCOUNTANT - RIMAZ - CV
 
Ntc 3356 morteros premezclados para mamposteria
Ntc 3356 morteros premezclados para mamposteriaNtc 3356 morteros premezclados para mamposteria
Ntc 3356 morteros premezclados para mamposteria
 

Similar to JUG Poznan - 2017.01.31

London web perfug_performancefocused_devops_feb2014
London web perfug_performancefocused_devops_feb2014London web perfug_performancefocused_devops_feb2014
London web perfug_performancefocused_devops_feb2014
Andreas Grabner
 

Similar to JUG Poznan - 2017.01.31 (20)

JavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep DiveJavaOne 2015: Top Performance Patterns Deep Dive
JavaOne 2015: Top Performance Patterns Deep Dive
 
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and ScalabiltyDocker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
Docker/DevOps Meetup: Metrics-Driven Continuous Performance and Scalabilty
 
DevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More DefectsDevOps: Find Solutions, Not More Defects
DevOps: Find Solutions, Not More Defects
 
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
BTD2015 - Your Place In DevTOps is Finding Solutions - Not Just Bugs!
 
Top Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your PipelineTop Java Performance Problems and Metrics To Check in Your Pipeline
Top Java Performance Problems and Metrics To Check in Your Pipeline
 
Ship code like a keptn
Ship code like a keptnShip code like a keptn
Ship code like a keptn
 
Industry Keynote at Large Scale Testing Workshop 2015
Industry Keynote at Large Scale Testing Workshop 2015Industry Keynote at Large Scale Testing Workshop 2015
Industry Keynote at Large Scale Testing Workshop 2015
 
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
ATAGTR2017 Unified APM: The new age performance monitoring for production sys...
 
Starting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for OpsStarting Your DevOps Journey – Practical Tips for Ops
Starting Your DevOps Journey – Practical Tips for Ops
 
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
STP 2014 - Lets Learn from the Top Performance Mistakes in 2013
 
London web perfug_performancefocused_devops_feb2014
London web perfug_performancefocused_devops_feb2014London web perfug_performancefocused_devops_feb2014
London web perfug_performancefocused_devops_feb2014
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
Software Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and SecuritySoftware Analytics: Data Analytics for Software Engineering and Security
Software Analytics: Data Analytics for Software Engineering and Security
 
3-18-11
3-18-113-18-11
3-18-11
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
Beyond The MVC
Beyond The MVCBeyond The MVC
Beyond The MVC
 
The Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web ServiceThe Evolution of a Scrappy Startup to a Successful Web Service
The Evolution of a Scrappy Startup to a Successful Web Service
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Recently uploaded (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

JUG Poznan - 2017.01.31

  • 1. Avoiding software fails Few metrics to improve application reliability slawomir.michalik@omnilogy.pl Poznań, 2017/01/31
  • 2. 2 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #Dynatrace What to do with the fastest car …
  • 3. 3 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #Dynatrace … if it fails to reach the finish line
  • 4. In 2005, only 2% of performance incidents had been predicted Source: Gartner
  • 5. What % of problems were predicted in 2015? A. 75% B. 46% C. 11% D. 3% E. None of the above
  • 6. What % of problems were predicted in 2015? A. 75% B. 46% C. 11% D. 3% E. None of the above
  • 7. Why do software projects fail so often? http://spectrum.ieee.org/computing/software/why-software-fails Unrealistic or unarticulated project goals Inaccurate estimates of needed resources Badly defined system requirements Poor reporting of the project's statusUnmanaged risks Poor communication among customers, developers, and users Commercial pressures Stakeholder politics Poor project management Sloppy development practices Inability to handle the project's complexity Use of immature technology
  • 8. Performance issues increase costs 63% of IT organizations spend 20%+ of the time working on performance issues Inability to Innovate 40% of Developers’ time is wasted in triage, stealing a focus from activities that innovates
  • 9. The good thing is 80:20
  • 10. Lets start on the frontend 80/20 rule from Steve
  • 11. But then we’d focus on the backend
  • 12. 5 Use cases & metrics that really pay off…
  • 14. Web Site: this shoudn’t happen Some Ad Company during American Super-Bowl Total size ~ 20MB 434 Resources in on that page
  • 15. Web Site: this could be easily eliminated Obama Care 16 individual jQuery -related files that should be merged Most JavaScript files contains Dev documentation, which makes up to 80% of the file size
  • 16. Web Site: this shoudn’t happen Fifa.com doring Woldcup Favicon the Largest element Some heavy CSS & JS +150kb
  • 17. • Developers not using the browser built-in diagnostics tools • Testers not doing a sanity checks with the same tools • Some tools for you • Built-in Inspectors via Ctrl-Shift-I in Chrome and Firefox • YSlow, PageSpeed • Dynatrace Ajax Edition • Level-Up: Automate Testing & Diagnostics Check Lessons Learnt – NO Excuses for …
  • 18. # Resources # of Domains Usage of CDNs Page Load & Size
  • 19. #2 Not every Architect makes good decisions
  • 20. • Symptoms • HTML takes 60-120s to render • High GC Time • Developer Assumptions • Bad GC Tuning • Probably bad DB performance as rendering was simple • Resulted in: months of finger-pointing between Dev & DBA Project: Online Room Reservation System
  • 21. Developers-built monitoring void roomreservationReport(int officeId) { long startTime = System.currentTimeMillis(); Object data = loadDataForOffice(officeId); long dataLoadTime = System.currentTimeMillis() - startTime; generateReport(data, officeId); } Result: Avg. Data Load Time: 41s! DB Tool says: Avg. SQL Query: <1ms!
  • 22.
  • 23. #1: Loading too much data 24889! Calls to the DB API High CPU & High Memory Usage to keep all data in Memory
  • 24. #2: On individual connections 12444! individual connections Individual SQL really fast <1ms Classical N+1 Query Problem
  • 25. #3: Putting all data in temp Hashtable Lots of time spent in Hashtable.get Called from their Entity Objects
  • 26. • …You know what code is doing • Challenge the developers • Don’t use Hashtabels as workaround, use O/R mappers • Explore Tools that “might seem” out of your league! • Built-In Database Analysis Tools • “Logging” options of Frameworks such as Hibernate, … • JMX, Perf Counters, … of your Application Servers • APM (Performance Tracing) Tools: Dynatrace Personal Ed.,… Lessons Learned – Don’t Assume …
  • 27. # SQL Executions # of Same SQLs Conn. Acquisition Time
  • 28. Root Cause: Deployment Considerations Log Service provides a Synchronized File across all JVMs 1M Log exceptions over 30 min
  • 29. Production Deployment leads to Log SYNC Issues Log message Time In Sync Two calls comming from Customr coded methods
  • 30. Time Spent in Sync & Logging # of Log Messages # of Exceptions
  • 33. Test Environment Production Environment That’s Normal: Having I/O for Web Request as main contributor Hibernate, Classloading, XML – The Key Hotspots I/O for Web Requests doesn’t even show up!
  • 34. These calls all originate form thousands of calls to find item by code Top Contributor Class.getInterfaces Called from Hibernates FieldInterceptionHelper
  • 35. Top Methods related to XML Processing Classloading is triggered through CustomMonkey and the Xalan Parser
  • 36. • Plan enough time for proper testing • Anticipate changed user behavior during peak load • Only test what really ends up in Production Lessons Learned
  • 37. Time Spent in API # Calls to API
  • 38. #4 Incorrect Sizing of Pools and Queues
  • 39. Online Banking: Slow Balance Check 101s! To Check Balance! 600! SQL Executions87% spent in IIS
  • 40. #1 Time really spent in IIS? Tip: Elapsed Time tells us WHEN a Method was executed! Tip: Thread# gives us insight on Thread Queues / Switches Finding: Thread 32 in IIS waited 87s to pass control to Thread 30 in ASP.NET
  • 41. #2 What about these SQL Executions? Finding: EVERY SQL statement is executed on ITS OWN Connection! Tip: Look at “GetConnection”
  • 42. #2 SQL Executions! continued … #1: Same SQL is executed 67! times #2: NO PREPARATION because everything executed on new Connection
  • 43. Lessons Learned! ASP.NET Worker Thread Pool Sizing! DB Connection Pools More Efficient SQL
  • 44. Idle vs. Busy Threads # SQLs / Request # GetConnection %CPU Starvation
  • 45. #5 Do know what you Test
  • 46. 23s for One click 22s $3-5M worth Data grid New Generation CRM: Angular.js / Coherence
  • 47. New Generation CRM: Angular.js / Coherence 7s for filter execution Filter Value
  • 48. Talk to Architects, and Trace argument’s values 4 performance sensitive methods # of unique invocations Response Time
  • 49. # Images # Redirects # and Size of Resources # SQL Executions # of SAME SQLs # Items per Page # AJAX per Page Remember: New Metrics When Testing Apps Time Spent in API # Calls into API # Functional Errors # 3rd Party calls # of Domains Total Size Resource (W3C) Timings: PLT, DOM Processing/Ready, Page Interactive
  • 50. Online Performance Clinics Every week @ bit.ly/onlineperfclinic bit.ly/dttrial
  • 51. Putting it into a Test Automation 12 0 120ms 3 1 68ms Build 20 testPurchase OK testSearch OK Build 17 testPurchase OK testSearch OK Build 18 testPurchase FAILED testSearch OK Build 19 testPurchase OK testSearch OK Build # Test Case Status # SQL # Excep CPU 12 0 120ms 3 1 68ms 12 5 60ms 3 1 68ms 75 0 230ms 3 1 68ms Test Framework Results Architectural Data We identified a regression Problem solved Exceptions probably reason for failed tests Problem fixed but now we have an architectural regression Problem fixed but now we have an architectural regression Now we have the functional and architectural confidence Let’s look behind the scenes