RFR (S): Parallel AlwaysPreTouch
shade at redhat.com
Mon Oct 10 12:18:16 UTC 2016
It is not unusual for low-latency customers with large heaps to enable
-XX:+AlwaysPreTouch, that touches every page preemptively during the
allocation (e.g. on startup). This pays the upfront cost during startup,
instead of during the execution.
However, pre-touching on larger heaps may take a while, see e.g. G1 on 1
Tb heap reports 10 minutes (!) to init the heap . So, G1 made the
pre-touch parallel. We can do it too:
On my 4-core desktop, -XX:+AlwaysPreTouch HelloWorld with 20 Gb heap
improves 4.5s -> 1.8s. I would expect this improvement to be larger on
Note that shared VM changes match the G1 changes , which means we
should nicely fit during the next merge.
More information about the shenandoah-dev