This presentation was given to the system adminstration team to give them an idea of how GC works and what to look for when there is abottleneck and troubles.
This document discusses JVM tuning and garbage collection. It provides an overview of key JVM flags and garbage collection strategies. It also describes the IDI test case which includes a swing desktop client, wicket web application, mobile web app in development, multiple application servers and frameworks. Hardware choices like CPU architecture and memory are important considerations for performance. The ideal configuration depends on the application's needs in terms of computational intensity and concurrency.
Choosing Right Garbage Collector to Increase Efficiency of Java Memory UsageJelastic Multi-Cloud PaaS
This document discusses various garbage collectors and their performance when used with Java applications. It provides an overview of garbage collectors like G1, Shenandoah, ZGC, OpenJ9, C4, ConcMarkSweep, Serial, Parallel, Epsilon and their configurations and performance. Load testing results of these garbage collectors are presented when run on Jelastic and Kubernetes. Methods to dynamically adjust Java heap size like -XX:SoftMaxHeapSize, -Xsoftmx and dynamic max memory limit are also covered.
The document discusses tuning the Java Virtual Machine (JVM) and garbage collection (GC) to improve performance and prevent issues like memory leaks and out-of-memory errors. It explains how the JVM manages memory using different generations like the young and old generations and different GC algorithms for each. It also provides recommendations on how to select GC settings and monitor performance based on factors like throughput, pause times, and hardware.
This document discusses garbage collection in Java. It begins by explaining the motivation for garbage collection in Java, such as avoiding memory leaks and heap corruption. It then covers the goals of garbage collectors, including minimizing memory overhead, maximizing application throughput while keeping pause times low. Different types of garbage collectors are described, such as serial, parallel, CMS, and G1 collectors. Key concepts like generations, GC roots, and safe points are also summarized.
An introduction into the Garbage First (G1) garbage collector for the JVM. The session covers general GC concepts, the fundamentals of G1 and how to setup and tune the JVM for G1.
This document discusses tuning garbage collection in the Java Virtual Machine. It describes key metrics for measuring garbage collection performance like throughput, footprint, and pause times. Factors that impact these metrics like generation sizing, survivor space ratios, and garbage collector selection are explained. The document also provides guidance on using JVM flags and garbage collection logs to analyze and improve performance.
Introduction of Java GC Tuning and Java Java Mission ControlLeon Chen
This document provides an introduction and overview of Java garbage collection (GC) tuning and the Java Mission Control tool. It begins with information about the speaker, Leon Chen, including his background and patents. It then outlines the Java and JVM roadmap and upcoming features. The bulk of the document discusses GC tuning concepts like heap sizing, generation sizing, footprint vs throughput vs latency. It provides examples and recommendations for GC logging, analysis tools like GCViewer and JWorks GC Web. The document is intended to outline Oracle's product direction and future plans for Java GC tuning and tools.
The document discusses tuning Java for large data workloads. It covers symptoms of memory issues like jobs getting stuck or failing. It then discusses various Java and Hadoop configuration settings to optimize memory usage like mapreduce.child.java.opts and mapreduce.map.memory.mb. Finally, it provides an overview of different garbage collectors in Java and factors like generation sizes and concurrent marking that impact performance.
GC Tuning Confessions Of A Performance EngineerMonica Beckwith
This document provides an overview of garbage collection (GC) tuning and various GC algorithms used in OpenJDK HotSpot. It discusses key concepts like throughput collectors, latency-sensitive collectors, and the tradeoffs between throughput, latency and footprint. Specifically, it summarizes the Parallel Old, CMS and G1 garbage collectors - their goals, techniques used and failure scenarios. It also covers GC tuning concepts like heap configuration, GC logs and metrics.
The document discusses strategies for addressing Metaspace OutOfMemoryErrors (OOM) when redeploying web applications. It recommends monitoring Tomcat logs and memory usage, analyzing heap dumps to find classloader leaks and duplicate classes, and making configuration changes like closing Quartz schedulers and Log4j contexts. Specific issues addressed include leaks caused by third-party JARs like log4j-web and Xerces, and weak references in WeakHashMaps. Stress testing and troubleshooting on a production system found the root cause was an outdated Xerces JAR producing classloader leaks.
This document provides an overview of garbage collection in Java. It begins with an introduction to the presenter Leon Chen and his background. It then discusses Java memory management and garbage collection fundamentals, including the young and old generations, minor and major garbage collections, and how objects are promoted between generations. The document provides examples of garbage collection using diagrams and discusses tuning the Java heap size based on the live data size. It emphasizes the importance of garbage collection logging for performance analysis.
Memory Management: What You Need to Know When Moving to Java 8AppDynamics
This presentation will compare and contrast application behavior in Java 7 with Java 8, particularly focusing on memory management and usage. Several code examples are presented to show how to recognize and respond to common pitfalls.
Nowadays people usually talk more about big data, internet of things, and other buzzwords on various conferences. However, sometimes developers tend to not pay enough attention to the core things such as garbage collection. After having a short discussion with many somewhat experienced Java developers I came to a conclusion that most of them do not know how many garbage collectors there are in the latest JVM, and under what circumstances each of them should be enabled. This presentation is aimed to improve or refresh people’s knowledge on this core topic, and share a real use case when it helped us to resolve production issue.
JCConf 2020 - New Java Features Released in 2020Joseph Kuo
The document discusses new features in Java releases from JDK 13 to JDK 15, including syntax changes like switch expressions and text blocks, API changes like helpful NullPointerExceptions and reimplementing sockets, and improvements to garbage collectors like ZGC and NUMA-aware memory allocation for G1. It provides code examples to demonstrate the new features and explains their motivations and impacts.
The document discusses garbage collection tuning for Apache Cassandra. It provides an overview of the G1 garbage collector, how it works, when to use it, and how to monitor and tune it. Specific topics covered include young generation and old generation garbage collection, monitoring using JMX and tools like Swiss Java Knife, and interpreting garbage collection logs.
An Introduction to JVM Internals and Garbage Collection in JavaAbhishek Asthana
This document provides an overview of Java memory structures and garbage collection. It discusses the key areas of memory used by the JVM - heap, method area, native area, and threads. It then covers garbage collection concepts like roots, algorithms like mark-sweep-compact, and different GC strategies like serial, parallel, concurrent mark-sweep, and Garbage First collector. Performance metrics for evaluating GC and how objects transition between generations in generational collection are also summarized.
How to monitor Java application and JVM performance with Flight Recorder and Mission Control. Starts with a discussion of general JVM performance considerations like GC, JIT and threads.
The document discusses various topics related to tuning the Java Virtual Machine (JVM) for performance, including:
1. Hotspot compiler options like method inlining that can improve performance.
2. Threading models on Solaris like M:N and 1:1 and how tuning thread-related JVM options can significantly impact throughput.
3. Memory and garbage collection tuning like selecting the right GC algorithm, tuning heap sizes, and analyzing GC logs to identify bottlenecks and optimize full GC frequency and duration.
The workshop is based on several Nikita Salnikov-Tarnovski lectures + my own research. The workshop consists of 2 parts. The first part covers:
- different Java GCs, their main features, advantages and disadvantages;
- principles of GC tuning;
- work with GC Viewer as tool for GC analysis;
- first steps tuning demo;
- comparison primary GCs on Java 1.7 and Java 1.8
The second part covers:
- work with Off-Heap: ByteBuffer / Direct ByteBuffer / Unsafe / MapDB;
- examples and comparison of approaches;
The off-heap-demo: https://github.com/moisieienko-valerii/off-heap-demo
Java performance tuning involves diagnosing and addressing issues like slow application performance and out of memory errors. The document discusses Java performance problems and their solutions, tuning tips, and monitoring tools. Some tips include tuning JVM parameters like heap size, garbage collection settings, and enabling parallel garbage collection for multi-processor systems. Tools mentioned include JConsole, VisualVM, JProfiler, and others for monitoring memory usage, thread activity, and garbage collection.
The document provides an overview of Java Virtual Machine (JVM) memory management and garbage collection strategies. It discusses the basic architecture of the JVM and how memory is divided into generations (young and old). The young generation uses strategies like mark-and-sweep and mark-and-copy for fast garbage collection of short-lived objects. The old generation uses mark-and-compact for longer-lived objects, which has higher overhead. It also describes different garbage collector implementations and considerations for selecting and tuning collectors based on application needs.
G1 Garbage Collector - Big Heaps and Low Pauses?C2B2 Consulting
Devoxx 2012 talk by Jaromir Hamala, C2B2 Senior Consultant.
The Garbage-First (G1) is the latest garbage collector in the JVM, aiming to be the long-term replacement for CMS. Targeted for machines with large memories and multiple processors. Promising low and more predictable pause times while achieving high throughput.
The session will introduce the architecture and design of G1. Then the main focus of the talk will be the performance characteristics observed under different loads; tuning capabilities and common pitfalls. With the aim of answering the question can you run big heaps and achieve low pauses.
This document summarizes changes to the Java programming language from JDK 9 to JDK 16, including new features and modules. Some key points:
- Java has moved to a six-month release cycle, delivering more features faster than before.
- Modules were introduced in JDK 9 to improve modularity. Modules group related code and dependencies.
- Incubator modules and preview features allow testing of non-final APIs before inclusion in the Java SE platform.
- Local variable type inference using 'var' was added in JDK 10 for simpler declaration of local variables when types can be inferred.
- Modules, the module system, and tools like jlink and jdeps help manage dependencies
How to Become a Winner in the JVM Performance-Tuning BattleCapgemini
Has your system been touched by a JVM performance problems? If the answer is yes, this presentation is for you.
You need to be careful if you have to track issues in a production system. One mistake, too much data gathered, and your system will slow down. The root cause of the problem can be application code or the JVM garbage collector.
This presentation describes a real production example of how to measure, tune, and fix a problem with a slow enterprise Java application. To make this job effective, open source tools are used to analyze the JVM’s condition: GC, threads, and code bottlenecks. Measurement in the lab is with open source tools such as Zorka, GCViewer, and JVisual VM. To make the tuning task realistic, real production problems are simulated.
First presented at Oracle OpenWorld 2015.
http://www.capgemini.com/oracle
Introduction of Java GC Tuning and Java Java Mission ControlLeon Chen
This document provides an introduction and overview of Java garbage collection (GC) tuning and the Java Mission Control tool. It begins with information about the speaker, Leon Chen, including his background and patents. It then outlines the Java and JVM roadmap and upcoming features. The bulk of the document discusses GC tuning concepts like heap sizing, generation sizing, footprint vs throughput vs latency. It provides examples and recommendations for GC logging, analysis tools like GCViewer and JWorks GC Web. The document is intended to outline Oracle's product direction and future plans for Java GC tuning and tools.
The document discusses tuning Java for large data workloads. It covers symptoms of memory issues like jobs getting stuck or failing. It then discusses various Java and Hadoop configuration settings to optimize memory usage like mapreduce.child.java.opts and mapreduce.map.memory.mb. Finally, it provides an overview of different garbage collectors in Java and factors like generation sizes and concurrent marking that impact performance.
GC Tuning Confessions Of A Performance EngineerMonica Beckwith
This document provides an overview of garbage collection (GC) tuning and various GC algorithms used in OpenJDK HotSpot. It discusses key concepts like throughput collectors, latency-sensitive collectors, and the tradeoffs between throughput, latency and footprint. Specifically, it summarizes the Parallel Old, CMS and G1 garbage collectors - their goals, techniques used and failure scenarios. It also covers GC tuning concepts like heap configuration, GC logs and metrics.
The document discusses strategies for addressing Metaspace OutOfMemoryErrors (OOM) when redeploying web applications. It recommends monitoring Tomcat logs and memory usage, analyzing heap dumps to find classloader leaks and duplicate classes, and making configuration changes like closing Quartz schedulers and Log4j contexts. Specific issues addressed include leaks caused by third-party JARs like log4j-web and Xerces, and weak references in WeakHashMaps. Stress testing and troubleshooting on a production system found the root cause was an outdated Xerces JAR producing classloader leaks.
This document provides an overview of garbage collection in Java. It begins with an introduction to the presenter Leon Chen and his background. It then discusses Java memory management and garbage collection fundamentals, including the young and old generations, minor and major garbage collections, and how objects are promoted between generations. The document provides examples of garbage collection using diagrams and discusses tuning the Java heap size based on the live data size. It emphasizes the importance of garbage collection logging for performance analysis.
Memory Management: What You Need to Know When Moving to Java 8AppDynamics
This presentation will compare and contrast application behavior in Java 7 with Java 8, particularly focusing on memory management and usage. Several code examples are presented to show how to recognize and respond to common pitfalls.
Nowadays people usually talk more about big data, internet of things, and other buzzwords on various conferences. However, sometimes developers tend to not pay enough attention to the core things such as garbage collection. After having a short discussion with many somewhat experienced Java developers I came to a conclusion that most of them do not know how many garbage collectors there are in the latest JVM, and under what circumstances each of them should be enabled. This presentation is aimed to improve or refresh people’s knowledge on this core topic, and share a real use case when it helped us to resolve production issue.
JCConf 2020 - New Java Features Released in 2020Joseph Kuo
The document discusses new features in Java releases from JDK 13 to JDK 15, including syntax changes like switch expressions and text blocks, API changes like helpful NullPointerExceptions and reimplementing sockets, and improvements to garbage collectors like ZGC and NUMA-aware memory allocation for G1. It provides code examples to demonstrate the new features and explains their motivations and impacts.
The document discusses garbage collection tuning for Apache Cassandra. It provides an overview of the G1 garbage collector, how it works, when to use it, and how to monitor and tune it. Specific topics covered include young generation and old generation garbage collection, monitoring using JMX and tools like Swiss Java Knife, and interpreting garbage collection logs.
An Introduction to JVM Internals and Garbage Collection in JavaAbhishek Asthana
This document provides an overview of Java memory structures and garbage collection. It discusses the key areas of memory used by the JVM - heap, method area, native area, and threads. It then covers garbage collection concepts like roots, algorithms like mark-sweep-compact, and different GC strategies like serial, parallel, concurrent mark-sweep, and Garbage First collector. Performance metrics for evaluating GC and how objects transition between generations in generational collection are also summarized.
How to monitor Java application and JVM performance with Flight Recorder and Mission Control. Starts with a discussion of general JVM performance considerations like GC, JIT and threads.
The document discusses various topics related to tuning the Java Virtual Machine (JVM) for performance, including:
1. Hotspot compiler options like method inlining that can improve performance.
2. Threading models on Solaris like M:N and 1:1 and how tuning thread-related JVM options can significantly impact throughput.
3. Memory and garbage collection tuning like selecting the right GC algorithm, tuning heap sizes, and analyzing GC logs to identify bottlenecks and optimize full GC frequency and duration.
The workshop is based on several Nikita Salnikov-Tarnovski lectures + my own research. The workshop consists of 2 parts. The first part covers:
- different Java GCs, their main features, advantages and disadvantages;
- principles of GC tuning;
- work with GC Viewer as tool for GC analysis;
- first steps tuning demo;
- comparison primary GCs on Java 1.7 and Java 1.8
The second part covers:
- work with Off-Heap: ByteBuffer / Direct ByteBuffer / Unsafe / MapDB;
- examples and comparison of approaches;
The off-heap-demo: https://github.com/moisieienko-valerii/off-heap-demo
Java performance tuning involves diagnosing and addressing issues like slow application performance and out of memory errors. The document discusses Java performance problems and their solutions, tuning tips, and monitoring tools. Some tips include tuning JVM parameters like heap size, garbage collection settings, and enabling parallel garbage collection for multi-processor systems. Tools mentioned include JConsole, VisualVM, JProfiler, and others for monitoring memory usage, thread activity, and garbage collection.
The document provides an overview of Java Virtual Machine (JVM) memory management and garbage collection strategies. It discusses the basic architecture of the JVM and how memory is divided into generations (young and old). The young generation uses strategies like mark-and-sweep and mark-and-copy for fast garbage collection of short-lived objects. The old generation uses mark-and-compact for longer-lived objects, which has higher overhead. It also describes different garbage collector implementations and considerations for selecting and tuning collectors based on application needs.
G1 Garbage Collector - Big Heaps and Low Pauses?C2B2 Consulting
Devoxx 2012 talk by Jaromir Hamala, C2B2 Senior Consultant.
The Garbage-First (G1) is the latest garbage collector in the JVM, aiming to be the long-term replacement for CMS. Targeted for machines with large memories and multiple processors. Promising low and more predictable pause times while achieving high throughput.
The session will introduce the architecture and design of G1. Then the main focus of the talk will be the performance characteristics observed under different loads; tuning capabilities and common pitfalls. With the aim of answering the question can you run big heaps and achieve low pauses.
This document summarizes changes to the Java programming language from JDK 9 to JDK 16, including new features and modules. Some key points:
- Java has moved to a six-month release cycle, delivering more features faster than before.
- Modules were introduced in JDK 9 to improve modularity. Modules group related code and dependencies.
- Incubator modules and preview features allow testing of non-final APIs before inclusion in the Java SE platform.
- Local variable type inference using 'var' was added in JDK 10 for simpler declaration of local variables when types can be inferred.
- Modules, the module system, and tools like jlink and jdeps help manage dependencies
How to Become a Winner in the JVM Performance-Tuning BattleCapgemini
Has your system been touched by a JVM performance problems? If the answer is yes, this presentation is for you.
You need to be careful if you have to track issues in a production system. One mistake, too much data gathered, and your system will slow down. The root cause of the problem can be application code or the JVM garbage collector.
This presentation describes a real production example of how to measure, tune, and fix a problem with a slow enterprise Java application. To make this job effective, open source tools are used to analyze the JVM’s condition: GC, threads, and code bottlenecks. Measurement in the lab is with open source tools such as Zorka, GCViewer, and JVisual VM. To make the tuning task realistic, real production problems are simulated.
First presented at Oracle OpenWorld 2015.
http://www.capgemini.com/oracle
G1 Garbage Collector: Details and TuningSimone Bordet
This document provides an overview and details about the G1 garbage collector in Java. It begins with introductions of the author and an overview of G1. Key points include that G1 is designed to provide low pause times, works well with large heap sizes, and will become the default collector in JDK 9. The document then discusses various aspects of G1 including its memory layout using regions, young generation collection, remembered set and write barrier for tracking references, and concurrent marking approach for old generation collection. It provides advice on G1 logging, tuning and common issues. An example migration from CMS to G1 for an online chess application is also summarized.
jQuery is a JavaScript framework that simplifies HTML document traversal and manipulation, events, animations and Ajax interactions for rapid web development. It provides abstractions for common tasks like DOM element selection, event handling, animations and Ajax interactions to make development easier and cross-browser compatible. jQuery UI builds on jQuery to provide widgets, effects and interactions for building advanced user interfaces.
The document summarizes how garbage collection works in Java. It describes the marking phase where referenced and unreferenced objects are identified. Unreferenced objects are then deleted in the normal deletion step. For better performance, referenced objects can also be compacted together. The document further explains generational garbage collection, where new objects are allocated to the young generation and aged objects are promoted to the old generation. Minor and major garbage collections handle each generation. Different garbage collectors, like serial, parallel, CMS and G1, are also summarized regarding their implementation and suitability for different applications.
Mark and sweep algorithm(garbage collector)Ashish Jha
The Mark-Sweep algorithm is a two phase garbage collection technique. It first marks all live nodes by traversing from the root pointers, then sweeps through memory to free unmarked blocks and add them to the free list. The algorithm halts execution to trace references and reclaim unused memory in two distinct phases.
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
This document discusses Java garbage collection and its performance impact. It provides an overview of garbage collection, including that garbage collectors reclaim memory from objects no longer in use. It describes the different Java GC algorithms like serial, parallel, CMS, and G1 collectors and how to choose between them based on factors like heap size and CPU availability. It also gives guidance on basic GC tuning techniques like sizing the heap and generations as well as using adaptive sizing controls.
The document discusses garbage collection (GC) pauses in the Java Virtual Machine (JVM). It provides an overview of different GC algorithms like parallel GC, concurrent GC, and G1 GC used in HotSpot JVM. It explains reasons for long GC pauses and discusses options for tuning pause times. It also briefly mentions alternative GC implementations in other JVMs like Shenandoah and those used in Azul and JRocket VMs.
The document discusses heap memory management. It describes the heap as the portion of memory used for indefinitely stored data. A memory manager subsystem allocates and deallocates space in the heap. It keeps track of free space and serves as the interface between programs and the operating system. When allocating memory, the manager either uses available contiguous space or increases heap size from the OS. Deallocated space is returned to the free pool but memory is not returned to the OS when heap usage drops.
The document discusses Java garbage collection. It explains that Java's garbage collector automatically manages memory by freeing unreferenced objects. The garbage collector runs when memory is low to find and delete objects that cannot be reached. While garbage collection provides convenience, it has overhead as the system must pause current execution to run it which can influence user experience. The document also describes how objects are identified as garbage using tracing and reference counting collectors as well as how to explicitly make objects available for collection and finalize objects before deletion.
The document discusses different garbage collection algorithms used in programming languages. It describes reference counting, mark-sweep collection, copying collection, mark-compact collection, and generational collection. Generational collection divides the heap into generations and uses different algorithms like copying collection for younger objects and mark-compact collection for older objects to more efficiently perform garbage collection.
Azul Product Manager Matt Schuetze's presentation on JVM memory details to the Philadelphia Java User Group.
This session dovetails with the March, 2014 PhillyJUG deep dive session topic focused on Java compiler code transformation and JVM runtime execution. That session exposes myths that Java is slow and Java uses too much memory. In this session we will take a deeper look at Java memory management. The dreaded Out of Memory (OOM) error is one problem. Garbage collector activity and spikes leading to long pauses is another. He covers the foundations of garbage collection and why historically Java gets a bad rap, even though GC provides a marvelous memory management paradigm.
The document discusses Java garbage collection. It begins with an introduction to garbage collection, explaining that it is used to release unused memory and each JVM can implement its own garbage collection algorithms. It then covers the main garbage collection algorithms of reference counting, mark and sweep, and stop and copy. It also discusses finalize() methods, reference types in Java including strong, soft, weak and phantom references, and tips for improving garbage collection performance in Java programs.
This document discusses garbage collection and automatic memory management in Java. It covers the basic strategies used in garbage collection like mark and sweep. It also discusses the different garbage collectors used in HotSpot like SerialGC, ParallelGC, ConcMarkSweepGC and G1. It provides an overview of garbage collection in J9 and JRockit as well. The document also touches on alternatives to garbage collection like weak and soft references.
The document discusses several basic garbage collection techniques, including reference counting, mark-sweep collection, mark-compact collection, and copying garbage collection. Reference counting fails to reclaim circular structures and has overhead when pointers are created or destroyed. Mark-sweep identifies live objects but leaves memory fragmented, while mark-compact compacts objects after marking to reduce fragmentation. Copying garbage collection divides memory into two semispaces and copies live objects between them when one semispace fills up.
Sheridan College is located in Oakville, Ontario and accepts applications for its winter and fall intakes. It has over 100,000 alumni and graduate employment and employer satisfaction rates over 88% and 93% respectively. The college offers diplomas, advanced diplomas, and graduate certificates across a wide range of programs with admission requirements of 50% in grade 12 or a bachelor's degree and IELTS scores of 6.0 or 6.5 respectively.
Java is finally elastic! OpenJDK improvements and new features in Garbage Collection technology resulted in enhancing Java vertical scaling and resource consumption. Now JVM can promptly return unused memory and, as result it can go up and down automatically. In this presentation, we cover the main achievements in vertical scaling direction, as well as share peculiarities and tuning details of different GCs. Find out how to make your Java environments more elastic to follow the load and lower down the total cost of ownership at a large scale.
Software Profiling: Java Performance, Profiling and FlamegraphsIsuru Perera
Guest lecture at University of Colombo School of Computing on 30th May 2018
Covers following topics:
Software Profiling
Measuring Performance
Java Garbage Collection
Sampling vs Instrumentation
Java Profilers. Java Flight Recorder
Java Just-in-Time (JIT) compilation
Flame Graphs
Linux Profiling
The document provides information on application performance tuning education. It discusses key performance metrics like TPS and considerations for CPU usage, memory usage, garbage collection. It then summarizes Java/Tomcat performance tuning factors and garbage collection options. The last part discusses Java profiling and troubleshooting tools like JDK tools, HPROF, jhat, jmap, jstack, jstat and jvisualvm. It also provides an example Tomcat shell script configuration for setting JVM options and using profiling agents.
Elastic JVM for Scalable Java EE Applications Running in Containers #Jakart...Jelastic Multi-Cloud PaaS
Being configured smartly, Java can be scalable and cost-effective for all ranges of projects — from cloud-native startups to legacy enterprise applications. During this session, we will share our experiences in tuning RAM usage in a Java process to make it more elastic and gain the benefits of faster scaling and lower total cost of ownership (TCO). With microservices, cloud hosting, and vertical scaling in mind, we'll compare the top Java garbage collectors to see how efficiently they handle memory resources. The provided results of testing G1, Parallel, ConcMarkSweep, Serial, Shenandoah, ZGC and OpenJ9 garbage collectors while scaling Java EE applications vertically will help you to make the right choice for own projects.
More details about Garbage Collector types https://jelastic.com/blog/garbage-collection/
Free registration at Jelastic https://jelastic.com/
Software Profiling: Understanding Java Performance and how to profile in JavaIsuru Perera
Guest lecture at University of Colombo School of Computing on 27th May 2017
Covers following topics:
Software Profiling
Measuring Performance
Java Garbage Collection
Sampling vs Instrumentation
Java Profilers. Java Flight Recorder
Java Just-in-Time (JIT) compilation
Flame Graphs
Linux Profiling
Java Performance and Using Java Flight RecorderIsuru Perera
Slides used for an internal training. Explains why throughput and latency are important when measuring performance. How Java Flight Recording can be used to analyze performance issues.
Virtual machines don't have to be slow, they don't even have to be slower than running native code.
All you have to do is write your code, lay back and let the JVM do its magic !
Learn about various JVM runtime optimizations and why is it considered one of the best VMs in the world.
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
This document discusses Java garbage collection and provides an overview of common GC algorithms, their performance impacts, and basic tuning strategies. It describes how the generational heap is divided and explains that GC pauses can significantly impact performance. Different algorithms like the serial, parallel, CMS and G1 collectors are introduced along with considerations for choosing a collector based on heap size, CPU usage, and pause requirements. Guidelines are provided for sizing the heap and generations as well as enabling adaptive sizing.
This session brings to your attention how several millions of dollars are wasted and what you can do to save money. Optimizing garbage collection performance not only saves money, but also improves the overall customer experience as well.
Java garbage collection has evolved significantly since its inception in 1959. The modern Hotspot JVM uses generational garbage collection with a young and old generation. It employs concurrent and parallel techniques like CMS to minimize pauses. OutOfMemoryErrors require increasing heap sizes or fixing leaks. Finalizers are generally avoided due to performance impacts. GC tuning must be tested under realistic loads rather than one-size-fits-all settings. Analysis tools help correlate GC logs with application behavior.
There are more than 600 arguments that you can pass to JVM only for garbage collection and memory. It's way too many arguments for anyone to digest and comprehend. In this session, we will highlight seven essential JVM parameters that will improve the performance of your application.
invited netflix talk: JVM issues in the age of scale! We take an under the hood look at java locking, memory model, overheads, serialization, uuid, gc tuning, CMS, ParallelGC, java.
The document provides an overview of real-time Java and its key concepts:
- Real-time means determinism where deadlines must be met, as opposed to just fast throughput.
- The Real-Time Specification for Java (RTSJ) addresses limitations of Java SE for real-time applications like unpredictable delays from class loading and garbage collection.
- RTSJ implementations like IBM WebSphere Real Time and Sun RTS add features like high resolution timers, priority scheduling, and asynchronous event handling.
This document discusses parameters for tuning the performance of WebLogic servers. It covers OS-level TCP parameters, JVM heap size and GC logging parameters, WebLogic server-level parameters like work managers, execute queues, and stuck threads, and JDBC and JMS pool parameters. It also provides an overview of different types of garbage collection in the HotSpot JVM.
Java is one of the most popular languages and it's very important to understand the performance of Java servers. Modern JVMs compile the Java code in runtime using Just-In-Time (JIT) compiler and such JIT compiled code runs very close to optimized native code in terms of speed.
When understanding performance, it's important to know how Java works and we can also measure the performance using key metrics like Throughput and Latency. After measuring the performance, we can use profilers to understand the application behavior and find performance bottlenecks.
In this session, we will look at how Java manages the memory and how it optimizes the Java code using JIT compilation. We will also look at how we can use the Java Flight Recorder (JFR) to profile the JVM and find performance bottlenecks.
Finally, we can look at how "Flame Graphs" can be used to identify the most frequent code-paths quickly and accurately.
Are your application's tail-latencies holding it back from delivering its near-real time SLOs? Do your in-memory processing platform's long pauses only get worse with increasing heap sizes? How about those latency spikes causing variability in your end-to-end latency for your multi-tiered distributed systems?
If any of the above keep you up at night, then have no fear as Z Garbage Collector (GC) is here and is production ready in JDK 15.
In this talk, Monica Beckwith will cover the basics of Z GC and contrast it with G1 GC (the current default collector for OpenJDK JDK 11 LTS and tip).
This slide will explain about building blocks of JVM optimization for you java based application.
It explains basics of heap concepts and different type of java garbage collectors.
This document discusses garbage collection in the Java Virtual Machine (JVM). It begins with common terms related to garbage collection like stop-the-world pauses and compacting algorithms. It then covers the diversity of garbage collection techniques for different heap sizes, including young generation collection and concurrent mark sweep. Potential dangers of different garbage collection approaches are listed. The document also summarizes the economy of different garbage collection algorithms and discusses the weak generational thesis.
Artificial Intelligence is providing benefits in many areas of work within the heritage sector, from image analysis, to ideas generation, and new research tools. However, it is more critical than ever for people, with analogue intelligence, to ensure the integrity and ethical use of AI. Including real people can improve the use of AI by identifying potential biases, cross-checking results, refining workflows, and providing contextual relevance to AI-driven results.
News about the impact of AI often paints a rosy picture. In practice, there are many potential pitfalls. This presentation discusses these issues and looks at the role of analogue intelligence and analogue interfaces in providing the best results to our audiences. How do we deal with factually incorrect results? How do we get content generated that better reflects the diversity of our communities? What roles are there for physical, in-person experiences in the digital world?
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...Alan Dix
Talk at the final event of Data Fusion Dynamics: A Collaborative UK-Saudi Initiative in Cybersecurity and Artificial Intelligence funded by the British Council UK-Saudi Challenge Fund 2024, Cardiff Metropolitan University, 29th April 2025
https://alandix.com/academic/talks/CMet2025-AI-Changes-Everything/
Is AI just another technology, or does it fundamentally change the way we live and think?
Every technology has a direct impact with micro-ethical consequences, some good, some bad. However more profound are the ways in which some technologies reshape the very fabric of society with macro-ethical impacts. The invention of the stirrup revolutionised mounted combat, but as a side effect gave rise to the feudal system, which still shapes politics today. The internal combustion engine offers personal freedom and creates pollution, but has also transformed the nature of urban planning and international trade. When we look at AI the micro-ethical issues, such as bias, are most obvious, but the macro-ethical challenges may be greater.
At a micro-ethical level AI has the potential to deepen social, ethnic and gender bias, issues I have warned about since the early 1990s! It is also being used increasingly on the battlefield. However, it also offers amazing opportunities in health and educations, as the recent Nobel prizes for the developers of AlphaFold illustrate. More radically, the need to encode ethics acts as a mirror to surface essential ethical problems and conflicts.
At the macro-ethical level, by the early 2000s digital technology had already begun to undermine sovereignty (e.g. gambling), market economics (through network effects and emergent monopolies), and the very meaning of money. Modern AI is the child of big data, big computation and ultimately big business, intensifying the inherent tendency of digital technology to concentrate power. AI is already unravelling the fundamentals of the social, political and economic world around us, but this is a world that needs radical reimagining to overcome the global environmental and human challenges that confront us. Our challenge is whether to let the threads fall as they may, or to use them to weave a better future.
HCL Nomad Web – Best Practices and Managing Multiuser Environmentspanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-nomad-web-best-practices-and-managing-multiuser-environments/
HCL Nomad Web is heralded as the next generation of the HCL Notes client, offering numerous advantages such as eliminating the need for packaging, distribution, and installation. Nomad Web client upgrades will be installed “automatically” in the background. This significantly reduces the administrative footprint compared to traditional HCL Notes clients. However, troubleshooting issues in Nomad Web present unique challenges compared to the Notes client.
Join Christoph and Marc as they demonstrate how to simplify the troubleshooting process in HCL Nomad Web, ensuring a smoother and more efficient user experience.
In this webinar, we will explore effective strategies for diagnosing and resolving common problems in HCL Nomad Web, including
- Accessing the console
- Locating and interpreting log files
- Accessing the data folder within the browser’s cache (using OPFS)
- Understand the difference between single- and multi-user scenarios
- Utilizing Client Clocking
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxshyamraj55
We’re bringing the TDX energy to our community with 2 power-packed sessions:
🛠️ Workshop: MuleSoft for Agentforce
Explore the new version of our hands-on workshop featuring the latest Topic Center and API Catalog updates.
📄 Talk: Power Up Document Processing
Dive into smart automation with MuleSoft IDP, NLP, and Einstein AI for intelligent document workflows.
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc
Most consumers believe they’re making informed decisions about their personal data—adjusting privacy settings, blocking trackers, and opting out where they can. However, our new research reveals that while awareness is high, taking meaningful action is still lacking. On the corporate side, many organizations report strong policies for managing third-party data and consumer consent yet fall short when it comes to consistency, accountability and transparency.
This session will explore the research findings from TrustArc’s Privacy Pulse Survey, examining consumer attitudes toward personal data collection and practical suggestions for corporate practices around purchasing third-party data.
Attendees will learn:
- Consumer awareness around data brokers and what consumers are doing to limit data collection
- How businesses assess third-party vendors and their consent management operations
- Where business preparedness needs improvement
- What these trends mean for the future of privacy governance and public trust
This discussion is essential for privacy, risk, and compliance professionals who want to ground their strategies in current data and prepare for what’s next in the privacy landscape.
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersToradex
Toradex brings robust Linux support to SMARC (Smart Mobility Architecture), ensuring high performance and long-term reliability for embedded applications. Here’s how:
• Optimized Torizon OS & Yocto Support – Toradex provides Torizon OS, a Debian-based easy-to-use platform, and Yocto BSPs for customized Linux images on SMARC modules.
• Seamless Integration with i.MX 8M Plus and i.MX 95 – Toradex SMARC solutions leverage NXP’s i.MX 8 M Plus and i.MX 95 SoCs, delivering power efficiency and AI-ready performance.
• Secure and Reliable – With Secure Boot, over-the-air (OTA) updates, and LTS kernel support, Toradex ensures industrial-grade security and longevity.
• Containerized Workflows for AI & IoT – Support for Docker, ROS, and real-time Linux enables scalable AI, ML, and IoT applications.
• Strong Ecosystem & Developer Support – Toradex offers comprehensive documentation, developer tools, and dedicated support, accelerating time-to-market.
With Toradex’s Linux support for SMARC, developers get a scalable, secure, and high-performance solution for industrial, medical, and AI-driven applications.
Do you have a specific project or application in mind where you're considering SMARC? We can help with Free Compatibility Check and help you with quick time-to-market
For more information: https://www.toradex.com/computer-on-modules/smarc-arm-family
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...SOFTTECHHUB
I started my online journey with several hosting services before stumbling upon Ai EngineHost. At first, the idea of paying one fee and getting lifetime access seemed too good to pass up. The platform is built on reliable US-based servers, ensuring your projects run at high speeds and remain safe. Let me take you step by step through its benefits and features as I explain why this hosting solution is a perfect fit for digital entrepreneurs.
Big Data Analytics Quick Research Guide by Arthur MorganArthur Morgan
This is a Quick Research Guide (QRG).
QRGs include the following:
- A brief, high-level overview of the QRG topic.
- A milestone timeline for the QRG topic.
- Links to various free online resource materials to provide a deeper dive into the QRG topic.
- Conclusion and a recommendation for at least two books available in the SJPL system on the QRG topic.
QRGs planned for the series:
- Artificial Intelligence QRG
- Quantum Computing QRG
- Big Data Analytics QRG
- Spacecraft Guidance, Navigation & Control QRG (coming 2026)
- UK Home Computing & The Birth of ARM QRG (coming 2027)
Any questions or comments?
- Please contact Arthur Morgan at [email protected].
100% human made.
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPathCommunity
Join this UiPath Community Berlin meetup to explore the Orchestrator API, Swagger interface, and the Test Manager API. Learn how to leverage these tools to streamline automation, enhance testing, and integrate more efficiently with UiPath. Perfect for developers, testers, and automation enthusiasts!
📕 Agenda
Welcome & Introductions
Orchestrator API Overview
Exploring the Swagger Interface
Test Manager API Highlights
Streamlining Automation & Testing with APIs (Demo)
Q&A and Open Discussion
Perfect for developers, testers, and automation enthusiasts!
👉 Join our UiPath Community Berlin chapter: https://community.uipath.com/berlin/
This session streamed live on April 29, 2025, 18:00 CET.
Check out all our upcoming UiPath Community sessions at https://community.uipath.com/events/.
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul
Artificial intelligence is changing how businesses operate. Companies are using AI agents to automate tasks, reduce time spent on repetitive work, and focus more on high-value activities. Noah Loul, an AI strategist and entrepreneur, has helped dozens of companies streamline their operations using smart automation. He believes AI agents aren't just tools—they're workers that take on repeatable tasks so your human team can focus on what matters. If you want to reduce time waste and increase output, AI agents are the next move.
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Aqusag Technologies
In late April 2025, a significant portion of Europe, particularly Spain, Portugal, and parts of southern France, experienced widespread, rolling power outages that continue to affect millions of residents, businesses, and infrastructure systems.
TrsLabs - Fintech Product & Business ConsultingTrs Labs
Hybrid Growth Mandate Model with TrsLabs
Strategic Investments, Inorganic Growth, Business Model Pivoting are critical activities that business don't do/change everyday. In cases like this, it may benefit your business to choose a temporary external consultant.
An unbiased plan driven by clearcut deliverables, market dynamics and without the influence of your internal office equations empower business leaders to make right choices.
Getting things done within a budget within a timeframe is key to Growing Business - No matter whether you are a start-up or a big company
Talk to us & Unlock the competitive advantage
This is the keynote of the Into the Box conference, highlighting the release of the BoxLang JVM language, its key enhancements, and its vision for the future.
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell
With expertise in data architecture, performance tracking, and revenue forecasting, Andrew Marnell plays a vital role in aligning business strategies with data insights. Andrew Marnell’s ability to lead cross-functional teams ensures businesses achieve sustainable growth and operational excellence.
2. JAVA JVM BASICS JDK vs. JRE JRE runs the executables. Small footprint. Recommended in production JDK =JRE + javac + tools + debuggers + dev libraries. JRE main components JVM + JAVA API JVM components Class loader + byte code verifier + GC + Security mgr + execution engine + JIT code generator
3. JAVA object What is an object? Object gives properties and behavior. unique properties or state or data + behavior (method) + reusable benefit.
4. Fundamentals and Terminology GC task is to search unreachable objects and reclaim memory. LIVE, GARBAGE and ROOT Garbage is not reachable by application roots : (local variable on stack, thread stacks, registers, static objects, static fields and class variable refs.) Anything not visited is unreachable is GARBAGE Advantage: More reliable, no intentional memory leak. Disadvantage: Stops and Pauses. Consumes resources.
5. GC Algorithms. Different methods and algorithms and technical terms. Mark & Sweep, Mark & Compact, Copying. Mark & Sweep GC Mark does depth first search (DFS) from every root, marks all live objects. Sweep phase each object not marked has its memory reclaimed. Mark & Compact Additionally this does compaction. Avoids fragmentation. Algorithms improved by 3 ways concurrency, parallelization and generational collection.
6. Generational GC Copying GC Faster than M&S because only one phase. Generational GC. Young (short lived) and old (long-lived) objects in separate locations. Most (80% to 90%) instantiated objects are short-lived, and few connections between long-lived objects to short-lived objects.
7. Minor and Major GC Minor Garbage Collection (scavenge) When eden space is filled gc is invoked. Frequent. Major Garbage Collection. When tenured space is filled Full GC is invoked. Mark & Sweep method. Infrequent. Different generations: Young Eden and Survivor space S0 & S1 Virtual Tenured Old and virtual Permanent and virtual
8. JVM GC Tuning Why performance tuning? Wide and diverse range of apps from applets to web services on large servers. There are multiple garbage collectors designed for different requirements. Ergonomics Introduced in java 5.0 Automatic choosing of GC algorithm. little or no tuning of command line options needed, by choosing GC, heap size and runtime compiler.
9. JVM GC Tuning Generations Primitive GCs examine every live object. Generational collection exploits the several empirical observed behavior to minimize the work required to reclaim memory space. Weak generational hypothesis which says most objects are short lived. Performance Considerations Throughput - % of time not spent in GC. Pauses – times when application not responding. Sizing the Generations Total Heap: -Xms=-Xmx or not? Young gen: -XXNewRatio=3 or NewSize and MaxSize Survivor Space: -XX: SurvivorRatio=6 , Use –XX:+PrintTenuringDistribution
10. JVM GC Tuning Different Collector options and choosing the right one. Give JVM a chance, adjust the heap size to improve. -XX:+UseSerialGC Single threaded, relatively efficient and small data sets. -XX:+UseParallelGC (throughput collector) multithreaded, med. to large data sets. -XX:+UseParallelOldGC parallel compaction in old space. Better scalable. -XX:+UseConcMarkSweepGC (low pause), comparatively less throughput, chances of fragmentation. One or two cores use incremental mode. -XX:+UseTrainGC train low pause. No more in development. G1 - introduced lately in 1.6 - uses page densities, picks sparse pages and collects it and moves popular objects which is connected to so many other objects. Goal is to have 0 flags. Parallel Collector. Characters: throughput, generational, multithreaded. Sync overhead. -XX:ParallelGCThreads=<N> . Too many threads may cause fragments. Ergonomics: Auto tune based on…the following order Max GC pause time -XX:MaxGCPauseMillis=<N> Throughput -XX:GCTimeRatio=<N> 1/(1+ <N>) Heap size -Xmx<N>
11. JVM GC Tuning Young and Old gen adjustments. -XX:YoungGenerationSizeIncrement=<Y> XX:TenuredGenerationSizeIncrement=<T> XX:AdaptiveSizeDecrementScaleFactor=<D> Growth increment is X% the shrinking decrement is X/D% For max pause time goal, size of one generation is shrunk at a time. For throughput goal, size of both generations are increased. Parallel Compaction. Is done with marking phase, summary phase and compaction phase . Objects are not moved around in dense prefix region. The Concurrent Collector. Characters: low pause, generational, multithreaded. Uses a separate GC threads to trace live objects, concurrently. 1 st phase: initial mark STW, single thread marks the first level. STW. 2 nd phase: concurrent mark drills deep, longer, multi-threaded (trace), single threaded (retrace). no STW. 3 rd phase: remark tracing bulk of live objects that changed, concurrent, multithreaded. STW. 4 th phase: c oncurrent sweep app runs. Single threaded. No compaction. No STW. Multiple pointers for free memory categorized by size. Keeps count of the requested lengths to determine popular sized objects. Minor collections can interleave with on-going major collection. STW.
12. JVM GC Tuning Cont … Tradeoff is processing time, which will otherwise be used by application. Concurrent mode failure: inability to complete concurrent collection. Floating Garbage: new Garbage that happens while collector is in action. Tuning options for CMS: -XX:CMSInitiatingOccupancyFraction=<N> Scheduling Pauses: Concurrent collector attempts to schedule a remark pause between the previous and next young gen pauses. Incremental mode: divides the work done concurrently by the collector into small chunks of time which are scheduled between young generation collections. Dutycycle and Auto Pacing: controls the amt of work allowed to do. Auto pacing adjusts based on collected stats. -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10
13. JVM OS related tuning Other tuning areas. Network tcp tuning net.core.rmem_max = 33554432 net.core.wmem_max = 33554432 Ifconfig ethX mtu 9000 (test first!) OS memory tuning –XX:+UseLargePages –XX:+LargePageSizeInBytes=<xm> Filesystem tuning: noatime, nodiratime I/O scheduler: noop or deadline cpuaffinity and OS stack size. Reading a GC log. Turn on –verbose:gc –XX:+PrintGCDetails Look at the live example. Next slide for explanation.
14. GC Log GC log reading. Sample: 2011-08-15T14:03:59.324-0400: 13.572: [GC [1 CMS-initial-mark: 199434K(3481600K)] 203546K(3686336K), 0.0027280 secs] [Times: user=0.00 sys=0.00, real=0.01 secs] 2011-08-15T14:03:59.327-0400: 13.575: [CMS-concurrent-mark-start] 2011-08-15T14:03:59.508-0400: 13.757: [CMS-concurrent-mark: 0.112/0.181 secs] [Times: user=0.69 sys=0.22, real=0.18 secs] 2011-08-15T14:03:59.508-0400: 13.757: [CMS-concurrent-preclean-start] 2011-08-15T14:03:59.522-0400: 13.771: [CMS-concurrent-preclean: 0.014/0.014 secs] [Times: user=0.02 sys=0.00, real=0.01 secs] 2011-08-15T14:03:59.522-0400: 13.771: [CMS-concurrent-abortable-preclean-start] Total time for which application threads were stopped: 0.0004990 seconds 2011-08-15T14:04:00.234-0400: 14.483: [CMS-concurrent-abortable-preclean: 0.113/0.712 secs] [Times: user=1.36 sys=0.20, real=0.71 secs] 2011-08-15T14:04:00.236-0400: 14.484: [GC[YG occupancy: 106943 K (204736 K)]14.484: [Rescan (parallel) , 0.0269510 secs]14.511: [weak refs processing, 0.0858930 secs]14.597: [class unloading, 0.0061610 secs]14.604: [scrub symbol & string tables, 0.0060430 secs] [1 CMS-remark: 199434K(3481600K)] 306377K(3686336K), 0.1282460 secs] [Times: user=0.29 sys=0.00, real=0.13 secs] Total time for which application threads were stopped: 0.1296990 seconds 2011-08-15T14:04:00.365-0400: 14.613: [CMS-concurrent-sweep-start] Total time for which application threads were stopped: 0.0013380 seconds2011-08-15T14:04:00.610-0400: 14.858: [CMS-concurrent-sweep: 0.221/0.245 secs] [Times: user=0.63 sys=0.06, real=0.24 secs] 2011-08-15T14:04:00.610-0400: 14.858: [CMS-concurrent-reset-start] 2011-08-15T14:04:00.689-0400: 14.937: [CMS-concurrent-reset: 0.079/0.079 secs] [Times: user=0.09 sys=0.08, real=0.08 secs] Total time for which application threads were stopped: 0.0008140 seconds 2011-08-15T14:04:00.872-0400: 15.120: [GC [1 CMS-initial-mark: 191277K(3481600K)] 388680K(3686336K), 0.2749030 secs] [Times: user=0.27 sys=0.00, real=0.28 secs] Total time for which application threads were stopped: 0.2757330 seconds 2011-08-15T14:04:01.147-0400: 15.395: [CMS-concurrent-mark-start] STW STW CMSScheduleRemarkEdenSizeThreshold CMSScheduleRemarkEdenPenetration
15. Diagnostic approach Tenure distribution -XX:+PrintTenuringDistribution -XX:TargetSurvivorRatio= <x> -XX: MaxTenuringThreshold=<x> Threshold accounts for number of times an object is copied before it is tenured. (survivor_capacity * TargetSurvivorRatio) / 100 * sizeof(a pointer) Example: 1125.353: [GC 1125.353: [ParNew Desired survivor size 86232268 bytes, new threshold 6 (max 15) - age 1: 50754696 bytes, 50754696 total - age 2: 12147696 bytes, 62902392 total - age 3: 12295552 bytes, 75197944 total - age 4: 6537136 bytes, 81735080 total - age 5: 2435944 bytes, 84171024 total - age 6: 3013488 bytes, 87184512 total - age 7: 627368 bytes, 87811880 total - age 8: 999536 bytes, 88811416 total - age 9: 924656 bytes, 89736072 total - age 10: 1811480 bytes, 91547552 total : 554848K->89528K(561792K), 0.5317388 secs] 607743K->146164K(1217152K) icms_dc=18 , 0.5326526 secs]
17. Diagnostic approach (cont…) How to determine if the OLD gen is big or small? Example (courtesy www.oracle.com ): ----------------------------------------------------------------------------------------------------------------------------------------------------- For the 32MB heap collections happen 10s to11s apart. 111 .042: [GC 111.042: [DefNew: 8128K->8128K(8128K), 0.0000505 secs]111.042: [Tenured: 18154K->2311K(24576K), 0.1290354 secs] 26282K->2311K(32704K), 0.1293306 secs] 122 .463: [GC 122.463: [DefNew: 8128K->8128K(8128K), 0.0000560 secs]122.463: [Tenured: 18630K->2366K(24576K), 0.1322560 secs] 26758K->2366K(32704K), 0.1325284 secs] 133.896: [GC 133.897: [DefNew: 8128K->8128K(8128K), 0.0000443 secs]133.897: [Tenured: 18240K->2573K(24576K), 0.1340199 secs] 26368K->2573K(32704K), 0.1343218 secs] 144.112: [GC 144.112: [DefNew: 8128K->8128K(8128K), 0.0000544 secs]144.112: [Tenured: 16564K->2304K(24576K), 0.1246831 secs] 24692K->2304K(32704K), 0.1249602 secs] ----------------------------------------------------------------------------------------------------------------------------------------------------- For the 64 Mbyte heap the major collections are occurring about every 30 seconds. 90.597 : [GC 90.597: [DefNew: 8128K->8128K(8128K), 0.0000542 secs]90.597: [Tenured: 49841K->5141K(57344K), 0.2129882 secs] 57969K->5141K(65472K), 0.2133274 secs] 120.899 : [GC 120.899: [DefNew: 8128K->8128K(8128K), 0.0000550 secs]120.899: [Tenured: 50384K->2430K(57344K), 0.2216590 secs] 58512K->2430K(65472K), 0.2219384 secs] 153.968: [GC 153.968: [DefNew: 8128K->8128K(8128K), 0.0000511 secs]153.968: [Tenured: 51164K->2309K(57344K), 0.2193906 secs] 59292K->2309K(65472K), 0.2196372 secs] Conclusion : bigger heap better throughput, smaller heap is low pause time.
18. Diagnostic approach (cont…) Now make the YOUNG gen is bigger, by increasing the heap to 256MB and 64MB young gen size. [GC [DefNew: 64575K->959K(64576K), 0.0457646 secs] 196016K->133633K(261184K), 0.0459067 secs] [GC [DefNew: 64575K->64575K(64576K), 0.0000573 secs][Tenured: 132673K->5437K(196608K), 0.4959855 secs] 197249K->5437K(261184K), 0.4962533 secs] [GC [DefNew: 63616K->959K(64576K), 0.0360258 secs] 69053K->7600K(261184K), 0.0361663 secs] After tuning if the minor GC pauses are high try -XX:+UseParallelGC followed by -XX:+ UseAdaptiveSizing . Alternatively try using –XX:+UseParNewGC. If you want to address scalability use -XX:+UseParallelOldGC. After tuning if the major GC pauses are high try –XX:+UseConcMarkSweepGC with and without –XX:+UseParNewGC . To reduce the pause times further (especially for 1 or 2 core boxes) try adding i-cms. - XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:+CMSIncrementalDutyCycle=10
19. Tuning guidelines Dos: Start with a benchmark or baseline. Find and tune only the bottlenecks. Change one variable at a time and run a test to record. Don’ts: Don’t tune without base lining or benchmarking. Performance trade-off Tuning one parameter may cause another bottleneck Performance metrics Throughput -% of total time not spent in garbage collection Overhead – % of time spent in GC. Pause time – duration of app not responding while GC GC Frequency – how often GC is initiated. Footprint – heap size
20. Coarse tuning shortcuts and tips Serial GC suitable for small data sets. Throughput and low pause meant for medium to large data sets. General rule for sizing. Allocate 20% to 35% for young space. Stateless needs more new gen space. Stateful needs more tenured space. If you see Full GC (tenured space) happening too frequent adjust the –Xmn to a smaller value. Adjust the heap space – bigger for throughput – smaller for low pause.
21. Brain dump Tuning Tips Sizing -Xmx == -Xms or not ? young Gen: use -Xmn for more controlled and expected and predictable performance Choose a GC Serial - new gen and old gen uses serial algorithm. Parallel GC (default) - Parallel scavenging + Serial old gen algorithm. UseParallelOldGC : Parallel scavenge + Parallel Old UseCMS: Parallel newgen, CMS old, Serial OLD G1 - introduced lately in 1.6 - uses page densities picks sparse pages and collects it and moves popular objects which is connected to so many other objects. Goal is to have 0 flags. How to read GC logs. When you see "Full GC" its STW. Initial mark, Rescan/WeakRef/Remark triggers STW Promotion failures and CMF Tuning CMS Avoid promotion too frequent, to avoid fragmentation. Use TenuringThreshold - Avoid situation of never tenure. Size the generations Minimize GC times are a function of Live set Old gen should host long lived state comfortably. Avoid CMS Initiating heuristic -XX:+UseCMSInitiationOccupancyOnly Use Concurrent GC Threads Parallelize on multicore processors. -XX:parallelGCThreads=6 Strategy A: Tune min GCs & let application data die in eden Fragmentation Performance degrades over time
22. Summary & Refs & Resources Remember whatever option that we introduce in jvm tuning is only a suggestion and its not guaranteed to follow. Some tools for evaluation jmap (Solaris and Linux only) prints memory related stats for running jvm or core file. jstat information on performance and resource consumptions of running application. Particularly for heap sizing and garbage collection. HPROF: Heap Profiler presents CPU usage, heap stats and dump states of monitors and threads. Useful for analyzing performance, lock contention and memory leaks. HAT: Heap Analysis Tool for debugging unintentional object retention . The above presentation explains the way I understood GC and if there is any correction to it, please send email to [email_address] Refs and Resources. https://java.sun.com/j2se/reference/whitepapers http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html