Java Performance Monitoring Tools - PowerPoint PPT Presentation

1 / 21
About This Presentation
Title:

Java Performance Monitoring Tools

Description:

Java Performance Monitoring Tools. Matt Secoske. Bass & Associates. February 9, 2006 ... AOP JMX = Cool stuff coming from this area. GlassBox Inspector (java.net) ... – PowerPoint PPT presentation

Number of Views:93
Avg rating:3.0/5.0
Slides: 22
Provided by: larry160
Category:

less

Transcript and Presenter's Notes

Title: Java Performance Monitoring Tools


1
Java Performance Monitoring Tools
  • Matt Secoske
  • Bass Associates
  • February 9, 2006

2
Performance
  • Critical to the success of your application
  • Relies on right combination of
  • -Hardware
  • -Software
  • -Configuration
  • -3rd Party Systems/Libraries
  • -Developer Knowledge/Experience

3
Issues
  • Typically looked at only when there is a problem
  • Most do not know what performance they require
  • Can affect full life cycle of Software
    Development
  • Should be examined frequently (any semi-major
    change)

4
Issues
  • Accuracy problems
  • -What to measure? How often?
  • Hard to do in production
  • Potentially slows down application

5
A plan is formed...
  • Find out what performance you need
  • -Ask questions of the respective stakeholders
  • Create testing scenarios
  • Determine monitoring/profiling needs
  • Integrate into development process
  • -Continuous performance testing

6
But wait!
  • Don't focus on micro performance, unless you
    really REALLY need to! ¹
  • String vs. StringBuffer is interesting, but
    (usually) not a critical performance issue
  • Focus on performance until it is Good Enough
  • "Premature optimization is the root of all
    evil."²

¹ http//www-128.ibm.com/developerworks/java/libra
ry/j-jtp03253.html ² http//en.wikipedia.org/wiki/
Optimization_(computer_science)
7
Some Questions
  • What is your expected average number of users
  • What is your expected peak number of users?
  • What are the most common tasks these users will
    be doing?
  •  

8
Process
  • Benchmark/profile the system as a baseline.
  • Look at the results, identify bottleneck.
  • Make small change based to relieve bottleneck.
  • Benchmark/profile
  • Compare to baseline for improvements
  • Rinse, wash, repeat
  • Make it part of you dev process... even your
    build process

9
JMeter
  • Apache's load driver. Can help push requests in
    common load/peak load scenarios.

10
Monitoring Options
  • Stop Watch
  • Tracing / Logs
  • Profiling

11
Stop Watch (Wall clock?)
  • Useful for UI testing...
  • -General UI responsiveness
  • .. and some long running processes
  • -Tests, builds, etc.
  • Not much else

12
Tracing / Logs
  • Most Common
  • -Web Server Logs
  • Affects environment
  • -Parmesan on you spaghetti code
  • -Log files, etc
  • Generally solved by NIH code
  • -There are tools available

13
Profiling
  • Watches JVM events
  • -Contained Profiling (Profiler wraps Application)
  • -External Profiling (Profiler attaches to
    Application's process JVMPI)
  • Easy to do too much... slowing down the
    application

14
Tracing solutions
  • Log4j
  • -Remember, parmesan
  • Or is it?
  • -Aspects can make that issue disappear
  • -Still need to focus on what to test

15
Aspects
  • Can be used for general tracing and profiling.
  • Compile time or run-time configuration.
  • AOP JMX Cool stuff coming from this area.

GlassBox Inspector (java.net)
16
JFluid / NetBeans Profiler
  • Sun's JVM profiling tool.
  • Part of NetBeans profiler extension.
  • Local or remote profiling
  • Supports certain version of 1.4.2 JVM, all 5.0
    Sun JVMs.

17
NetBeans Profiler
18
Eclipse TPTP/Hyades
  • Hyades is Eclipse's JVM profiling tool.
  • Similar in function to NetBeans Profiler.
  • Local or remote profiling.
  • Requires an agent to run in the JVM.
  • Most major platforms supports.

19
Eclipse TPTP / Hyades
20
Final Thoughts
  • Performance analysis, like debugging, is an
    iterative process.
  • Initial setup will take longer than you expect.
  • There is no perfect solution, but you can get
    close enough.
  • The trick is knowing when to optimize, and that
    comes from profiling.
  • There are plenty of great (and now, free!) tools
    available for you to use.
  • Make performance a part of your dev process.

21
Links
  • http//www-128.ibm.com/developerworks/java/librar
    y/j-jtp03253.html
  • Performance monitoring with AspectJ, parts 1
    2, Ron Bodkin
  • http//www-128.ibm.com/developerworks/java/librar
    y/j-aopwork10/
  • http//www-128.ibm.com/developerworks/java/librar
    y/j-aopwork12/index.html
  • Java Performance Tuning, Jack Shirazi
  • http//www.oreilly.com/catalog/javapt/index.html
  • Tools
  • NetBeans IDE/Profiler http//www.netbeans.org/
  • Eclipse IDE/TPTP http//www.eclipse.org
  • Apache Jmeter http//jakarta.apache.org/jmeter
  • GlassBox Inspector https//glassbox-inspector.dev
    .java.net/
Write a Comment
User Comments (0)
About PowerShow.com