RFR: Improve adaptive heuristics

Roman Kennke rkennke at redhat.com
Wed Feb 8 15:09:58 UTC 2017


While watching Shenandoah in the visualizer, I noticed that my double-
marking change caused something else:

- the cset size would go up and down now, fairly chaotically. it used
to be fairly evenly sized
- more worrying: it would almost always leave a lot of heap headroom
unused

Both is caused by the same thing: the collection-set threshold is fixed
and is likely not optimal for the current situation of the program.

Running SPECjvm shows that the actual collection set size varies
greatly with the different benchmarks (between 0 and >50), and so
should the cset-threshold (ideally, the threshold lies close to the avg
cset size).

So I changed that: I keep the last N cset-sizes in a TruncatedNumSeq
and use the decaying-avg as the current cset-threshold. This way, I get
much better heap usage & more even cset sizes. The 'downside' is that
GC phases are not *exactly* evenly spaced anymore, but still very close
to, and most importantly, they don't tend to clump together.

Bottom-line: it's all inter-connected.

Tested with SPECjvm and SPECjbb.

Ok to push?

http://cr.openjdk.java.net/~rkennke/adaptive2/webrev.00/

Roman



More information about the shenandoah-dev mailing list