hands on performance tuning - mike croft

19
The science of performance Mike Croft Hands-on Performance Workshop

Upload: jaxlondon2014

Post on 13-Jul-2015

252 views

Category:

Presentations & Public Speaking


0 download

TRANSCRIPT

The science of performance

Mike Croft

Hands-on Performance Workshop

Who Am I?

• C2B2 Expert Support consultant

• Ex-IBM

• Snowboarder

• @croft

Who are you?

Why are we here?

• Hands-on performance!

– Hands on what?

• See what tools are available

• Get experience of using some tools

• Learn how to apply knowledge

• Why do you want to be here?

Agenda

• Introduction

• Environment setup

• Performance Overview

• Collecting Data

– Presentation

– Practical

• How do we interpret the data?

– Tools

• Example app analysis

Hands-on Performance Workshop

Environment Setup

Environment Setup

• Download Instructions and follow the first part

https://s3-eu-west-1.amazonaws.com/jaxlondon2014/instructions.docx

• Make sure all necessary resources are downloaded

• Make sure the app is deployed and JMeter can run load through it

Hands-on Performance Workshop

Performance Overview

Performance Overview

Performance Overview

Performance Factors

• Raw Algorithmic Performance

• Resource Limitations

– Not enough cpu, disk, memory

• Resource Contention

– Locks

• IO Latency

– Network, Disk

Performance Overview

Latency Factors

• Network Distance

• Network Reliability

• Data Size

• Operation Granularity

• Resource Contention

• JVM GC

Performance Overview

Performance Overview

Hands-on Performance Workshop

Collecting Data

Collecting Data

• Garbage Collection

• Verbose GC

• Heap size

– New size and old size

– Before collection

– After collection

• Pause time

Collecting Data

• Thread dumps

– Kill -3

– JStack

• Thread state

– Wait

– Sleep

– Blocked

– Running

• Full stack trace

Collecting Data

• Heap dumps

• Entire contents of the heap

– Very Large!

– Can take time to collect on largeheaps

• Can auto-dump on OOME

Hands-on Performance Workshop

Interpreting Data

Interpreting Data

• Tools

– Live monitoring• VisualVM

• MissionControl

• JMX

– Historical analysis• Memory Analyzer Tool

• Flight Recorder (commercial)

• Threadlogic

• GCViewer