Does it make sense to tweak compilation for training?
Dan Heidinga
dan.heidinga at oracle.com
Mon Dec 15 15:56:19 UTC 2025
That’s a great question - restating my understanding of it: “Is it useful to hardcode specific JIT options that compile early, force methods to be compiled, etc while training?”
We’ve always said that training should match production as closely as possible. The more closely they match (ie: training in production using canary deployments) the better as the training produces training data that exactly matches what the JVM is doing during startup and warmup (and will likely continue to do in future deployments).
If we tweak the JIT settings from the side for training, we may distort the training run in ways that are less useful and result in us missing training data (like profiles) that would be useful if we need to deopt+recompile in the production run.
That’s my long way of saying if you wouldn’t deploy those options on your production runs, you probably don’t want them on your training runs either.
—Dan
From: leyden-dev <leyden-dev-retn at openjdk.org> on behalf of María Arias de Reyna Dominguez <mariasde at redhat.com>
Date: Monday, December 15, 2025 at 4:36 AM
To: leyden-dev <leyden-dev at openjdk.org>
Subject: Does it make sense to tweak compilation for training?
Hi!
While searching for good documentation to link to when explaining Leyden, I found this (rather old) page: https://www.ibm.com/docs/en/sdk-java-technology/8?topic=options-xjit-xnojit with compilation options I didn't know existed.
And I was wondering: does it make sense to force some things during training run to make sure we get the best training? I'm thinking for example on forcing a high level of compilation on some methods, so we arrive to production with more things optimized. Or excluding some "testing framework" methods from compilation.
Or is it better not to touch anything and let Java run normally because this may become too unpredictable?
Or... should I play with this and see what happens because we don't really know? :)
Kind regards,
María Arias de Reyna Domínguez
Senior Software Engineer
She / Her / Hers
ariasdereyna at redhat.com<mailto:ariasdereyna at redhat.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/leyden-dev/attachments/20251215/d36b87a8/attachment.htm>
More information about the leyden-dev
mailing list