Java Memory Management

Size: px
Start display at page:

Download "Java Memory Management"

Transcription

1 Java Memory Management Margus Pala Java Fundamentals

2 Agenda JVM memory Different garbage collectors References

3 Memory management in general Physical memory Swap space (page file) Virtual memory Each process has its own virtual address space OS will map virtual addresses to physical and swap Single virtual address maps to zero, one, or more than one physical address. Reserving memory does not mean actually allocating

4 JVM memory Address space Heap Non-heap or Native Heap and GC management Just-in-time (JIT) compiler JNI code and allocations Direct Byte Buffers Stack PermGen/metaspace

5 JVM memory II Heap Area for user objects Stack Per thread Local variables (reference and primitive) Call stack PermGen/MetaSpace All in one address space

6 JVM memory options -Xms512m Initial size of heap -Xmx1024m Maximum size of heap, the amount of address space that is reserved (not allocated) on startup. Heap can not grow larger than this. -XX:MaxPermSize=256m -Xss16m Max stack size

7 Garbage collection Opposite of manual memory management Objects are allocated from heap Allocated space is reclaimed automatically Object can be collected when there are no more references to it Usually no way to explicitly deallocate object GC comes and goes as it pleases

8 Good about GC Avoid bugs Avoids forgetting to free the memory Avoids double freeing memory Avoids using the already freed memory In Java No direct memory access Can't accidentally overwrite unrelated stack or heap regions.

9 Bad about GC Consumes resources No way to control Can cause unpredictable stalls A bit like magic

10 GC cost Stop the world GC may need to stop all other threads Long pauses hurt responsiveness GC takes longer with larger heaps

11 GC basics Basic principle Find objects that can not be accessed in the future Reclaim resources Reference counting What about circular references? Reachability Root set Active threads Local variables in main method Static variables in main class JNI References

12 Mark and sweep Starting from a "root set" mark all reachable objects Sweep all non-reachable objects Used by many real collectors Causes fragmentation and needs compacting

13 Fragmentation and compacting Fragmentation Happens when some objects are deleted Makes allocating memory expensive Free lists Compacting Usually done in every GC cycle Makes pauses longer Compact when fragmentation over limit Compact until fragmentation acceptable

14 Copying collector Typically collector has two areas active space and idle space Objects allocated to active space When full Move live objects from active space to idle space switch active space and idle space Repeat process Very efficient with small amount of live objects

15 Serial collector Simplest collector Both old and young Stop the world Single thread Compacting

16 Parallel collector Both old and young Best throughput Stop the world Multiple mark and sweep threads Compacting

17 Concurrent Mark and Sweep How it works Stop, mark roots alive Concurrently mark objects Stop, mark new objects Disadvantages Memory allocation errors if allocated space runs out More CPU cycles needed Complex to finetune

18 Concurrent Mark and Sweep Does not compact Concurrent mode failure Concurrent collection didn't finish before old generation got full Will trigger stop the world collection with serial collector Can also happen because of fragmentation You don't want this to happen

19 Generational GC Based on real world observation that most objects are short lived Memory regions Eden/Nursery objects start here Survivor object has survived first collection Tenured/Old long lived objects

20 Generational GC Usually new generation is small compared to old Objects get promoted from newer to older not vice versa Different collection strategies for generations

21 Oracle Hotspot generational GC Areas Eden 2x survivor Tenured New in Eden Copied to survivor and tenured Tenured M&S&C

22 G1 collector Garbage first Low pause, high throughput collector Concurrent and compacting Heap is partitioned into regions Global concurrent mark Collects mostly empty regions first Meets user defined pause times with high probability

23 IBM WebSphere GC Areas Nursery Allocate Survivor (same size as Allocate) Tenured New created in Allocate Large objects in non-generational or tenured Classes in heap

24 Oracle JRockit GC Keep area in the nursery. Start allocating outside the keep area Keep all objects in the keep area All live objects outside keep promoted to tenured Simple and efficient Only one copy Young area larger than others

25 Hotspot GC flags -XX:UseSerialGC is "Serial" + "Serial Old" -XX:UseParNewGC is "ParNew" + "Serial Old" -XX:UseParallelOldGC is "Parallel Scavenge" + "Parallel Old" -XX:UseParallelGC is "Parallel Scavenge" + "Serial Old" -XX:UseConcMarkSweepGC is "ParNew" + "CMS" + "Serial Old"

26 Hotspot GC flags A lot of options to tune various aspects (generation sizes, pause times etc.) For default values run: java -XX:+UnlockDiagnosticVMOptions -XX: +PrintFlagsFinal -version

27 To put it simply All new allocation happens in eden (unless the object is really large) Allocation is cheap When eden fills up, stop the world copy collection into the survivor space Freeing dead objects has zero cost After several collections survivors get promoted to the old generation Old generation GC is the expensive one

28 Monitoring GC Jconsole graphical tool Jps get pids of running java processes Jstat show info about running jvm jstat -gcutil s S0 S1 E O P YGC YGCT FGC FGCT GCT

