Memory issues in production systems. Production system Restricted access Application, DB, Application server, log files Debugging, monitoring Investigation.

Slides:



Advertisements
Similar presentations
DynaTrace Platform.
Advertisements

Java Virtual Machine Profiling
Enhancing Application Performance Root Causes and Quick Solutions.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Keeping our websites running - troubleshooting with Appdynamics Benoit Villaumie Lead Architect Guillaume Postaire Infrastructure Manager.
Memory Leak WEBLOGIC SERVER.  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best Practices.
1 Maximize Java Performance by using YOURKIT with uPortal development Faizan Ahmed – Sr. Application Developer.
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
1 Frameworks. 2 Framework Set of cooperating classes/interfaces –Structure essential mechanisms of a problem domain –Programmer can extend framework classes,
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
1 External Sorting for Query Processing Yanlei Diao UMass Amherst Feb 27, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
Check Disk. Disk Defragmenter Using Disk Defragmenter Effectively Run Disk Defragmenter when the computer will receive the least usage. Educate users.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
Windows Server 2008 Chapter 11 Last Update
Presenter: Chi-Hung Lu 1. Problems Distributed applications are hard to validate Distribution of application state across many distinct execution environments.
 What I hate about you things people often do that hurt their Web site’s chances with search engines.
External Sorting Chapter 13.. Why Sort? A classic problem in computer science! Data requested in sorted order  e.g., find students in increasing gpa.
Page 1 © 2001 Hewlett-Packard Company Tools for Measuring System and Application Performance Introduction GlancePlus Introduction Glance Motif Glance Character.
Memory Leak Overview and Tools. AGENDA  Overview of Java Heap  What is a Memory Leak  Symptoms of Memory Leaks  How to troubleshoot  Tools  Best.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
2 Copyright © 2006, Oracle. All rights reserved. Performance Tuning: Overview.
Selenium automated testing in Openbravo ERP Quality Assurance Webinar April 8th, 2010.
Web/App Performance How to keep you out of the News
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
JA-SIG 12/4/20051 JMX For Monitoring and Maintenance JA-SIG - December 4, 2005 – Atlanta, GA Eric Dalquist Division of Information Technology University.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Open Source Performance Monitoring Tools, Tips and Tricks for Java Matt Secoske Consultant - Bass & Associates
BW Know-How Call : Performance Tuning dial-in phone numbers! U.S. Toll-free: (877) International: (612) Passcode: “BW”
Sustainability: Web Site Statistics Marieke Napier UKOLN University of Bath Bath, BA2 7AY UKOLN is supported by: URL
Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com.
Installing, Configuring And Troubleshooting Coldfusion Mark A Kruger CFG Ryan Stille CF Webtools.
The huge amount of resources available in the Grids, and the necessity to have the most up-to-date experimental software deployed in all the sites within.
Problem of the Day  Why are manhole covers round?
© 2006 IBM Corporation Agile Planning Web UI. © 2006 IBM Corporation Agenda  Overview of APT Web UI  Current Issues  Required Infrastructure  API.
Title Line Subtitle Line Top of Content Box Line Top of Footer Line Left Margin LineRight Margin Line Top of Footer Line Top of Content Box Line Subtitle.
(Java) CA Client Libraries Status Matej Šekoranja
15/06/2006 The Future of Visual DCT EPICS Collaboration 2006 Argonne National Laboratory
A New Approach to Java Clients Robert Buffone Chief Architect Nexaweb Technologies By
Introduction to JavaScript CS101 Introduction to Computing.
 Registry itself is easy and straightforward in implementation  The objects of registry are actually complicated to store and manage  Objects of Registry.
