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 WorkshopEnvironment 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 WorkshopPerformance 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 WorkshopCollecting 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 large
heaps
• Can auto-dump on OOME
Hands-on Performance WorkshopInterpreting Data
Interpreting Data
• Tools– Live monitoring
• VisualVM• MissionControl• JMX
– Historical analysis• Memory Analyzer Tool• Flight Recorder (commercial)• Threadlogic• GCViewer