performance forensics - understanding application performance

44
Performan ce Forensics Alois Reitbauer dynaTrace Software

Upload: alois-reitbauer

Post on 06-May-2015

784 views

Category:

Technology


2 download

DESCRIPTION

An introduction to performance measurement and diagnosis

TRANSCRIPT

Page 1: Performance Forensics - Understanding Application Performance

Performance

Forensics

Alois ReitbauerdynaTrace Software

Page 2: Performance Forensics - Understanding Application Performance

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

Collecting Evidence

Page 4: Performance Forensics - Understanding Application Performance

What does this chart tell us

Time

Resp

onse

Tim

e

Page 5: Performance Forensics - Understanding Application Performance

A- Response time problem?B - CPU problem?C - Sync problem?D - Database problem?

Page 6: Performance Forensics - Understanding Application Performance

We don‘t know

Page 7: Performance Forensics - Understanding Application Performance

We have to collect our evidence first

Page 8: Performance Forensics - Understanding Application Performance

System/OS/Virtualization-Level

Container/App Server-Level

Application-Level

User-Level

Multi-Layered Measurement

Page 9: Performance Forensics - Understanding Application Performance

Understand your measurements

Response Time only Response Time and GC

Page 10: Performance Forensics - Understanding Application Performance

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

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

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

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

How you measure is important

Page 15: Performance Forensics - Understanding Application Performance

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

A Clearer Picture

Page 17: Performance Forensics - Understanding Application Performance

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

Indentify the suspect

Page 19: Performance Forensics - Understanding Application Performance

Don‘t trust your assumptions

Page 20: Performance Forensics - Understanding Application Performance

Top 10 Optimizations are bad

Page 21: Performance Forensics - Understanding Application Performance

Seperate transaction types

Page 22: Performance Forensics - Understanding Application Performance

Baseline and Delta

Page 23: Performance Forensics - Understanding Application Performance

Understand the difference

Page 24: Performance Forensics - Understanding Application Performance

Make the problem reproducable. Otherwise you cannot check

whether you fixed it.

Page 25: Performance Forensics - Understanding Application Performance

When are we done?

Page 26: Performance Forensics - Understanding Application Performance

... when there are no more why questions

Page 27: Performance Forensics - Understanding Application Performance

Solving the case

Page 28: Performance Forensics - Understanding Application Performance

Ensure you solved the real problem

Page 29: Performance Forensics - Understanding Application Performance

Fight problems not symptoms

Page 30: Performance Forensics - Understanding Application Performance

When a measure supports a problem. Check for all measures

affected by the problem.

Page 31: Performance Forensics - Understanding Application Performance

Have you tuned at the right place

Page 32: Performance Forensics - Understanding Application Performance

Watch out for side effects

Page 33: Performance Forensics - Understanding Application Performance

The usual suspects

Page 34: Performance Forensics - Understanding Application Performance

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

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
Page 37: Performance Forensics - Understanding Application Performance

Avoid Protocol Overhead

Reduce Interactions Create Data Locality

Adjust Interfaces

Page 38: Performance Forensics - Understanding Application Performance

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

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

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

The Web Layer

Page 42: Performance Forensics - Understanding Application Performance

Browser ServerJavaScriptPerformance

HTML Rendering

Many AJAX/HTTPcalls

HighLatency

HighDatavolume

Thread-/Connectionpools

Network

DatabaseAccess

WebService/Backend Calls

BrowserBrowser

Page 43: Performance Forensics - Understanding Application Performance

Caching on the Web

Clients

Server

Cache per Client

Server providingCaching Information

Proxy Cachefor Many Clients

Serverside Data Cache

Page 44: Performance Forensics - Understanding Application Performance

Alois [email protected]

@AloisReitbauerblog.dynatrace.com