© 2006, National Research Council Canada © 2006, IBM Corporation Solving performance issues in OTS-based systems Erik Putrycz Software Engineering Group.
Performance Tuning ColdFusion Before the JVM Chris Peterson.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Java Monitoring Java monitoring using Glassfish, JMX, Glassbox and JConsole by Greg Heithaus.
Plug-In Architecture Pattern. Problem The functionality of a system needs to be extended after the software is shipped The set of possible post-shipment.
#SummitNow Inspecting Alfresco – Tools and Techniques Nathan McMinn Technical Consultant - Alfresco.
Beyond Application Profiling to System Aware Analysis Elena Laskavaia, QNX Bill Graham, QNX.
A deep dive into SQL Server Plan Cache Management.
3 Important Performance tracking tools in an Android Application Development Workflow Here are 3 tools every Android application developer should familiarize.
Memory Management for Android Apps Min Ji, Kim Embedded Software Lab.
Java performance mistakes
Outline Introduction. Changes made to the Tycho design from last time (June 2005). Example Tycho setup. Tycho benchmark motivations and methodology. Some.
HERON.
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Visual Designer – Tips and Tricks
Software Architecture in Practice
Flight Recorder in OpenJDK
Exploring Java Heap Dumps
Marcos Freccia Stop everything! Top T-SQL tricks to a developer
Chapter 12: Automated data collection methods
PerfView Measure and Improve Your App’s Performance for Free
ColdFusion Performance Troubleshooting and Tuning
Adaptive Code Unloading for Resource-Constrained JVMs
Testing, debugging, and using support libraries
Dongyun Jin, Patrick Meredith, Dennis Griffith, Grigore Rosu
Memory Leaks in Blink Photo © 2011 J. Ronald Lee.
AEM Operations Dec 2017.
Java Virtual Machine Profiling. Agenda Introduction JVM overview Performance concepts Monitoring Profiling VisualVM demo Tuning Conclusions.
Plug-In Architecture Pattern
Presentation transcript:

Memory issues in production systems

Production system Restricted access Application, DB, Application server, log files Debugging, monitoring Investigation should not affect users Reproducing memory issue is not the best idea

Memory leaks What is memory leak java.lang.OutOfMemory: heap size other symptoms - extensive garbage collection Hard to discover Users don't recognize it Hard to investigate Few information Sometimes hard to fix Design issues

Investigation of memory issues Log files application logs, access logs, gc logs Monitoring behavior of running application JConsole Heap dump Analysis JHAT, MAT, Netbeans

Log files Motivation find issues find patterns leading to issues Problems combining different logs (access log, application log) bad visibility of root cause – not visible or hidden in big amount of minor issues memory problems trigger only few types of messages

Investigating log files Application logs Log free memory once per minute Access logs Analysis of traffic and business use cases GC logs Show problems with GC (stop the world)

Monitoring via JMX Tools JConsole Motivation More information than in logs Monitoring tests Problems Not always applicable on production system (security reasons) Test might not cover all scenarios

Heap dump analysis Tools JMAP, JHAT, MAT, Netbeans Motivation Offline investigation of behavior during specific time frame Comparison of different heap dumps Problems Access to heap dumps (security)

Creating Heap dump jmap -dump:live,format=b,file=heap.dump Part of JDK Used to create heap dump on demand JVM parameters -XX:+HeapDumpOnOutOfMemoryError - XX:HeapDumpPath=/directory/subdirectory Produces file java_pid.hprof Used for production system, creates heap dump when OutOfMemory is thrown

Tools for heap dump analysis JHAT Part of JDK 6 Running as web application IDE Netbeans, MAT (Eclipse plugin) Commercial tools

Heap dump analysis - JHAT Heap Histogram List of classes with number of instances and used memory Referrers vs Referees Navigating in object graph Example: Form → String → [c

Heap dump analysis – Netbeans, MAT Dominator tree Object x dominates object y if every path in object graph from root to y goes through x Shallow vs Retained heap Shallow heap is memory used by object Retained set of X is set of objects which would be removed by GC if X is removed by GC Retained heap is sum of shallow heap in retained set Other queries Leak suspects Top consumers

Heap dump Analysis - OQL Object query Language Different dialect for each tool JHAT  Simple SQL combined with javascript  callback functions MAT  More SQL like (Subquery, union, distinct)  Predefined functions (dominator)

OQL Examples JHAT select heap.findClass('org.apache.catalina.util.ServerInfo').statics.serverNumber.toString() MAT SELECT serverNumber.toString() FROM OBJECTS org.apache.catalina.util.ServerInfo

Experiences Bugs Incorrect usage of external libraries or frameworks Design issues

Bugs

Usage of frameworks Hibernate Short time usage of big amount of memory Too big first level cache Good understanding of framework is a must

Design Issues Overused session scope Big pages Big buffer in page context Page context referenced by tag handlers Heavy load causes big memory usage Fix might require changing use cases Reusing functionality

Interesting links OQL help for JHAT Standalone MAT