[crac] RFR: 8321660: [CRaC] Trim native heap before checkpoint to decrease image size
Radim Vansa
rvansa at openjdk.org
Mon Dec 11 11:51:51 UTC 2023
On Sun, 10 Dec 2023 18:45:50 GMT, Volker Simonis <simonis at openjdk.org> wrote:
> Before checkpointing, we should trim the native C-heap in order to decrease the size of the generated CRaC image.
>
> Without C-heap trimming, the size of a HelloWorld image is ~32m and the one for SpringPetclinic ~209m. If we trim the C-heap before checkpointin, the image size decreses to ~30m for HelloWorld and 170m for SpringPetclinic.
>
> I've also added a new logging tag `crac` because I think it would be nice to log more CRaC details/internals in universal logging.
>
> Please let me know what you think?
This definitely makes a sense, and since we are now based on JDK 21 it's possible to do that through platform-independent code, as you did.
Just a question: have you considered pros and cons trimming the heap inside the safepoint (VM_Crac)?
-------------
PR Comment: https://git.openjdk.org/crac/pull/148#issuecomment-1849913065
More information about the crac-dev
mailing list