JudCon 2010 Berlin: Practical Enterprise Java Performance Tuning
Upcoming SlideShare
Loading in...5
×
 

JudCon 2010 Berlin: Practical Enterprise Java Performance Tuning

on

  • 1,132 views

presentation by

presentation by

Matt Brasier
Head of Consulting, C2B2 Ltd

Statistics

Views

Total Views
1,132
Views on SlideShare
1,122
Embed Views
10

Actions

Likes
0
Downloads
27
Comments
1

2 Embeds 10

http://www.c2b2.co.uk 8
http://54.247.191.20 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

JudCon 2010 Berlin: Practical Enterprise Java Performance Tuning JudCon 2010 Berlin: Practical Enterprise Java Performance Tuning Presentation Transcript

  • Practical Enterprise Java Performance Tuning
    Matt Brasier
    Principal Consultant, C2B2 Ltd
  • Agenda
    Introduction
    Performance tuning toolbox
    Examples
    Summary
  • Introduction
    Who Am I?
    Matt Brasier
    Principal Consultant at C2B2 Consulting
    10 years Java EE experience
    6 years as a consultant
  • Introduction
    This talk
    Introduction to tools used
    Practical demonstrations
    Download the example application
    www.c2b2.co.uk/judcon/sampleapp.zip
  • Performance consultant’s toolbox
  • JBoss admin console
  • JBoss admin console
    http://localhost:8080/admin-console
    Since JBoss 5
    Cut-down version of RHQ
  • JBoss jmx-console
  • JBoss jmx-console
    http://localhost:8080/jmx-console
    Dynamic view of JMX mbeans
    Information overload
    Fast if you know what you are looking for
    A few really useful features
  • VisualVM
  • VisualVM
    Distributed with JDK 6
    Successor to jconsole
    Install all the plugins!
    jvisualvm from the command line
  • Command line JDK tools
    jps
    Process IDs of Java processes
    jstat
    JVM statistics for things such as GC
    jstack
    Thread dumps
    jhat
    Heap dump analysis
  • Testing Tools
  • JMeter
  • JMeter
    http://jakarta.apache.org/jmeter/
    Load testing tool
    Easy to produce scripts
    Can record scripts from a browser
    Can run in distributed mode
  • The Grinder
  • The Grinder
    http://grinder.sourceforge.net/
    Load testing tool
    More complex scripts than Jmeter
    Jython based
    Better for extreme testing
  • Live Demo
  • Summary
    The JVM and JMX make a lot of information available
    The tools to get at the information are readily available
    All that you have to do is understand what it is telling you
  • Hot method
    Repeated Thread dumps reveals one method appears frequently
    It is either occuring a lot or running slowly
  • System.gc
    Frequent major garbage collections
    jstat shows a large GCT and System.gc as the previous GC cause
    VisualVM shows large proportion of CPU time spent garbage collecting
  • Synchronization
    Thread dump reveals large number of threads blocked waiting for the same lock
  • Key techniques
    Load testing
    Thread dumps
    Visual VM
    Swiss army knife of Java consultants
  • Questions?
  • Thank you