Hacker News new | ask | show | jobs
by MarkSweep 947 days ago
If you are able to snapshot the state of the JIT, you can do the warming on a single node. The captured JIT state can then be deployed to other machines, saving them from spending time doing the warming. This increases the utilization of your machines.

While this approach sounds like a convoluted way to do ahead of time compilation, I’ve seen it done.

1 comments

IBM's JVM used to support it at one stage, not sure if it still does or if other JVMs have picked it up.
It appears to have a cool-sounding JIT server mode, allowing multiple clients to share a caching JIT compiler which does most of the heavy-lifting:

https://www.usenix.org/conference/atc22/presentation/khrabro...

https://developer.ibm.com/articles/jitserver-optimize-your-j...

It also has a "dynamic AOT compiler", so first-run stuff can be JITed and cached for future execution instead of it all starting out interpreted every time.

The shared class cache was the thing I was thinking of, I think.

https://developer.ibm.com/tutorials/j-class-sharing-openj9/

Looks like maybe there is similar for OpenJDK & Oracle Java as of version 12 (I think it is?)

https://docs.oracle.com/en/java/javase/19/docs/specs/man/jav...