Strange behaviour on half-occupied heap

Aleksey Shipilev shade at redhat.com
Thu Aug 16 09:30:51 UTC 2018


On 08/10/2018 05:22 PM, Simon Ogorodnik wrote:
> Sometime after long run (8-9 hours with almost half-occupied heap) of application with Shenandoah GC, I observe strange behaviour
> I can describe it as continuous evacuation of whole GCLAB. 

Thanks for the verbose bug report!

I think this is a heuristics bug. Adaptive CSet selection decides how much to evacuate based on the
heuristics guidance how much free space we have to have by the end of the cycle ("Min Garbage"
below). The runaway happens when that target free threshold tanks significantly, so heuristics
decides to evacuate everything in reach.

I'll study why that happens. Meanwhile, you may want to cap the max at, say, 30% with
-XX:ShenandoahMaxFreeThreshold=30.

Thanks,
-Aleksey

$ grep -E "(Adaptive CSet|Adjusting free threshold)" ~/Downloads/gclog.log.1

; Normal operation:
Adaptive CSet Selection. Target Free: 389M, Actual Free: 329M, Max CSet: 247M, Min Garbage: 59M
Adjusting free threshold to: 12% (245M)
Adaptive CSet Selection. Target Free: 348M, Actual Free: 617M, Max CSet: 463M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 462M, Max CSet: 346M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 206M, Max CSet: 155M, Min Garbage: 141M
Adjusting free threshold to: 17% (348M)
Adaptive CSet Selection. Target Free: 450M, Actual Free: 590M, Max CSet: 443M, Min Garbage: 0M
Adjusting free threshold to: 12% (245M)
Adaptive CSet Selection. Target Free: 348M, Actual Free: 726M, Max CSet: 545M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 807M, Max CSet: 605M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 839M, Max CSet: 629M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 803M, Max CSet: 602M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 834M, Max CSet: 625M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 873M, Max CSet: 654M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 907M, Max CSet: 680M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 908M, Max CSet: 681M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 963M, Max CSet: 722M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 719M, Max CSet: 539M, Min Garbage: 0M
Adaptive CSet Selection. Target Free: 348M, Actual Free: 323M, Max CSet: 242M, Min Garbage: 24M
Adjusting free threshold to: 16% (327M)

; runaway starts here:
Adaptive CSet Selection. Target Free: 430M, Actual Free: 266M, Max CSet: 199M, Min Garbage: 164M
Adjusting free threshold to: 21% (430M)
Adaptive CSet Selection. Target Free: 532M, Actual Free: 315M, Max CSet: 236M, Min Garbage: 217M
Adjusting free threshold to: 26% (532M)
Adaptive CSet Selection. Target Free: 634M, Actual Free: 365M, Max CSet: 273M, Min Garbage: 269M
Adjusting free threshold to: 36% (737M)
Adaptive CSet Selection. Target Free: 839M, Actual Free: 497M, Max CSet: 372M, Min Garbage: 342M
Adjusting free threshold to: 41% (839M)
Adaptive CSet Selection. Target Free: 942M, Actual Free: 601M, Max CSet: 450M, Min Garbage: 341M
Adjusting free threshold to: 45% (921M)
Adaptive CSet Selection. Target Free: 1024M, Actual Free: 586M, Max CSet: 439M, Min Garbage: 438M
...
Adjusting free threshold to: 58% (1187M)
Adaptive CSet Selection. Target Free: 1290M, Actual Free: 1019M, Max CSet: 764M, Min Garbage: 271M
Adjusting free threshold to: 60% (1228M)
Adaptive CSet Selection. Target Free: 1331M, Actual Free: 1043M, Max CSet: 782M, Min Garbage: 287M
Adjusting free threshold to: 63% (1290M)
Adaptive CSet Selection. Target Free: 1392M, Actual Free: 1027M, Max CSet: 770M, Min Garbage: 365M
Adjusting free threshold to: 67% (1372M)
Adaptive CSet Selection. Target Free: 1474M, Actual Free: 1046M, Max CSet: 784M, Min Garbage: 428M
Adjusting free threshold to: 69% (1413M)
...




More information about the shenandoah-dev mailing list