performance forensics - understanding application performance
DESCRIPTION
An introduction to performance measurement and diagnosisTRANSCRIPT
![Page 1: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/1.jpg)
Performance
Forensics
Alois ReitbauerdynaTrace Software
![Page 2: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/2.jpg)
Forensicsforensis adj - "of or before the forum." In Roman times, a criminal charge meant presenting the case before a group of public individuals in the forum. … The individual with the best argument and delivery would determine the outcome of the case.
![Page 3: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/3.jpg)
Collecting Evidence
![Page 4: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/4.jpg)
What does this chart tell us
Time
Resp
onse
Tim
e
![Page 5: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/5.jpg)
A- Response time problem?B - CPU problem?C - Sync problem?D - Database problem?
![Page 6: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/6.jpg)
We don‘t know
![Page 7: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/7.jpg)
We have to collect our evidence first
![Page 8: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/8.jpg)
System/OS/Virtualization-Level
Container/App Server-Level
Application-Level
User-Level
Multi-Layered Measurement
![Page 9: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/9.jpg)
Understand your measurements
Response Time only Response Time and GC
![Page 10: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/10.jpg)
A: Our response time is 2.3 secondsB: Our response time is 1.5 secondsC: Our response time is 6 seconds
How can this happen?
![Page 11: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/11.jpg)
Browser FirewallNetworkSniffer Web Server Application
Server
Page Load Time HTTP Request Time
Request Time (max)
95 % Servlet Time
The beauty of measures ...
... is that there are so many to choose from
![Page 12: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/12.jpg)
Types of Measurements
• Cyclic Measurements– Are collected ar regular time intervals– Are time based– JMX, CPU, Memory
• Event-based measurements– Are collected as a request occurs– Are transactional– Response Times, CPU consumption
![Page 13: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/13.jpg)
Types of Statistics
• Min/Max• Average• Median• Percentiles
Use percentiles for event-based measures and averages (or max) for cyclical measures
![Page 14: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/14.jpg)
How you measure is important
![Page 15: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/15.jpg)
Typical Measurements we work with
• Memory– Consumption, GC
• CPU– Usage, Load Average
• Response Time– Transactions
• Database– Statements, Pool Sizes
• Communication– Calls, Latency, Size, Threads
![Page 16: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/16.jpg)
A Clearer Picture
![Page 17: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/17.jpg)
What is the problem?
We have response times of 6 seconds.
We have response times of 6 seconds for 95 percent of our users at a load of 500 users with a CPU utilization of 10 percent.
![Page 18: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/18.jpg)
Indentify the suspect
![Page 19: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/19.jpg)
Don‘t trust your assumptions
![Page 20: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/20.jpg)
Top 10 Optimizations are bad
![Page 21: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/21.jpg)
Seperate transaction types
![Page 22: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/22.jpg)
Baseline and Delta
![Page 23: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/23.jpg)
Understand the difference
![Page 24: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/24.jpg)
Make the problem reproducable. Otherwise you cannot check
whether you fixed it.
![Page 25: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/25.jpg)
When are we done?
![Page 26: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/26.jpg)
... when there are no more why questions
![Page 27: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/27.jpg)
Solving the case
![Page 28: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/28.jpg)
Ensure you solved the real problem
![Page 29: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/29.jpg)
Fight problems not symptoms
![Page 30: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/30.jpg)
When a measure supports a problem. Check for all measures
affected by the problem.
![Page 31: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/31.jpg)
Have you tuned at the right place
![Page 32: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/32.jpg)
Watch out for side effects
![Page 33: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/33.jpg)
The usual suspects
![Page 34: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/34.jpg)
O/R Access
Rendering
State Handling
Latency
Data Volume
Comm. Behavior
JavaScript
Database
Business Tier
Browser
Web TierData Volume
Number of Requests
Memory and GC
Memory and GC
![Page 35: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/35.jpg)
Client ApplicationClient Application
StubStub
SerializationSerialization
Client InfrastructureClient Infrastructure
Server ApplicationServer Application
FacadeFacade
DeserialisationDeserialisation
Server InfrastructureServer Infrastructure
NetworkingNetworking NetworkingNetworking
Application Developers View
Remoting Stack
![Page 36: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/36.jpg)
![Page 37: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/37.jpg)
Avoid Protocol Overhead
Reduce Interactions Create Data Locality
Adjust Interfaces
![Page 38: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/38.jpg)
Application Code
Connection PoolConnection
Result Set
Application
SQLTCP/IP
Database
O/R Mapping Layer
Caching Layer
StatementConnection
PreparedStatementPreparedStatement
.
.
.
The DB layer
![Page 39: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/39.jpg)
PersistenceFramework
JDBCLayer
Database
Execution PlanCache
Prepared StatementCache
Cross SessionCache
Session Caches
QueryCache(s)
Caching in the DB layer
![Page 40: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/40.jpg)
Reduce DB Calls
Tune Loading Behavior Optimize for caching
Define Proper Entities
select … from a,b,cselect … from b,c,a
… join fetch ….
![Page 41: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/41.jpg)
The Web Layer
![Page 42: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/42.jpg)
Browser ServerJavaScriptPerformance
HTML Rendering
Many AJAX/HTTPcalls
HighLatency
HighDatavolume
Thread-/Connectionpools
Network
DatabaseAccess
WebService/Backend Calls
BrowserBrowser
![Page 43: Performance Forensics - Understanding Application Performance](https://reader035.vdocuments.site/reader035/viewer/2022062418/5549e211b4c90512488b48aa/html5/thumbnails/43.jpg)
Caching on the Web
Clients
Server
Cache per Client
Server providingCaching Information
Proxy Cachefor Many Clients
Serverside Data Cache