Open Source Performance Monitoring Tools, Tips and Tricks for Java - PowerPoint PPT Presentation

About This Presentation
Title:

Open Source Performance Monitoring Tools, Tips and Tricks for Java

Description:

Not so great as an over-all monitoring solution Clusterable performance ... Premature optimization is the ... speed Java Specific - GC - Application specific ... – PowerPoint PPT presentation

Number of Views:256
Avg rating:3.0/5.0
Slides: 25
Provided by: wikiPtagi
Learn more at: https://wiki.ptagis.org
Category:

less

Transcript and Presenter's Notes

Title: Open Source Performance Monitoring Tools, Tips and Tricks for Java


1
Open Source Performance Monitoring Tools, Tips
and Tricks for Java
Matt Secoske Consultant - Bass
Associates http//www.bass-inc.com email
matt_at_secosoft.net
2
Agenda
  • Planning
  • Process
  • Tools
  • Tips, Tricks

3
  • Where does performance matter?

4
  • ... where your business requires it.

5
  • Why don't we treat this like a test case?

6
Plan for Performance
  1. Determine your performance goals
  2. Create testing scenarios
  3. Determine monitoring/profiling needs
  4. Integrate into development process - continuous
    performance testing?
  5. Integrate into production environment

7
What to monitor
  • Hardware (web, app, db servers)- CPU- Memory-
    Cache Hits/Misses- Disk/Network speed
  • Java Specific- GC- Application specific metrics

8
Profiling Tools
  • Load Testing / Driving
  • Logging / Log Analysis
  • Contained Profiling (Profiler wraps Application)
  • External Profiling (JVMPI)
  • java.lang.instrumentation

9
JUnitPerf
  • Decorates existing JUnit tests
  • Great for running benchmarks against a particular
    test case (or cases) while refactoring.
  • Not so great as an over-all monitoring solution

10
The Grinder
  • Clusterable performance testing
  • Stress, Load, Capacity and Functional Testing
  • HTTP, Web Services, RPC, JMS, JUnit,
  • Proxy for recording traffic (real users)
  • Scriptable in Jython

11
Load Testing Apache JMeter
12
Log files / Analysis
  • Easy
  • Common (Web server logs)
  • Affects environment (file I/O)
  • Affects code
  • Generally solved by N.I.H. code
  • Accuracy

13
Logging Tools
  • Log4J or other logging tool
  • Aspects
  • simple, transparent, targeted

14
Aspect-based Logging Tools
  • Handcarved (AspectJ, AspectWerkz)
  • Java Interactive Profiler
  • GlassBox Inspector

15
GlassBox Inspector
16
JFluid / NetBeans Profiler
  • Sun's new JVM profiling tool
  • Part of NetBeans Profiler extension
  • Local or Remote Profiling
  • Limited JVM support (mainly 5.0)

17
NetBeans Profiler
18
Eclipse TPTP
  • Test and Performance Tools Platform
  • Local or remote profiling
  • Requires JVM agent for remote

19
Eclipse TPTP
20
Tips, Tricks
  • Treat performance as a test case red bar
    green bar refactor
  • Real-world data Real-world usage patterns
    accurate benchmarks
  • Put in just enough metrics to get your
    performance measurements
  • Performance Test ! Production
  • Keep some monitoring in production

21
Final Thoughts
  • Performance Monitoring, like most things in
    software development, is an iterative process.
  • Initial setup will take longer than expected.
    Its worth it.
  • Premature optimization is the root of all evil
    - Hoare, Knuth
  • Know when and what to optimize comes from
    experience and profiling
  • Make performance a part of your development
    process

22
Links - Tools
  • JMeter http//jakarta.apache.org/jmeter
  • The Grinder http//grinder.sf.net
  • JUnitPerf http//clarkware.com/software/JUnitPerf
    .html
  • Log4J http//logging.apache.org/log4j/docs/
  • GlassBox Inspector https//glassbox-inspector.dev
    .java.net/
  • Java Interactive Profiler http//jiprof.sourcefor
    ge.net/
  • NetBeans Profiler http//www.netbeans.org/product
    s/profiler/index.html
  • Eclipse TPTP http//www.eclipse.org/tptp/

23
Links - Articles
  • Add Object Cache Monitoring using JMX and
    Aspects - Srini Penchikala http//www.devx.
    com/Java/Article/29526
  • Build your own profiling tool - Andrew Wilcox
  • http//www-128.ibm.com/developerworks/java/library
    /j-jip/?cadgr-lnxw01JavaProfiling
  • Performance monitoring with AspectJ, Part 1 -
    Ron Bodkin
  • http//www-128.ibm.com/developerworks/java/library
    /j-aopwork10/
  • Continuous Performance Testing with JUnitPerf -
    Mike Clark
  • http//www.javapronews.com/javapronews-47-20030721
    ContinuousPerformanceTestingwithJUnitPerf.html

24
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com