Adaptive Size Policy Changed Eden Space

This section provides a tutorial on how Adaptive Size Policy used by the Parallel collector changed the eden space in the Young generation to meet the throughput goal.

In GC log example presented in the last tutorial, the Adaptive Size Policy of the Parallel collector suggested to keep Young generation size as is.

In this tutorial, we will look at GC log example from the test that suggests to change the survivor space size:

1181   1048576000   819745424   228830576
0.473: Application time: 0.0253453 seconds
    UseAdaptiveSizePolicy actions to meet  *** throughput goal ***
                       GC overhead (%)
    Young generation:       17.09	  (attempted to grow)
    Tenured generation:      0.00	  (no change)
    -- Current throughput is 82.91% = 100% - 17.09%
    Tenuring threshold: (attempted to decrease to balance GC costs) = 6
{Heap before GC invocations=6 (full 0):
 PSYoungGen      total 409600K, used 223451K [...
  eden space 204800K, 99% used [0x2a000000,0x367f4c20,0x36800000)
  from space 204800K, 9% used [0x36800000,0x37a42150,0x43000000)
  to   space 20480K, 0% used [0x4e400000,0x4e400000,0x4f800000)
 ParOldGen       total 614400K, used 16K [...
0.474: [GC (Allocation Failure) 
   AdaptiveSizePolicy::update_averages:  survived: 19136864  
      promoted: 0  overflow: false
   AdaptiveSizeStart: 0.484 collection: 6 
     avg_survived_padded_avg: 20747726.000000  
     avg_promoted_padded_avg: 3854.254150  
     avg_pretenured_padded_avg: 0.000000  
     tenuring_thresh: 5  target_size: 20971520
   -- Suggested to set survivor space to 20971520
   PSAdaptiveSizePolicy::compute_eden_space_size limits: 
      desired_eden_size: 419430400 old_eden_size: 209715200 
      eden_limit: 398458880 cur_eden: 209715200 
      max_eden_size: 398458880 avg_young_live: 18794080
   -- Suggested to increase "eden" space to 419430400
      costs minor_time: 0.174405 major_cost: 0.000000 
      mutator_cost: 0.825595 throughput_goal: 0.990000 
      live_space: 287229536 free_space: 419430400 
      old_eden_size: 209715200 desired_eden_size: 398458880
   -- Suggested to increase "eden" space to 398458880
   AdaptiveSizePolicy::survivor space sizes: collection: 6 
      (20971520, 209715200) -> (20971520, 20971520) 
   -- Changed survivor spaces to (20971520, 20971520)!
   AdaptiveSizeStop: collection: 6

[PSYoungGen: 223451K->18688K(593920K)] 
   223467K->18704K(1208320K), 0.0105256 secs]
Heap after GC invocations=6 (full 0):
 PSYoungGen      total 593920K, used 18688K [...
  eden space 573440K, 0% used [0x2a000000,0x2a000000,0x4d000000)
  -- "eden" space increased from 204800K to 593920K!

  from space 20480K, 91% used [0x4e400000,0x4f640160,0x4f800000)
  -- "from" space decreased from 204800K to 20480K!
  to   space 20480K, 0% used [0x4d000000,0x4d000000,0x4e400000)
 ParOldGen       total 614400K, used 16K [...
0.485: Total time for which application threads were stopped: 0.0111920 s

In this example, the "eden" space was increased from 204800K to 593920K based on the Adaptive Size Policy suggestion. It is trying to increase the application execution time to meet the throughput goal of 99%.

Last update: 2018.

Table of Contents

 About This Book

 Heap Memory Area and Size Control

 JVM Garbage Collection Logging

 Introduction of Garbage Collectors

 Serial Collector - "+XX:+UseSerialGC"

Parallel Collector - "+XX:+UseParallelGC"

 What Is Parallel Collector

 Parallel Collector GC Log Message Format

 "-XX:+PrintGCTaskTimeStamps" - Print GC Threads

 "-XX:ParallelGCThreads=n" - # of Threads

 Parallel Collector Stops Application for Minor/Major GC

 PSYoungGen Collector Using Tenuring Age

 Parallel Collector Changing NewRatio and SurvivorRatio

 Parallel Collector Adaptive Size Policy

 Adaptive Size Policy Log Messages

 "-XX:+PrintAdaptiveSizePolicy" - Minor GC Report

 Adaptive Size Policy Changed Survivor Space

Adaptive Size Policy Changed Eden Space

 Adaptive Size Policy for Best Latency

 Adaptive Size Policy for Best Throughput

 Concurrent Mark-Sweep (CMS) Collector - "+XX:+UseConcMarkSweepGC"

 Garbage First (G1) Collector - "+XX:+UseG1GC"

 Object References and Garbage Collection

 Garbage Collection Performance Test Program

 Performance Tests on Serial Collector

 Performance Tests on Parallel collector

 Performance Tests on Concurrent collector

 Performance Tests on G1 collector

 Garbage Collection Performance Test Summary

 Outdated Tutorials


 Full Version in PDF/EPUB