JVM Pretouch
Martin Welgemoed
martin.welgemoed at commercetools.com
Tue Nov 12 11:50:50 UTC 2024
Hello everyone,
I've been experimenting with CRaC in the Azul image and the benchmarks
have been truly impressive, thanks for this excellent project!
So far I've hit two snags and I'm curious if anyone else has run into
them and has a solution/workaround to share.
First after the restore the effects of "AlwaysPreTouch" have been
undone. So far I've just been manually allocating and freeing a giant
slab of memory (either as an array or with "unsafe") after the restore
in java code. This has basically the same effect but performs a bit
worse than the jvm os::pretouch_memory.
Secondly, java options such as Xmx are read and processed only once at
process startup. This means that every process restored from a
snapshot must have the exact same Xmx. Ideally I'd like to use the
same snapshot multiple times in different deployments with different
memory settings. For this I can find no workaround, as far as I can
tell the jvm heap size is fixed at startup and can never be changed
again.
Kind regards,
--
Martin Welgemoed
Scala Engineer
martin.welgemoed at commercetools.com
T. +49 (89) 99 82 996-0
commercetools B.V. | Prins Bernhardplein 200 | 1097 JB Amsterdam
--
commercetools B.V.
Prins Bernhardplein 200, 1097 JB Amsterdam |
Netherlands
www.commercetools.com <http://www.commercetools.com/>
More information about the crac-dev
mailing list