-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a JDK with CRaC #223
Comments
Is CRAC only optimized the startup time |
CRaC snapshots the state of the process and reloads it. This includes code compiled by the JIT, and could reduce time to peak performance. |
Yeah, I think we can add that. Struggling with some more general issues with the environment right now tough, so it may take a bit. |
That's not urgent, I did some tests and using it in a restricted environment would probably take a lot of your time to configure everything correctly, and you already gave a lot of time. |
Sdkman has Liberica and Zulu builds with CRaC. There are complications tho:
FWIW: I tried a quick experiment: [...]
static boolean execute = true;
static boolean restored = false;
[...]
static class Hook implements Resource {
@Override
public void beforeCheckpoint(Context<? extends Resource> context) {
System.out.println("Before checkpoint");
execute = false;
}
@Override
public void afterRestore(Context<? extends Resource> context) {
System.out.println("After restore");
execute = true;
restored = true;
}
}
public static void main(String[] args) throws Exception {
Core.getGlobalContext().register(new Hook());
while (execute) {
long msStart = System.currentTimeMillis();
calculate();
long durationMs = System.currentTimeMillis() - msStart;
System.out.println("Pure calculation took " + durationMs + " ms");
execute = false;
if (!restored) {
Core.checkpointRestore();
}
}
} Interestingly enough, after restoring from a snapshot the aggregation took longer (by a lot, 1s or so) than the first execution. |
Nice. Thx for sharing, @jerrinot! Would be curious to know how an entry would fare with CRaC. |
I would like to try something with CRaC. I don't think SDKMan can install it, could you do it manually?
Could you install it?
It is available from Azul, but is a specific version of Zulu.
https://www.azul.com/downloads/?version=java-21-lts&os=fedora&architecture=x86-64-bit&package=jdk-crac#zulu
Thank you.
The text was updated successfully, but these errors were encountered: