Advanced Java Performance: Hotspot GC Tuning LiveLessons

Video description

2+ Hours of Video Instruction

Overview

Advanced Java Performance: HotSpot GC Tuning LiveLessons covers the common fundamentals between all the HotSpot GCs and emphasize the differences. The eight lessons will arm you with what you need to tackle your application’s performance problems where the garbage collector has been identified as the bottleneck.  You'll also get an introduction to G1 GC to hit the ground running now, or in the future when G1 GC becomes the default GC in JDK9.

Skill Level

  • Intermediate to Advanced Java programmer/developer

Who Should Take This Course

  • Beginner to Advanced Java and JVM performance tuning engineer, and Advanced Java user / developer

Course Requirements

  • Fluent with, or a good understanding of, the Java programming language
  • Basic understanding of a Java Virtual Machine is helpful, but not required

Table of Contents

Lesson 1: HotSpot Garbage Collector — Fundamentals

Lesson 1 jumps right into the fundamentals of HotSpot’s GCs. The lesson starts with the Java runtime environment and then moves on to identifying the components of the execution engine of the Java virtual machine. You will learn about heap management and the need for generational garbage collector. It then talks about allocations and reclamations before moving on to the importance of a generation collector. Next, the it discusses the young GC algorithm and then compares and contrasts HotSpot’s Parallel GC and CMS GC. Finally, it talks about promotion failures, concurrent mode failures and fallback full collections.

Lesson 2: GC Visualization and Logging Information.

Lesson 2 covers GC logging and visualization information.  The lesson covers certain handy logging options and provides more information on them.  It also show how to add a VisualGC plugin to VisualVM.  Then, the lesson looks at different information provided by VisualVM and visualizes the young and the old generations and talks about Metaspace.

Lesson 3: Garbage Collector Performance Tuning.

Lesson 3 provides information on GC goals and how HotSpot GCs are designed to either maximize throughput or reduce latency by designing a throughput maximizer GC and a latency sensitive GC.  The lesson covers the basics of what it means to tune for throughput and you will learn how to calculate allocation rate and promotion rate.   Finally you will learn to tune for latency to improve the applications responsiveness.

Lesson 4: Garbage First Garbage Collector — Fundamentals

Lesson 4 dives into G1 GC fundamentals and talks about the regionalized framework and understand how G1 handles GC time and GC frequency metrics.  It then moves on to talking about G1 GC’s internal data structures and then talk about the young collections, the marking threshold and the concurrent marking phase and then finally talk about incremental collections.   Finally, it covers information on fragmentation in G1 GC and then covers evacuation failures and fallback full collections.

Lesson 5:Advanced Logging Information

Lesson 5 covers two important log options that help with understanding and tuning G1 GC. The first one helps with understanding the adaptive sizing in G1 GC.  The lesson looks at various examples to help walk you through the adaptive decisions made by G1 for a young collection and for a mixed collection. Finally, it summarizes remembered sets so as to gain tuning advantage by looking at sample outputs.

Lesson 6: G1 GC — Tuning Young Collections

Lesson 6 concentrates on young collections and their tuning.  It starts out with an example as to why setting a realistic pause time goal is really important, by looking at 3 different scenarios.   Then, it covers how to tune further to achieve the realistic pause time goal.  Next, it walks through different log snippets and

works through achieving our tuning goals with minimal tuning.

Lesson 7: G1 GC — Tuning and Taming Mixed Collections

Lesson 7 discusses how to achieve tamed mixed collections. One of the first principles in taming mixed collections is to tune the application to get more young collections. First, you will compare the overheads in the two examples provided. Next, you will utilize tuning to get more mixed collections per mixed collection cycle. The audience will be introduced to two different options and you will be able to walk through examples where you can learn the importance of both those options. Finally, you will learn how to avoid collecting expensive old regions. Once again the audience will be

introduced to two options that help with the tuning.

Lesson 8: G1 GC — Tuning to Avoid Evacuation Failures

Lesson 8 is the final lesson in the series.   It walks through different scenarios to help the you understand the different reasons G1 GC could encounter an evacuation failure and how we can tune G1 to avoid those failures. First you

will learn how to avoid restricting G1’s adaptiveness. Then, you will see an example where you can avoid evacuation failures, by either decreasing the marking threshold, or increasing the concurrent threads or utilizing few other options. Next, you will learn how to avoid evacuation failures caused by humongous allocations.

About LiveLessons Video Training

LiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include: IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more.  View all LiveLessons on InformIT at: http://www.informit.com/livelessons

Table of contents

  1. 0.0 Introduction
  2. Lesson 1: HotSpot Garbage Collector Fundamentals
    1. 1.0 Learning objectives
    2. 1.1 Learn about heap management
    3. 1.2 Know the importance of a generational garbage collector
    4. 1.3 Understand the difference between HotSpot's Parallel GC and CMS GC
  3. Lesson 2: GC Visualization and Logging Information
    1. 2.0 Learning objectives
    2. 2.1 Understand GC logging options and their importance
    3. 2.2 Setup VisualVM and VisualGC
    4. 2.3 Visualize application threads
    5. 2.4 Visualize generations and Metaspace
    6. 2.5 Visualize young allocations, reclamations and promotions
    7. 2.6 Visualize live data set and old generation reclamation
  4. Lesson 3: Garbage Collector Performance Tuning
    1. 3.0 Learning objectives
    2. 3.1 Understand how HotSpot GCs are designed to either maximize throughput or reduce latency
    3. 3.2 Tune for throughput
    4. 3.3 Tune for latency
  5. Lesson 4: Garbage First Garbage Collector Fundamentals
    1. 4.0 Learning objectives
    2. 4.1 Understand the basis of a regionalized framework
    3. 4.2 Understand soft real time goal
    4. 4.3 Learn about the Remembered Sets and the Collection Set
    5. 4.4 Understand stop-the- world young generation pause
    6. 4.5 Introduce marking threshold in G1 GC
    7. 4.6 Learn about the concurrent marking phase
    8. 4.7 Introduce incremental/partial compaction in G1 GC
    9. 4.8 Understand fragmentation, evacuation failures, and full GCs
  6. Lesson 5: Advanced Logging Information
    1. 5.0 Learning objectives
    2. 5.1 Understand adaptive sizing in G1 GC
    3. 5.2 Summarize Remembered Sets to gain tuning advantage
  7. Lesson 6: G1 GC Tuning Young Collections
    1. 6.0 Learning objectives
    2. 6.1 Set a realistic pause time goal
    3. 6.2 Tune to achieve your pause time goal
  8. Lesson 7: G1 GC Tuning and Taming Mixed Collections
    1. 7.0 Learning objectives
    2. 7.1 Utilize tuning to get more young collections
    3. 7.2 Utilize tuning to get more mixed collections per mixed collection cycle
    4. 7.3 Utilize tuning to avoid collecting expensive old regions
  9. Lesson 8: G1 GC Tuning to Avoid Evacuation Failures
    1. 8.0 Learning objectives
    2. 8.1 Avoid restricting G1 GC
    3. 8.2 Utilize tuning to adjust marking threshold or concurrent threads or reclaim more regions
    4. 8.3 Utilize region size tuning to help avoid failures due to humongous objects
    5. 9.0 Summary

Product information

  • Title: Advanced Java Performance: Hotspot GC Tuning LiveLessons
  • Author(s): Monica Beckwith
  • Release date: September 2016
  • Publisher(s): Addison-Wesley Professional
  • ISBN: 0134653270