JDK-8361520 : Stabilize SystemGC benchmarks
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 25
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2025-07-07
  • Updated: 2025-07-07
Related Reports
Causes :  
Relates :  
Description
Noticed this while working on a related bug (JDK-8359960):

First, I see the benchmark executes a single shot per fork. As such, I believe the benchmark really tests the cost of initial GC, that probably drags a lot of (potentially non-benchmark-related) objects through new (possibly awkwardly wired, despite +AlwaysPreTouch) memory. The first iteration is 80 ms/op for me here, and the second one is -- whoosh -- only 3 ms/op! Second, and I think that is related, the benchmark is really, really noisy.