Request for review: 7098155: Resize young gen at full collections for UseParallelGC

Jon Masamitsu jon.masamitsu at oracle.com
Thu Nov 7 03:02:27 UTC 2013


Tao,

http://cr.openjdk.java.net/~tamao/7098155/webrev.00/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp.frames.html

Should this block of code

  266     // Swap the survivor spaces if from_space is empty
  267     if (UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection &&
  268         young_gen->from_space()->is_empty()) {
  269       young_gen->from_space()->clear(SpaceDecorator::Mangle);
  270       young_gen->swap_spaces();
  271     }

be under the guard just below it?

  273     if (UseAdaptiveSizePolicy) {

http://cr.openjdk.java.net/~tamao/7098155/webrev.00/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp.frames.html

Same question for this block of code

2103     // Swap the survivor spaces if from_space is empty
2104     if (UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection &&
2105         young_gen->from_space()->is_empty()) {
2106       young_gen->from_space()->clear(SpaceDecorator::Mangle);
2107       young_gen->swap_spaces();
2108     }

Jon



On 9/23/2013 4:13 PM, Tao Mao wrote:
> Hi,
>
> changeset:
> https://bugs.openjdk.java.net/browse/JDK-7098155
>
> In order to avoid the situation for UseParallelGC described in the CR, 
> we need to resize young gen at full collections.
>
> And, according to the heap configuration in young gen, we need to swap 
> from- and to-space () after full gc in order to get the young gen 
> correctly resized after several GC's.
>
> webrev:
> http://cr.openjdk.java.net/~tamao/7098155/webrev.00/
>
> test:
> - Pass JPRT tests
>
> - RefWorkload
>
> (1) ParallelGC (-XX:+UseParallelGC -XX:-UseParallelOldGC)
>
> baseline: -XX:-UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection
> resize: -XX:+UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection
>
> ./compare results_baseline_512m results_resize_512m
> ============================================================================== 
>
> results_baseline_512m:
>   Benchmark           Samples        Mean     Stdev Geomean Weight
>   jetstream                30      192.52      9.86
>   scimark                  30      855.62     30.33
>   specjbb2005              30   145844.73   4552.07
>   specjvm98                30      568.92     10.65
> ============================================================================== 
>
> results_resize_512m:
>   Benchmark           Samples        Mean     Stdev   %Diff     P 
> Significant
>   jetstream                30      192.89     11.33    0.19 
> 0.894            *
>   scimark                  30      862.21     24.17    0.77 
> 0.356            *
>   specjbb2005              30   142749.53   4852.66   -2.12 
> 0.014            *
>   specjvm98                30      566.42      8.55   -0.44 
> 0.320            *
> ============================================================================== 
>
>   * - Not Significant: A non-zero %Diff for the mean could be noise. 
> If the
>       %Diff is 0, an actual difference may still exist. In either 
> case, more
>       samples would be needed to detect an actual difference in sample 
> means.
>
> (2) ParallelOldGC (-XX:+UseParallelGC -XX:+UseParallelOldGC)
>
> baseline: -XX:-UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection
> resize: -XX:+UseAdaptiveSizePolicyResizeYoungGenAtMajorCollection
>
> ./compare results_baseline_512m_ParallelOldGC 
> results_resize_512m_ParallelOldGC
> ============================================================================== 
>
> results_baseline_512m_ParallelOldGC:
>   Benchmark           Samples        Mean     Stdev Geomean Weight
>   jetstream                30      196.15      8.91
>   scimark                  30      855.92     22.58
>   specjbb2005              30   161857.59   2653.89
>   specjvm98                30      554.76     11.31
> ============================================================================== 
>
> results_resize_512m_ParallelOldGC:
>   Benchmark           Samples        Mean     Stdev   %Diff     P 
> Significant
>   jetstream                30      195.17      6.04   -0.50 
> 0.623            *
>   scimark                  30      853.43     22.33   -0.29 
> 0.669            *
>   specjbb2005              30   161027.44   2705.23   -0.51 
> 0.235            *
>   specjvm98                30      560.08      9.74    0.96 
> 0.056            *
> ============================================================================== 
>
>   * - Not Significant: A non-zero %Diff for the mean could be noise. 
> If the
>       %Diff is 0, an actual difference may still exist. In either 
> case, more
>       samples would be needed to detect an actual difference in sample 
> means.
>
> Thanks.
> Tao




More information about the hotspot-gc-dev mailing list