Impact2014: Introduction to the IBM Java Tools

1,134 views

Published on

IBM provides a number of free tools to assist in monitoring and diagnosing issues when running any Java application - from Hello World to IBM or third-party, middleware-based applications. This session introduces attendees to those tools, highlights how they have been extended with IBM middleware product knowledge, how they have been integrated into IBMs development tools, and how to use them to investigate and resolve real-world problem scenarios.

Published in: Technology, Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,134
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
55
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Impact2014: Introduction to the IBM Java Tools

  1. 1. © 2014 IBM Corporation AAD2413: Introduction to the IBM Monitoring and Diagnostic Tools for Java Peter Whitehead Chris Bailey
  2. 2. 2 Please Note IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion. Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion. Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
  3. 3. 3 Introduction to the Speakers Peter Whitehead Program Manager, Java Technology Center and ASPN Development • 23 years experience developing storage subsystems, program management and deploying IBM's Java SDKs • Recent work focus: ‒ Improving Critical Patch Update concurrency ‒ Delivery of Java runtimes for IBM platforms and products ‒ Creation of serviceability tooling suite for IBM Java runtimes ‒ Delivery of distributed cloud operating environment for mobile networks • Contact Details: ‒ peter_whitehead@uk.ibm.com
  4. 4. 4 Introduction to the Speakers Chris Bailey Java Serviceability and Cloud Integration Architect • 13 years experience developing and deploying Java SDKs • Recent work focus: ‒ Java integration into the cloud ‒ Java monitoring, diagnostics and troubleshooting ‒ Requirements gathering ‒ Highly resilient and scalable deployments • Contact Details: ‒ baileyc@uk.ibm.com ‒ http://www.linkedin.com/in/chrisbaileyibm ‒ http://www.slideshare.net/cnbailey/
  5. 5. Java Tools Overview
  6. 6. 6 What I hope to achieve in the next 60 mins  Introduce the IBM tools for monitoring, debugging and diagnosing problems in the deployment life cycle  Understand the capabilities of each tool  See how the tools can be extended tools with knowledge of applications or to build custom tools  See how IBM is building on top of the Java tools platform
  7. 7. 7 Provide a free unified suite of tools to understand different aspects of Java applications. Provide more than visualizations – also provide observations and recommendations. IBM supported and always current to latest IBM Java levels. IBM Monitoring and Diagnostic Tools for Java
  8. 8. 8 Where to use our tools The IBM Monitoring and Diagnostic Tools for Java fall into two distinct pools “Post-Mortem”: Informaton created during application life cycle and available for interrogation offline when the application has finished • Interactive Diagnostic Dump Explorer • Memory Analyzer, • Garbage Collection Memory Visualiser Runtime Monitoring: • Health Center
  9. 9. 9 Where to get our tools: IBM Support Assistant (ISA) A workbench for use by your technical personnel to: − Expedite resolution of problems − Automate collection of symptom based “MustGather” data − View and analyze collected data − Leverage powerful tools to analyze logs, JVM core and heap dumps, config files, etc.
  10. 10. 10 Where to get our tools: Eclipse Market Place
  11. 11. Post Mortem
  12. 12. 12 Interactive Diagnostic Data Explorer (IDDE) The IBM JRE Dump artefacts provide insight into the health and integrity of your application by providing a graphical view of a system dump file IDDE has been developed to enable easy access to the detailed information contained within a dump artefact It allows collaboration and user defined extensions There is also a community of extensions and add ons
  13. 13. 13 IDDE overview A visual representation of your set of dump files An investigation log editor in which you run commands. Command assistance Auto-completion of text The ability to save commands and output, which you can then send to other people Highlighted text and flagging of issues The ability to add your own comments Support for using commands from the following tools IBM Monitoring and Diagnostic Tools for Java - Dump Analyzer IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer (technical preview) An outline view to help you navigate the commands and output in the log editor
  14. 14. 14 IDDE Supported Artefacts Java core Text file produced by JVM. Mix of OS and Java data Portable Heap Dump (PHD) Binary file produced by JVM High level view of objects (no fields) Classloaders System core file Binary image produced by OS. jextract required for native library collection
  15. 15. 15 Interactive Diagnostics Data Explorer Extensions Not just a Java story..... IDDE is being expanded to bring the service capabilities to new languages IDDE Extensions have been provide to support IBM SDK for Node.js New commands added to enable exploration of Node.js core files Explore the C/C++ data structures in the core
  16. 16. 16 Off line tool providing deep insights into Java Heaps Powerful analytic capabilities to explore heap sections, including “deep” and “shallow” cost Path to GC Roots Provides the reference chain that prevents an object being garbage collected Eclipse Equinox bundle explorer (works with OSGI bundles for WebSphere) Memory Analyzer (based on Eclipse MAT)
  17. 17. 17 Memory Analyzer overview cont… Overview:  Overview of the heapdump including size and total number of objects.  Provides links to continued analysis Path to GC Roots:  Provides the reference chain that prevents an object being garbage collected. Dominator Tree grouped by Class Loader:  Lists the biggest objects using a “keep alive tree”. Grouping by Class  Loader limits the analysis to a single application in a JEE environment
  18. 18. 18 Additional capabilities for debugging generic Java Applications Extensions currently available for  IBM Java SE runtime  WebSphere Application Server  CICS Transaction Gateway Using these extensions will enable  Visualization of application and IBM product code  Confirm configuration of IBM Products  Inspect size and contents of IBM products Extensions are made available through ISA or installed directly into the Memory Analyser application Extensions for Memory Analyzer
  19. 19. 19 Analyses heap usage, heap size, pause times, and many other properties Compare multiple logs in the same plots and reports Many data views  Reports  Graphs  Tables Garbage Collector and Memory Visualizer (GCMV)
  20. 20. 20 GCMV overview cont… Graphical Display of Data  Allows graphing of all available data: pause times, heap size etc  Allows zoom, cropping and change of axes value and units  Allows comparison of multiple files Analysis and Recommendations  Provides tuning recommendations based on data and flags errors.  Analysis can be limited using cropping.  Values and units used in analysis can be changed by changing axes values and units 
  21. 21. Runtime Monitoring
  22. 22. 22 Answers vital questions:  What is my JVM doing? Is everything ok?  Why is my application running slowly? Why is it not scaling?  Am I using the right options? Live monitoring with very low overhead Diagnose potential problems, with recommendations Works at the JVM level, no domain-specific (e.g. J2EE) information Suitable for all Java applications Special view for WebSphere Real Time  Helps identify outlier events (class load, compilation, GC, application method) IBM Monitoring and Diagnostic Tools for Java™ Health Center
  23. 23. 23  Health Center enabled using the command line:  Health Center enabled at runtime using “Late Attach” to a running process: java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar Heartbeat java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar CPUHog 90 Enabling Health Center java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar -Xhealthcenter Heartbeat
  24. 24. 24 Health Center Data: Operating System and Machine Native Memory • Detect native memory leaks in application • Determine if external forces are using more memory • View components using the most native memory Environment reporting • Detects invalid Java options • Detects options which may hurt performance or serviceability • Useful for remote diagnosis of configuration-related problems Machine and Process CPU Usage • Visualizes heap usage and gc pause times over time • Identifies memory leaks • Suggests command-line and tuning parameters • Same recommendation logic as GCMV
  25. 25. 25 Health Center Data: Java Runtime Garbage Collection visualization • Visualizes heap usage and gc pause times over time • Identifies memory leaks • Suggests command-line and tuning parameters • Same recommendation logic as GCMV Object Allocation Profiling • Understand what types of data is being allocated and at what rate • Determine which code is allocating data Threads view • List of current threads and states • Number of threads over time • See contended monitors
  26. 26. 26 Health Center Data: Java Runtime Class loading visualization • Shows all loaded classes • Shows load time • Identifies shared classes • Live class histogram information I/O • Monitor application file open/close events as they occur • Lists currently open files
  27. 27. 27 Health Center Data: Application Method Profiling • Always-on profiling shows application activity • Identifies the hottest methods in an application • Full call stacks to identify where methods are being called from and what methods they call • No byte code instrumentation, no recompiling Java Lock Profiling • Always-on lock monitoring • Quickly allows the usage of all locks to be profiled • Helps to identify points of contention in the application that are preventing scaling Live control of application • Trigger dumps • Enable verbosegc collection
  28. 28. 28 Measured using WebSphere App Server and the DayTrader benchmark with 50 clients Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7 Throughput determined by number of completed transactions on 4 saturated CPUs Health Center overhead
  29. 29. 29 Measured using WebSphere App Server and the DayTrader benchmark with 50 clients Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7 Throughput determined by number of completed transactions on 4 saturated CPUs Health Center overhead
  30. 30. 30 Measured using WebSphere App Server and the DayTrader benchmark with 50 clients Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7 Throughput determined by number of completed transactions on 4 saturated CPUs Health Center overhead
  31. 31. 31 Measured using WebSphere App Server and the DayTrader benchmark with 50 clients Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7 Throughput determined by number of completed transactions on 4 saturated CPUs Health Center overhead
  32. 32. 32 Measured using WebSphere App Server and the DayTrader benchmark with 50 clients Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7 Throughput determined by number of completed transactions on 4 saturated CPUs Health Center overhead
  33. 33. The 2.2 release of Health Center contains a powerful API. The API allows Java™ developers to embed Health Center in their applications With a few lines of code, you can embed the monitoring power of Health Center in your own Java application and harness its monitoring power to troubleshoot problems // Create the connection object: ConnectionProperties conn1 = new ConnectionProperties("localhost", 1973); // Connect to the Health Center agent, using the previous connection // settings: HealthCenter hcObject = HealthCenterFactory.connect(conn1, true); // Get garbage collection data and print: GCData gcData = hcObject.getGCData(); System.out.println("GC Mode is " + gcData.getGCMode().toString()); Access Health Center data with the API
  34. 34. Example: Alert on Heap Usage Threshold private static void remoteConnect() throws HealthCenterJMXException, HealthCenterSSLException, HealthCenterException { ConnectionProperties props = new ConnectionProperties(); try { healthCenter = HealthCenterFactory.connect(“localhost”, 1972); } catch (HealthCenterException e) { e.printStackTrace(); } } Create a remote connection to an application runnon at localhost:1972 Provides the healthCenter object used to access all of the data: private void startJavaMemoryCheck() { GCData gcData = healthCenter.getGCData(); long maxHeapSize = getConfiguredMaxHeapSize(); boolean breachFound = false; double thresholdValue = maxHeapSize - (maxHeapSize * thresholdPercentage); while (true) { HeapData[] usedHeapData = gcData.getUsedHeapData(); for (HeapData usedHeap : usedHeapData) { if (usedHeap.getHeapSize() > thresholdValue) { Date date = new Date(usedHeap.getTime()); System.out.println("Heap threshold breached at " + date); breachFound = true; break; } } if (breachFound) break; try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }
  35. 35. RAD v9 Usage of Health Center Data  Enable “Health Center Agent”  Select “Sample based profiling”  Method CPU usage collected  Displayed in real time  Accessed using API
  36. 36. 36 Summary  IBM is building a set of integrated monitoring and diagnostic tools  Taking a ground up approach  Working across teams, products and brands  Providing a consistent user experience
  37. 37. Monday, 28-April: 13:00-14:00 Introduction to the IBM Monitoring and Diagnostics tools Delfino 4102 17:15-18:15 Efficiency Gains from Java Packed Objects TBD Tuesday, 29-April: 14:15-15:15 Meet the Experts: IBM WebSphere Performance San Polo 3501B 17:00-18:00 Meet the Experts: IBM WebSphere Troubleshooting Panel San Polo 3501B Wednesday, 30-April: 13:00-14:00 Multitenancy and the Multi-Tenant JVM Delfino 4103 14:15-15:15 Performance Optimization Using IBM Java on z/OS & IBM WebSphere Application Server on z/OS V8.5.5 Lando 4301B 17:00-18:00 Understand & Improve the Performance of Your Application Delfino 4105 Thursday, 01-May: 09:00-11:30 Lab: Diagnostic and Performance Tools for WebSphere Murano 3205 Other Java Related Sessions
  38. 38. 38 Where to find more information  IBM Monitoring and Diagnostic Tools for Java™ on developerWorks http://www.ibm.com/developerworks/java/jdk/tools/  IBM Support Assistant (ISA) http://www.ibm.com/software/support/isa  Email javatool@uk.ibm.com
  39. 39. Questions?
  40. 40. 40 We Value Your Feedback Don’t forget to submit your Impact session and speaker feedback! Your feedback is very important to us – we use it to continually improve the conference. Use the Conference Mobile App or the online Agenda Builder to quickly submit your survey • Navigate to “Surveys” to see a view of surveys for sessions you’ve attended 40
  41. 41. Thank You
  42. 42. 42 Legal Disclaimer • © IBM Corporation 2014. All Rights Reserved. • The information contained in this publication is provided for informational purposes only. While efforts were made to verify the completeness and accuracy of the information contained in this publication, it is provided AS IS without warranty of any kind, express or implied. In addition, this information is based on IBM’s current product plans and strategy, which are subject to change by IBM without notice. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this publication or any other materials. Nothing contained in this publication is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software. • References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates. Product release dates and/or capabilities referenced in this presentation may change at any time at IBM’s sole discretion based on market opportunities or other factors, and are not intended to be a commitment to future product or feature availability in any way. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results. • If the text contains performance statistics or references to benchmarks, insert the following language; otherwise delete: Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user's job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here. • If the text includes any customer examples, please confirm we have prior written approval from such customer and insert the following language; otherwise delete: All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. • Please review text for proper trademark attribution of IBM products. At first use, each product name must be the full name and include appropriate trademark symbols (e.g., IBM Lotus® Sametime® Unyte™). Subsequent references can drop “IBM” but should include the proper branding (e.g., Lotus Sametime Gateway, or WebSphere Application Server). Please refer to http://www.ibm.com/legal/copytrade.shtml for guidance on which trademarks require the ® or ™ symbol. Do not use abbreviations for IBM product names in your presentation. All product names must be used as adjectives rather than nouns. Please list all of the trademarks that you use in your presentation as follows; delete any not included in your presentation. IBM, the IBM logo, Lotus, Lotus Notes, Notes, Domino, Quickr, Sametime, WebSphere, UC2, PartnerWorld and Lotusphere are trademarks of International Business Machines Corporation in the United States, other countries, or both. Unyte is a trademark of WebDialogs, Inc., in the United States, other countries, or both. • If you reference Adobe® in the text, please mark the first use and include the following; otherwise delete: Adobe, the Adobe logo, PostScript, and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States, and/or other countries. • If you reference Java™ in the text, please mark the first use and include the following; otherwise delete: Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. • If you reference Microsoft® and/or Windows® in the text, please mark the first use and include the following, as applicable; otherwise delete: Microsoft and Windows are trademarks of Microsoft Corporation in the United States, other countries, or both. • If you reference Intel® and/or any of the following Intel products in the text, please mark the first use and include those that you use as follows; otherwise delete: Intel, Intel Centrino, Celeron, Intel Xeon, Intel SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. • If you reference UNIX® in the text, please mark the first use and include the following; otherwise delete: UNIX is a registered trademark of The Open Group in the United States and other countries. • If you reference Linux® in your presentation, please mark the first use and include the following; otherwise delete: Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others. • If the text/graphics include screenshots, no actual IBM employee names may be used (even your own), if your screenshots include fictitious company names (e.g., Renovations, Zeta Bank, Acme) please update and insert the following; otherwise delete: All references to [insert fictitious company name] refer to a fictitious company and are used for illustration purposes only.

×