1 / 49

J2EE Applications Performance Management

Kenneth Merkel Systems Engineer. J2EE Applications Performance Management. Agenda. J2EE Applications Performance Management Challenges in Managing Web/J2EE Applications Methodology & Goals of Performance Management Performance Management Approaches / Techniques Real Issues

mhurley
Download Presentation

J2EE Applications Performance Management

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Kenneth Merkel Systems Engineer J2EE Applications Performance Management

  2. Agenda • J2EE Applications Performance Management • Challenges in Managing Web/J2EE Applications • Methodology & Goals of Performance Management • Performance Management Approaches / Techniques • Real Issues • IntroscopeTM Platform Technology Overview

  3. Why Is Web Application Performance Management So Complex? Mission-Critical Java Applications CICS/IMS on Mainframe Internet MQ / Tuxedo Back-End Servers Web Servers Customers Database Web Application Servers

  4. Why Is Java Application Performance Management So Complex? JVM Java/J2EE Application CICS/IMS on Mainframe Internet MQ / Tuxedo Back-End Servers Application Server Web Servers Customers Database Web Application Servers

  5. JDBC Driver MQSeries Connector CICS Connector Memory File and Network I/O Typical J2EE Architecture JVM J2EE Application Login JSP Login Request JNDI LDAP Server Response Account Info Servlet Account EJB Database Transaction Request Account Transaction Servlet Response Back-End Systems MQ CICS Server Application Server Thread Pool EJB Pools JDBC Pools

  6. Common Performance Problems • Bottlenecks on resources • 3rd party interaction points • Configuration problems • Memory leaks • Deadlocks and threading problems • Sloppy code

  7. Different definitions for different parts of your project… Development Profiling Logging Unit Testing Staging/QA Functional Testing Performance/Load Testing Defect/Performance Tracking Production Audit Trails Availability Service Level Agreements (SLAs) Sitemining What is Performance Measurement and Analysis?

  8. Establish performance criteria Maintain criteria • Analyze • Business Analysis • System Architecture Analysis • Application Analysis • Establish Baseline • Manage in Production • Production Deployment • Real-time Application Monitoring • Event Management • Problem Resolution • Application Server Tuning • Continuous Performance Management Failed criteria Apply criteria • Test in QA • Functional & Stress Test New criteria requirements Met criteria Web Application Performance Management Methodology

  9. Think in terms of user transactions or use cases for your application Typical examples of a single transaction might be… Logging in Looking Up Account Balance Transferring Funds Look at resource usage by use-case (especially high concurrency points) Stay focused on what your customers do with your application… why tune something unrelated? What do I analyze?

  10. What am I looking for? Intra-component … • Resource usage/abuse • Using Exceptions to handle non-exceptional cases. • Synchronization/Contention Costs • Collection Load Factors • Proper pattern usage

  11. … And what about the application server? • Connection Pools • JDBC Statement Types • Prepared Statement Cache • Exceptions • Messaging • JMS • MQ • Application Server Exceptions Application Server Queues • Web Container • EJB Container • ORB Thread Pool • Datasource Queuing Memory considerations • Garbage collection • Memory Leaks

  12. Now how do I get this info? • Logging • Profiling • ByteCode Instrumentation

  13. How does it work? You log (Log4J, JDK 1.4 Logging, ..) They log (EPM, JMX, PMI ..) How can you use it? In a file… Into a monitor... Pros (of you log): Produce any statistic Send stat anywhere Cons (of you log): You write it yourself Can not log into components you did not write (e.g. WebLogic, WebSphere) Hard or impossible to change once application is deployed Approach #1: Logging While logging is powerful and flexible, it can be very costly in terms of IO performance

  14. How does it work? – Java Virtual Machine Profiler Interface (JVMPI) What can it get you? CPU usage Clock time CPU time Memory usage Navigating a Java Heap Reference Graph Watching the Garbage Collector (temporaries, etc..) Pros: Lots of Information Detailed Memory Data Cons: Lots of Information Lots of overhead (not usually possible under load) Approach #2: Profiling

  15. How does it work? In-memory or Out-of-memory post-processing of byte code (e.g. JAR or ZIP files) “Logging without source code changes” How can you use it? Like you do logging or profiling, but… Without the same level of detail about memory utilization For example: average response times, call count, call rate, stalled thread counts Pros: Add or remove on demand Low overhead Watch anything (even components you don’t own, like the application server) Cons: Limited options on what kind of tracing can be done Doing it for free would be hard Approach #3: Bytecode Instrumentation

  16. So which technique is best for me? Depends on your performance goals… • What impact does the technique have in production? • How much overhead can you tolerate? • What are your performance goals? • Is source code modification feasible? • Do I need instance level metrics? • How much data will the technique produce? • How hard is the data to interpret?

  17. Best advice… • Think through performance goals early - setting target benchmarks/baselines. • Implement a methodology that allows measurement of application performance against benchmarks and baselines. • Use the right tools when/where possible. Preferably tools that generate actionable data and allow for proactive management. • Build repeatable and automated test scripts. • Remember the key to J2EE Application performance management is constant vigilance.

  18. All Systems Green Actual Issues

  19. Back-End and Concurrency Issue Garbage Collection and Memory Utilization Synchronization and Script Bug Issue Load Generation Test Performance Data and Component Unit Test Counts (Weighted Averages) Additional Examples of Performance Issues and Improvement Points

  20. Info regarding 24 instances of an app servlet

  21. Slow leak in connections to MQSeries?

  22. History of the number of active MQ connections settles into average of 26

  23. One server starts to back up execute threads

  24. Different view showing concurrency problems

  25. Transaction Tracer shows slow point

  26. Memory Usage (The Good)

  27. Memory Usage (The Bad)

  28. Memory Usage (The Ugly)

  29. Caused a component slowdown

  30. Isolated to single EJB via Blame

  31. LeakHunter isolates leak in each transaction that is run.

  32. Synchronization Issue

  33. Wily Introscope Technology Overview

  34. Introscope Agent • Gathers All Data Required to Manage a J2EE Application • Introscope Probes • JMX • PMI • CPU Stats • JVM Stats • Enables Management of the Whole Application… • Application Code Performance • Application Server Health and Configuration • Back-End System Performance • Network/Infrastructure Health • Runs Inside the JVM • Negligible Overhead • Benign (Fault Tolerant) • Easy to Install

  35. Servlet 10100101110101010010100010110110111100110101010000100011110111011111010101010000001111010101001010001111111010101010010100100101000010000011 Introscope Probes™-Patented Bytecode Instrumentation Technology Timer and Counter “Probes” inserted into Java bytecode. No Source Code modifications required!

  36. Metrics Provided by Introscope Probes™ Average Response Times • Run time for Servlet Execution, Method Call, JDBC Call, Etc. • Measured in milliseconds • Average value over small fixed time interval Rates • Invocations Per Second of Object, Method, or any J2EE Component • File-system and Network I/O Bytes Per Second Counts • Total Number of Servlet Invocations • Number of open Database connections • Etc.

  37. Introscope Agent Introscope Probes™-Provide the Agent with Performance Metrics • Introscope Agent “listens” to Probes • Probes Can be Installed in Any Java Code • Application • Application Server • Back-End System Connector Libraries • CICS, MQSeries, JDBC • 3rd Party Applications and Libraries • Provides Low-Overhead Visibility into Java Performance

  38. Introscope Enterprise Manager Agent Agent Agent Introscope Enterprise Manager -The Central Processing Unit • Processes and Manages Data Gathered by Introscope Agents • Processes Alerts, Database Storage, Systems Management Integration, etc • Stand-alone Java Application. Runs Anywhere… • UNIX (AIX, Solaris, HPUX) • Windows NT • OS/390 • AS400 • Linux

  39. Introscope Alerts Enable Actionable Response to Changes in Performance • Easily Configurable Thresholds • Caution and Danger Levels • Configured in GUI Workstation • Maximums or Minimums • Available for Any Metric in System • Response Times, Rates, Counts, … • Servlets, EJBs, Methods, … • Flexible/Powerful Event Manager • Console Alert Dialog Boxes • Emails • Shell Scripts (executed on EM machine) • Any combination of Events for either Threshold

  40. Introscope Enterprise Manager Historical Performance Reporting-Enterprise Manager Preserves Data in RDBMS • Enterprise Manager can write any or all metrics to a RDBMS • Configurable frequency and volume of data output • Run Batch Summary Reports on Historical Data • Interrogate Historical Data in Introscope Workstation System Performance Reports Historical & Trend Performance Data Historical Data

  41. Introscope Enterprise Manager Systems Mgmt Framework Integration-SNMP MIB and Alerts Make Integration Seamless • Enterprise Manager collects and analyzes data • Enterprise Manager PUSHES SNMP Alert to SNMP Manager • Enterprise Manager publishes live application metrics in Dynamic SNMP MIB • SNMP Manager displays SNMP Alert • SNMP Manager reads MIB and PULLS live performance data and displays graphically Alerts MIB Live Performance Data Via SNMP MIB Operations Center

  42. Introscope Workstation-Intuitive Visualization of Performance Data • The Console • Dashboards • Customized Display of Multiple Metrics • Different Dashboards for Different Users • The Explorer • Hierarchical View of Application • Management Modules • Containers for Alerts, Dashboards, Calculators, Groupings, etc. • PowerPacks™ • App Specific Metrics and Views for 3rd Party Apps and AppServers

  43. Introscope Agent Introscope Workstation Introscope Enterprise Manager Capacity Planning Historical Charts =================================== 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 Availability Reports Trend Reports =================================== 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 =================================== 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 02:00 StockTrading:Serlvet42 318 586 Introscope Architecture Agent J2EE Application Server Real-time, Historical, & Performance Alerting Agent Java Application Server Systems Management Integration Stand-Alone Java Application Alerts & Events Performance Data via SNMP MIB Agent System Performance Reports Historical & Trend Performance Data Historical Data

  44. All Systems Green For more info on achieving World Class Java Application management Ray Beecher – (972) 830-9033 rbeecher@wilytech.com Wily Technology, Inc.8000 Marina Blvd, Suite 700Brisbane, CA 94005http://www.wilytech.com1 888 GET WILY Kenneth Merkel – (713) 669-9239 kmerkel@wilytech.com sales@wilytech.com – (415) 562-2000

More Related