29 Monitoring GC -verbose:gc -XX:+PrintGCTimeStamps -XX: +PrintGCDetails Why is my application not responding? : [Full GC : [Tenured: K- >826236K(903872K), secs] K- >826236K( K), [Perm : K->572671K(572672K)], secs] [Times: user=4.72 sys=5.59, real= secs] : [Full GC [PSYoungGen: K->76103K(334144K)] [PSOldGen: K->903868K(903872K)] K- >979971K( K) [PSPermGen: K->615356K(729472K)], secs] [Times: user=2.06 sys=0.00, real=2.03 secs]

30 Heap dumps What happens when you run out of memory? -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/dumps jmap -dump:file=format=b,dump.bin pid Eclipse memory analyzer jvisualvm

31 DO NOT USE IT Finalization finalize method is called before object is collected finalize is called only once for each object No guarantees when or whether objects are finalized GC overhead

32 Finalization public class Test public void finalize() { System.out.println("i'm dead"); } }

33 Finalization public class Test { static Test public void finalize() { test = this; System.out.println("i refuse to die"); } }

34 References Strong reference Regular reference Soft reference Can be used for caches, guaranteed to be cleared before OutOfMemoryError is thrown Weak reference Keep reference without preventing GC from collecting referenced object Phantom reference

35 Soft reference import java.lang.ref.softreference; public class SoftCache<T> { private SoftReference<T> ref; public void set(t t) { ref = new SoftReference<T>(t); } public T get() { return ref.get(); } }

36 Weak reference public class WeakTest { //run with -verbose:gc public static void main(string... args) { WeakReference<Object> ref = new WeakReference<Object>(new Object()); for (int i = 0; ref.get()!= null; i++) { System.out.println(i); } } }

37 Which one works? obj = wr.get(); if (obj == null) { wr = new WeakReference(recreateIt()); //1 obj = wr.get(); //2 } obj = wr.get(); if (obj == null) { obj = recreateit(); //3 wr = new WeakReference(obj); //4 }

38 Phantom reference PhantomReference Phantom reference may not be retrieved: The get method of a phantom reference always returns null. An object that is reachable via phantom references will remain so until all such references are cleared or themselves become unreachable. ReferenceQueue Reference will be added there when referent is collected PhantomReference always needs ReferenceQueue

39 Phantom reference import java.lang.ref.phantomreference; import java.lang.ref.referencequeue; public class MyRef<T> extends PhantomReference<T> { int x; public MyRef(T referent, int x, ReferenceQueue<T> q) { super(referent, q); this.x = x; } public String tostring() { return "MyRef[" + x + "]"; } }

40 Phantom reference 2 import java.lang.ref.reference; import java.lang.ref.referencequeue; public class PhantomTest { //run with -verbose:gc -Xmx2m public static void main(string... args) { final ReferenceQueue<Object> rq = new ReferenceQueue<Object>(); MyRef<Object> myref = new MyRef<Object>(new Object(), 8, rq); Reference<?> ref = null; for (int i = 0; (ref = rq.poll()) == null; i++) { System.out.println(i); // just to cause gc new Long(System.currentTimeMillis()).toString(); } System.out.println("collected " + ref); } }

41 Data structures WeakHashMap HashMap with weak keys (values are strong) No WeakIdentityHashMap in JDK ReferenceQueue Reference will be added there when referent is collected

42 Homework Calculating Fibonacci numbers Deadline is one week as usual This problem could be solved more efficiently and with less effort, though it would defeat the purpose of this exercise

43 Homework public class Fib1 { public static BigInteger fib(long n) { if (n == 0 n == 1) return BigInteger.ONE; BigInteger result = fib(n - 1).add(fib(n - 2)); return result; } public static void main(string... args) { int i = 0; BigInteger result = null; for (i = 0; i < ; i++) { // long start = System.currentTimeMillis(); result = fib(i); // long end = System.currentTimeMillis(); // System.out.println(i + " " + result + " " + (end - start)); } System.out.println("done"); } }

44 Homework Unfortunately this takes forever to run. As the same numbers are computed again and again caching would help. If I just cache all computed values in a HashMap then this will take a lot of memory, but I want to run it with -Xmx64m. Implement a cache based on one appropriate Reference type (PhantomReference, SoftReference or WeakReference) that would make this run fast with reasonable amount of memory. Template is added to homework9 in jf-skeleton, you only need to implement the MyCache class.

45 Internet references Java native memory Garbage collection Hotspot VM Options References

2 2011 Oracle Corporation Proprietary and Confidential

2 2011 Oracle Corporation Proprietary and Confidential The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material,

More information

Java Performance Tuning

Java Performance Tuning Summer 08 Java Performance Tuning Michael Finocchiaro This white paper presents the basics of Java Performance Tuning for large Application Servers. h t t p : / / m f i n o c c h i a r o. w o r d p r e

More information

Java Garbage Collection Basics

Java Garbage Collection Basics Java Garbage Collection Basics Overview Purpose This tutorial covers the basics of how Garbage Collection works with the Hotspot JVM. Once you have learned how the garbage collector functions, learn how

More information

Memory Management in the Java HotSpot Virtual Machine

Memory Management in the Java HotSpot Virtual Machine Memory Management in the Java HotSpot Virtual Machine Sun Microsystems April 2006 2 Table of Contents Table of Contents 1 Introduction.....................................................................

More information

Garbage Collection in the Java HotSpot Virtual Machine

Garbage Collection in the Java HotSpot Virtual Machine http://www.devx.com Printed from http://www.devx.com/java/article/21977/1954 Garbage Collection in the Java HotSpot Virtual Machine Gain a better understanding of how garbage collection in the Java HotSpot

More information

Java Troubleshooting and Performance

Java Troubleshooting and Performance Java Troubleshooting and Performance Margus Pala Java Fundamentals 08.12.2014 Agenda Debugger Thread dumps Memory dumps Crash dumps Tools/profilers Rules of (performance) optimization 1. Don't optimize

More information

Troubleshoot the JVM like never before. JVM Troubleshooting Guide. Pierre-Hugues Charbonneau Ilias Tsagklis

Troubleshoot the JVM like never before. JVM Troubleshooting Guide. Pierre-Hugues Charbonneau Ilias Tsagklis Troubleshoot the JVM like never before JVM Troubleshooting Guide Pierre-Hugues Charbonneau Ilias Tsagklis Table of Contents Oracle HotSpot JVM Memory...3 Java HotSpot VM Heap space...3 Java HotSpot VM

More information

Garbage Collection in NonStop Server for Java

Garbage Collection in NonStop Server for Java Garbage Collection in NonStop Server for Java Technical white paper Table of contents 1. Introduction... 2 2. Garbage Collection Concepts... 2 3. Garbage Collection in NSJ... 3 4. NSJ Garbage Collection

More information

USE IMPROVE EVANGELIZE. JVM Internals, 0.75. Stefan Parvu System Administrator. http://www.nbl.fi/stefan.parvu

USE IMPROVE EVANGELIZE. JVM Internals, 0.75. Stefan Parvu System Administrator. http://www.nbl.fi/stefan.parvu JVM Internals, 0.75 Stefan Parvu System Administrator http://www.nbl.fi/stefan.parvu License, copyrights COPYRIGHT: Copyright (c) 2008 Stefan Parvu The contents of this file are subject to the terms of

More information

Angelika Langer www.angelikalanger.com. The Art of Garbage Collection Tuning

Angelika Langer www.angelikalanger.com. The Art of Garbage Collection Tuning Angelika Langer www.angelikalanger.com The Art of Garbage Collection Tuning objective discuss garbage collection algorithms in Sun/Oracle's JVM give brief overview of GC tuning strategies GC tuning (2)

More information

Introduction to Spark and Garbage Collection

Introduction to Spark and Garbage Collection Tuning Java Garbage Collection for Spark Applications May 28, 2015 by Daoyuan Wang and Jie Huang This is a guest post from our friends in the SSG STO Big Data Technology group at Intel. Join us at the

More information

Extreme Performance with Java

Extreme Performance with Java Extreme Performance with Java QCon NYC - June 2012 Charlie Hunt Architect, Performance Engineering Salesforce.com sfdc_ppt_corp_template_01_01_2012.ppt In a Nutshell What you need to know about a modern

More information

Using jvmstat and visualgc to Solve Memory Management Problems

Using jvmstat and visualgc to Solve Memory Management Problems Using jvmstat and visualgc to Solve Memory Management Problems java.sun.com/javaone/sf 1 Wally Wedel Sun Software Services Brian Doherty Sun Microsystems, Inc. Analyze JVM Machine Memory Management Problems

More information

The Fundamentals of Tuning OpenJDK

The Fundamentals of Tuning OpenJDK The Fundamentals of Tuning OpenJDK OSCON 2013 Portland, OR Charlie Hunt Architect, Performance Engineering Salesforce.com sfdc_ppt_corp_template_01_01_2012.ppt In a Nutshell What you need to know about

More information

Java Performance. Adrian Dozsa TM-JUG 18.09.2014

Java Performance. Adrian Dozsa TM-JUG 18.09.2014 Java Performance Adrian Dozsa TM-JUG 18.09.2014 Agenda Requirements Performance Testing Micro-benchmarks Concurrency GC Tools Why is performance important? We hate slow web pages/apps We hate timeouts

More information

Tools in the Box. Quick overview on helpful tools in the JDK and use cases for them. Florin Bunau dev@tora

Tools in the Box. Quick overview on helpful tools in the JDK and use cases for them. Florin Bunau dev@tora Tools in the Box Quick overview on helpful tools in the JDK and use cases for them. Florin Bunau dev@tora http://docs.oracle.com/javase/7/docs/technotes/tools/ - No new tool in Java 7, very few changes

More information

Understanding Java Garbage Collection

Understanding Java Garbage Collection TECHNOLOGY WHITE PAPER Understanding Java Garbage Collection And What You Can Do About It Table of Contents Executive Summary... 3 Introduction.... 4 Why Care About the Java Garbage Collector?.... 5 Classifying

More information

Debugging Java performance problems. Ryan Matteson matty91@gmail.com http://prefetch.net

Debugging Java performance problems. Ryan Matteson matty91@gmail.com http://prefetch.net Debugging Java performance problems Ryan Matteson matty91@gmail.com http://prefetch.net Overview Tonight I am going to discuss Java performance, and how opensource tools can be used to debug performance

More information

Java Garbage Collection Characteristics and Tuning Guidelines for Apache Hadoop TeraSort Workload

Java Garbage Collection Characteristics and Tuning Guidelines for Apache Hadoop TeraSort Workload Java Garbage Collection Characteristics and Tuning Guidelines for Apache Hadoop TeraSort Workload Shrinivas Joshi, Software Performance Engineer Vasileios Liaskovitis, Performance Engineer 1. Introduction

More information

MID-TIER DEPLOYMENT KB

MID-TIER DEPLOYMENT KB MID-TIER DEPLOYMENT KB Author: BMC Software, Inc. Date: 23 Dec 2011 PAGE 1 OF 16 23/12/2011 Table of Contents 1. Overview 3 2. Sizing guidelines 3 3. Virtual Environment Notes 4 4. Physical Environment

More information

Performance Monitoring and Tuning. Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013

Performance Monitoring and Tuning. Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013 Performance Monitoring and Tuning Liferay Chicago User Group (LCHIUG) James Lefeu 29AUG2013 Outline I. Definitions II. Architecture III.Requirements and Design IV.JDK Tuning V. Liferay Tuning VI.Profiling

More information

JVM Garbage Collector settings investigation

JVM Garbage Collector settings investigation JVM Garbage Collector settings investigation Tigase, Inc. 1. Objective Investigate current JVM Garbage Collector settings, which results in high Heap usage, and propose new optimised ones. Following memory

More information

Holly Cummins IBM Hursley Labs. Java performance not so scary after all

Holly Cummins IBM Hursley Labs. Java performance not so scary after all Holly Cummins IBM Hursley Labs Java performance not so scary after all So... You have a performance problem. What next? Goals After this talk you will: Not feel abject terror when confronted with a performance

More information

Recent Advances in Financial Planning and Product Development

Recent Advances in Financial Planning and Product Development Memory Management in Java and Ada Language for safety software development SARA HOSSEINI-DINANI, MICHAEL SCHWARZ & JOSEF BÖRCSÖK Computer Architecture & System Programming University Kassel Wilhelmshöher

More information

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra

JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra JVM Performance Study Comparing Oracle HotSpot and Azul Zing Using Apache Cassandra January 2014 Legal Notices Apache Cassandra, Spark and Solr and their respective logos are trademarks or registered trademarks

More information

How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com

How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com How to create/avoid memory leak in Java and.net? Venkat Subramaniam venkats@durasoftcorp.com http://www.durasoftcorp.com Abstract Java and.net provide run time environment for managed code, and Automatic

More information

Practical Performance Understanding the Performance of Your Application

Practical Performance Understanding the Performance of Your Application Neil Masson IBM Java Service Technical Lead 25 th September 2012 Practical Performance Understanding the Performance of Your Application 1 WebSphere User Group: Practical Performance Understand the Performance

More information

Effective Java Programming. measurement as the basis

Effective Java Programming. measurement as the basis Effective Java Programming measurement as the basis Structure measurement as the basis benchmarking micro macro profiling why you should do this? profiling tools Motto "We should forget about small efficiencies,

More information

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc.

Tuning WebSphere Application Server ND 7.0. Royal Cyber Inc. Tuning WebSphere Application Server ND 7.0 Royal Cyber Inc. JVM related problems Application server stops responding Server crash Hung process Out of memory condition Performance degradation Check if the

More information

Java Garbage Collection Best Practices for Sizing and Tuning the Java Heap

Java Garbage Collection Best Practices for Sizing and Tuning the Java Heap IBM Software Group Java Garbage Collection Best Practices for Sizing and Tuning the Java Heap Chris Bailey WebSphere Support Technical Exchange Objectives Overview Selecting the Correct GC Policy Sizing

More information

JBoss Data Grid Performance Study Comparing Java HotSpot to Azul Zing

JBoss Data Grid Performance Study Comparing Java HotSpot to Azul Zing JBoss Data Grid Performance Study Comparing Java HotSpot to Azul Zing January 2014 Legal Notices JBoss, Red Hat and their respective logos are trademarks or registered trademarks of Red Hat, Inc. Azul

More information

Advanced Liferay Architecture: Clustering and High Availability

Advanced Liferay Architecture: Clustering and High Availability Advanced Liferay Architecture: Clustering and High Availability Revision 1.1, Oct 2010 *Note: All of the configuration examples in 3 rd -party software (i.e. Apache, Sun Java) in this document are examples

More information

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING

THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING THE BUSY DEVELOPER'S GUIDE TO JVM TROUBLESHOOTING November 5, 2010 Rohit Kelapure HTTP://WWW.LINKEDIN.COM/IN/ROHITKELAPURE HTTP://TWITTER.COM/RKELA Agenda 2 Application Server component overview Support

More information

Tomcat Tuning. Mark Thomas April 2009

Tomcat Tuning. Mark Thomas April 2009 Tomcat Tuning Mark Thomas April 2009 Who am I? Apache Tomcat committer Resolved 1,500+ Tomcat bugs Apache Tomcat PMC member Member of the Apache Software Foundation Member of the ASF security committee

More information

enterprise professional expertise distilled

enterprise professional expertise distilled Oracle JRockit The Definitive Guide Develop and manage robust Java applications with Oracle's high-performance Java Virtual Machine Marcus Hirt Marcus Lagergren PUBLISHING enterprise professional expertise

More information

Jonathan Worthington Scarborough Linux User Group

Jonathan Worthington Scarborough Linux User Group Jonathan Worthington Scarborough Linux User Group Introduction What does a Virtual Machine do? Hides away the details of the hardware platform and operating system. Defines a common set of instructions.

More information

Hadoop Memory Usage Model

Hadoop Memory Usage Model Hadoop Memory Usage Model Lijie Xu xulijie9@otcaix.iscas.ac.cn Technical Report Institute of Software, Chinese Academy of Sciences November 15, 213 Abstract Hadoop MapReduce is a powerful open-source framework

More information

Azul Pauseless Garbage Collection

Azul Pauseless Garbage Collection TECHNOLOGY WHITE PAPER Azul Pauseless Garbage Collection Providing continuous, pauseless operation for Java applications Executive Summary Conventional garbage collection approaches limit the scalability

More information

JBoss Cookbook: Secret Recipes. David Chia Senior TAM, JBoss May 5 th 2011

JBoss Cookbook: Secret Recipes. David Chia Senior TAM, JBoss May 5 th 2011 JBoss Cookbook: Secret Recipes David Chia Senior TAM, JBoss May 5 th 2011 Secret Recipes Byteman Cluster and Load Balancing Configuration Generator Troubleshooting High CPU Mocking a JBoss Hang State Byte

More information

General Introduction

General Introduction Managed Runtime Technology: General Introduction Xiao-Feng Li (xiaofeng.li@gmail.com) 2012-10-10 Agenda Virtual machines Managed runtime systems EE and MM (JIT and GC) Summary 10/10/2012 Managed Runtime

More information

Validating Java for Safety-Critical Applications

Validating Java for Safety-Critical Applications Validating Java for Safety-Critical Applications Jean-Marie Dautelle * Raytheon Company, Marlborough, MA, 01752 With the real-time extensions, Java can now be used for safety critical systems. It is therefore

More information

Agenda. Tomcat Versions Troubleshooting management Tomcat Connectors HTTP Protocal and Performance Log Tuning JVM Tuning Load balancing Tomcat

Agenda. Tomcat Versions Troubleshooting management Tomcat Connectors HTTP Protocal and Performance Log Tuning JVM Tuning Load balancing Tomcat Agenda Tomcat Versions Troubleshooting management Tomcat Connectors HTTP Protocal and Performance Log Tuning JVM Tuning Load balancing Tomcat Tomcat Performance Tuning Tomcat Versions Application/System

More information

Berlin Mainframe Summit. Java on z/os. 2006 IBM Corporation

Berlin Mainframe Summit. Java on z/os. 2006 IBM Corporation Java on z/os Martina Schmidt Agenda Berlin Mainframe Summit About the mainframe Java runtime environments under z/os For which applications should I use a mainframe? Java on z/os cost and performance Java

More information

CSCI E 98: Managed Environments for the Execution of Programs

CSCI E 98: Managed Environments for the Execution of Programs CSCI E 98: Managed Environments for the Execution of Programs Draft Syllabus Instructor Phil McGachey, PhD Class Time: Mondays beginning Sept. 8, 5:30-7:30 pm Location: 1 Story Street, Room 304. Office

More information

Java Debugging Ľuboš Koščo

Java Debugging Ľuboš Koščo Java Debugging Ľuboš Koščo Solaris RPE Prague Agenda Debugging - the core of solving problems with your application Methodologies and useful processes, best practices Introduction to debugging tools >

More information

Top 10 Issues for Java in Production. SriSatish Ambati Cliff Click Jr. Azul Systems, Inc

Top 10 Issues for Java in Production. SriSatish Ambati Cliff Click Jr. Azul Systems, Inc Top 10 Issues for Java in Production SriSatish Ambati Cliff Click Jr. Azul Systems, Inc A Decade of Java in Production A lot of hard-earned wisdom A lot of victories (quickly forgotten) A lot of endless

More information

Liferay Performance Tuning

Liferay Performance Tuning Liferay Performance Tuning Tips, tricks, and best practices Michael C. Han Liferay, INC A Survey Why? Considering using Liferay, curious about performance. Currently implementing and thinking ahead. Running

More information

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu

A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu A Practical Method to Diagnose Memory Leaks in Java Application Alan Yu 1. Introduction The Java virtual machine s heap stores all objects created by a running Java application. Objects are created by

More information

Programming Language X10 on Multiple JVMs

Programming Language X10 on Multiple JVMs Workshop on the State of Art in Software Research, at UC Irvine Programming Language on Multiple JVMs 2013/05/15 Kiyokuni (KIYO) Kawachiya and Mikio Takeuchi IBM Research - Tokyo This Talk Focuses on Managed

More information

Identifying Performance Bottleneck using JRockit. - Shivaram Thirunavukkarasu Performance Engineer Wipro Technologies

Identifying Performance Bottleneck using JRockit. - Shivaram Thirunavukkarasu Performance Engineer Wipro Technologies Identifying Performance Bottleneck using JRockit - Shivaram Thirunavukkarasu Performance Engineer Wipro Technologies Table of Contents About JRockit Mission Control... 3 Five things to look for in JRMC

More information

Discovering Performance Bottlenecks with the SAP JVM Profiler and SAP Memory Analyzer

Discovering Performance Bottlenecks with the SAP JVM Profiler and SAP Memory Analyzer Discovering Performance Bottlenecks with the SAP JVM Profiler and SAP Memory Analyzer Boris Magocsi Regional Implementation Group (RIG) June 17, 2009 Agenda 1. Tool Overview 2. SAP Memory Analyzer 3. SAP

More information

How To Use Java On An Ipa 2.2.2 (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad 2.3.2 And A Microos 2.5 (Microos)

How To Use Java On An Ipa 2.2.2 (Jspa) With A Microsoft Powerbook (Jempa) With An Ipad 2.3.2 And A Microos 2.5 (Microos) Java Monitoring and Diagnostic Tooling Iris Baron IBM Java JIT on System Z ibaron@ca.ibm.com Session ID: 16182 Insert Custom Session QR if Desired. Java Road Map Java 7.0 Language Updates Java 6.0 SE 5.0

More information

TDA - Thread Dump Analyzer

TDA - Thread Dump Analyzer TDA - Thread Dump Analyzer TDA - Thread Dump Analyzer Published September, 2008 Copyright 2006-2008 Ingo Rockel Table of Contents 1.... 1 1.1. Request Thread Dumps... 2 1.2. Thread

More information

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation

Memory Allocation. Static Allocation. Dynamic Allocation. Memory Management. Dynamic Allocation. Dynamic Storage Allocation Dynamic Storage Allocation CS 44 Operating Systems Fall 5 Presented By Vibha Prasad Memory Allocation Static Allocation (fixed in size) Sometimes we create data structures that are fixed and don t need

More information

Java's garbage-collected heap

Java's garbage-collected heap Sponsored by: This story appeared on JavaWorld at http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html Java's garbage-collected heap An introduction to the garbage-collected heap of the Java

More information

Garbage Collection: Automatic Memory Management in the Microsoft.NET Framework

Garbage Collection: Automatic Memory Management in the Microsoft.NET Framework Garbage Collection: Automatic Memory Management in the Microsoft.NET Framework Jeffrey Richter This article assumes you re familiar with C and C++ Level of Difficulty 1 2 3 SUMMARY Garbage collection in

More information

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation

WebSphere Architect (Performance and Monitoring) 2011 IBM Corporation Track Name: Application Infrastructure Topic : WebSphere Application Server Top 10 Performance Tuning Recommendations. Presenter Name : Vishal A Charegaonkar WebSphere Architect (Performance and Monitoring)

More information

Performance Optimization For Operational Risk Management Application On Azure Platform

Performance Optimization For Operational Risk Management Application On Azure Platform Performance Optimization For Operational Risk Management Application On Azure Platform Ashutosh Sabde, TCS www.cmgindia.org 1 Contents Introduction Functional Requirements Non Functional Requirements Business

More information

14/05/2013 Ed Merks EDL V1.0 1

14/05/2013 Ed Merks EDL V1.0 1 14/05/2013 Ed Merks EDL V1.0 1 Java Performance is Complex Write once run everywhere Java is slow because it s interpreted No, there are Just In Time (JIT) compilers Different hardware and platforms Different

More information

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM

IBM SDK, Java Technology Edition Version 1. IBM JVM messages IBM IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM IBM SDK, Java Technology Edition Version 1 IBM JVM messages IBM Note Before you use this information and the product it supports, read the

More information

Java Interview Questions and Answers

Java Interview Questions and Answers 1. What is the most important feature of Java? Java is a platform independent language. 2. What do you mean by platform independence? Platform independence means that we can write and compile the java

More information

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE

BEAJRockit Mission Control. Using JRockit Mission Control in the Eclipse IDE BEAJRockit Mission Control Using JRockit Mission Control in the Eclipse IDE Mission Control 3.0.2 Document Revised: June, 2008 Contents 1. Introduction Benefits of the Integration................................................

More information

HeapStats: Your Dependable Helper for Java Applications, from Development to Operation

HeapStats: Your Dependable Helper for Java Applications, from Development to Operation : Technologies for Promoting Use of Open Source Software that Contribute to Reducing TCO of IT Platform HeapStats: Your Dependable Helper for Java Applications, from Development to Operation Shinji Takao,

More information

An Oracle White Paper September 2013. Advanced Java Diagnostics and Monitoring Without Performance Overhead

An Oracle White Paper September 2013. Advanced Java Diagnostics and Monitoring Without Performance Overhead An Oracle White Paper September 2013 Advanced Java Diagnostics and Monitoring Without Performance Overhead Introduction... 1 Non-Intrusive Profiling and Diagnostics... 2 JMX Console... 2 Java Flight Recorder...

More information

Profiling Java Applications. Kostis Kapelonis - Agilis SA

Profiling Java Applications. Kostis Kapelonis - Agilis SA Profiling Java Applications Kostis Kapelonis - Agilis SA The need for speed Topics Software Quality with FindBugs Using Jconsole Monitoring with Netbeans 6 Profiling CPU with Netbeans 6 Profiling Memory

More information

Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC.

Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC. Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC. i Fishbowl Solutions Notice The information contained in this document represents

More information

Monitoring Java enviroment / applications

Monitoring Java enviroment / applications Monitoring Java enviroment / applications Uroš Majcen uros@quest-slo.com Java is Everywhere You Can Expect More. Java in Mars Rover With the help of Java Technology, and the Jet Propulsion Laboratory (JPL),

More information

What s Cool in the SAP JVM (CON3243)

What s Cool in the SAP JVM (CON3243) What s Cool in the SAP JVM (CON3243) Volker Simonis, SAP SE September, 2014 Public Agenda SAP JVM Supportability SAP JVM Profiler SAP JVM Debugger 2014 SAP SE. All rights reserved. Public 2 SAP JVM SAP

More information

Robert Honeyman http://www.honeymanit.co.uk rob.honeyman@honeymanit.co.uk

Robert Honeyman http://www.honeymanit.co.uk rob.honeyman@honeymanit.co.uk An Introduction to WebLogic Administration Robert Honeyman http://www.honeymanit.co.uk rob.honeyman@honeymanit.co.uk WEBLOGIC 11G : WHAT IS IT? Weblogic 10.3.3-10.3.6 = 11g Java EE 5 compliant Application

More information

JVM Tool Interface. Michal Pokorný

JVM Tool Interface. Michal Pokorný JVM Tool Interface Michal Pokorný JVM TI Inspect & control execution on JVM (profiling, debugging, monitoring, thread analysis, coverage, ) Higher-level interface: Java Platform Debugger Architecture JVM

More information

Java Coding Practices for Improved Application Performance

Java Coding Practices for Improved Application Performance 1 Java Coding Practices for Improved Application Performance Lloyd Hagemo Senior Director Application Infrastructure Management Group Candle Corporation In the beginning, Java became the language of the

More information

The V8 JavaScript Engine

The V8 JavaScript Engine The V8 JavaScript Engine Design, Implementation, Testing and Benchmarking Mads Ager, Software Engineer Agenda Part 1: What is JavaScript? Part 2: V8 internals Part 3: V8 testing and benchmarking What is

More information

Optimize GlassFish Performance in a Production Environment Performance White Paper February 2009. Abstract

Optimize GlassFish Performance in a Production Environment Performance White Paper February 2009. Abstract Optimize GlassFish Performance in a Production Environment Performance White Paper February 2009 Abstract Sun GlassFish Application Server v2 is a high performance application server. This white paper

More information

The Hotspot Java Virtual Machine: Memory and Architecture

The Hotspot Java Virtual Machine: Memory and Architecture International Journal of Allied Practice, Research and Review Website: www.ijaprr.com (ISSN 2350-1294) The Hotspot Java Virtual Machine: Memory and Architecture Prof. Tejinder Singh Assistant Professor,

More information

Introduction to Java

Introduction to Java Introduction to Java The HelloWorld program Primitive data types Assignment and arithmetic operations User input Conditional statements Looping Arrays CSA0011 Matthew Xuereb 2008 1 Java Overview A high

More information

Java VM monitoring and the Health Center API. William Smith will.smith@uk.ibm.com

Java VM monitoring and the Health Center API. William Smith will.smith@uk.ibm.com Java VM monitoring and the Health Center API William Smith will.smith@uk.ibm.com Health Center overview What problem am I solving? What is my JVM doing? Is everything OK? Why is my application running

More information

How To Improve Performance On An Asa 9.4 Web Application Server (For Advanced Users)

How To Improve Performance On An Asa 9.4 Web Application Server (For Advanced Users) Paper SAS315-2014 SAS 9.4 Web Application Performance: Monitoring, Tuning, Scaling, and Troubleshooting Rob Sioss, SAS Institute Inc., Cary, NC ABSTRACT SAS 9.4 introduces several new software products

More information

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert

Fachbereich Informatik und Elektrotechnik SunSPOT. Ubiquitous Computing. Ubiquitous Computing, Helmut Dispert Ubiquitous Computing Ubiquitous Computing The Sensor Network System Sun SPOT: The Sun Small Programmable Object Technology Technology-Based Wireless Sensor Networks a Java Platform for Developing Applications

More information

Arun Kejariwal. CS229 Project Report

Arun Kejariwal. CS229 Project Report Arun Kejariwal CS229 Project Report Abstract Elasticity of cloud assists in achieving availability of web applicatis by scaling up a cluster as incoming traffic increases and keep operatial costs under

More information

NetBeans Profiler is an

NetBeans Profiler is an NetBeans Profiler Exploring the NetBeans Profiler From Installation to a Practical Profiling Example* Gregg Sporar* NetBeans Profiler is an optional feature of the NetBeans IDE. It is a powerful tool that

More information

Apache Tomcat Tuning for Production

Apache Tomcat Tuning for Production Apache Tomcat Tuning for Production Filip Hanik & Mark Thomas SpringSource September 2008 Copyright 2008 SpringSource. Copying, publishing or distributing without express written permission is prohibited.

More information

Advanced Performance Forensics

Advanced Performance Forensics Advanced Performance Forensics Uncovering the Mysteries of Performance and Scalability Incidents through Forensic Engineering Stephen Feldman Senior Director Performance Engineering and Architecture stephen.feldman@blackboard.com

More information

Can You Trust Your JVM Diagnostic Tools?

Can You Trust Your JVM Diagnostic Tools? Can You Trust Your JVM Diagnostic Tools? Isaac Sjoblom, Tim S. Snyder, and Elena Machkasova Computer Science Discipline University of Minnesota Morris Morris, MN 56267 sjobl014@umn.edu, snyde479@umn.edu,

More information

Production time profiling On-Demand with Java Flight Recorder

Production time profiling On-Demand with Java Flight Recorder Production time profiling On-Demand with Java Flight Recorder Using Java Mission Control & Java Flight Recorder Klara Ward Principal Software Developer Java Platform Group, Oracle Copyright 2015, Oracle

More information

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist 2012 Informatica Corporation. No part of this document may be reproduced or transmitted in any

More information

Fine-Tune Performance of Enterprise Portal 6.0

Fine-Tune Performance of Enterprise Portal 6.0 How to Fine-Tune Performance of Enterprise Portal 6.0 Enterprise Portal 6.0 Public... Applicable Releases: EP 6.0 SP1 July 2003. Table of Contents 1 Introduction... 2 2 Tuning the Operating System... 3

More information

Whitepaper: performance of SqlBulkCopy

Whitepaper: performance of SqlBulkCopy We SOLVE COMPLEX PROBLEMS of DATA MODELING and DEVELOP TOOLS and solutions to let business perform best through data analysis Whitepaper: performance of SqlBulkCopy This whitepaper provides an analysis

More information

Replication on Virtual Machines

Replication on Virtual Machines Replication on Virtual Machines Siggi Cherem CS 717 November 23rd, 2004 Outline 1 Introduction The Java Virtual Machine 2 Napper, Alvisi, Vin - DSN 2003 Introduction JVM as state machine Addressing non-determinism

More information

Java on z/os. Agenda. Java runtime environments on z/os. Java SDK 5 and 6. Java System Resource Integration. Java Backend Integration

Java on z/os. Agenda. Java runtime environments on z/os. Java SDK 5 and 6. Java System Resource Integration. Java Backend Integration Martina Schmidt martina.schmidt@de.ibm.com Agenda Java runtime environments on z/os Java SDK 5 and 6 Java System Resource Integration Java Backend Integration Java development for z/os 4 1 Java runtime

More information

Java in Virtual Machines on VMware ESX: Best Practices

Java in Virtual Machines on VMware ESX: Best Practices Java in Virtual Machines on VMware ESX: Best Practices TABLE OF CONTENTS 1. SUMMARY OF BEST PRACTICES...1 1.1 Java in Virtual Machines on ESX...1 1.2. Running Applications in ESX Virtual Machines...2 2.

More information

Oracle JRockit Mission Control Overview

Oracle JRockit Mission Control Overview Oracle JRockit Mission Control Overview An Oracle White Paper June 2008 JROCKIT Oracle JRockit Mission Control Overview Oracle JRockit Mission Control Overview...3 Introduction...3 Non-intrusive profiling

More information

Enterprise Manager Performance Tips

Enterprise Manager Performance Tips Enterprise Manager Performance Tips + The tips below are related to common situations customers experience when their Enterprise Manager(s) are not performing consistent with performance goals. If you

More information

Monitoring and Managing a JVM

Monitoring and Managing a JVM Monitoring and Managing a JVM Erik Brakkee & Peter van den Berkmortel Overview About Axxerion Challenges and example Troubleshooting Memory management Tooling Best practices Conclusion About Axxerion Axxerion

More information

Java Mission Control

Java Mission Control Java Mission Control Harald Bräuning Resources Main Resource: Java Mission Control Tutorial by Marcus Hirt http://hirt.se/downloads/oracle/jmc_tutorial.zip includes sample projects! Local copy: /common/fesa/jmcexamples/jmc_tutorial.zip

More information

Chapter 3 Operating-System Structures

Chapter 3 Operating-System Structures Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

Trace-Based and Sample-Based Profiling in Rational Application Developer

Trace-Based and Sample-Based Profiling in Rational Application Developer Trace-Based and Sample-Based Profiling in Rational Application Developer This document is aimed at highlighting the importance of profiling in software development and talks about the profiling tools offered

More information

Zing Vision. Answering your toughest production Java performance questions

Zing Vision. Answering your toughest production Java performance questions Zing Vision Answering your toughest production Java performance questions Outline What is Zing Vision? Where does Zing Vision fit in your Java environment? Key features How it works Using ZVRobot Q & A

More information

PTC System Monitor Solution Training

PTC System Monitor Solution Training PTC System Monitor Solution Training Patrick Kulenkamp June 2012 Agenda What is PTC System Monitor (PSM)? How does it work? Terminology PSM Configuration The PTC Integrity Implementation Drilling Down

More information

PC Based Escape Analysis in the Java Virtual Machine

PC Based Escape Analysis in the Java Virtual Machine PC Based Escape Analysis in the Java Virtual Machine Manfred Jendrosch, Gerhard W. Dueck, Charlie Gracie, and AndréHinkenjann Abstract Current computer architectures are multi-threaded and make use of

More information

Performance Improvement In Java Application

Performance Improvement In Java Application Performance Improvement In Java Application Megha Fulfagar Accenture Delivery Center for Technology in India Accenture, its logo, and High Performance Delivered are trademarks of Accenture. Agenda Performance

More information