Lilliput impact on startup time

Stefan Karlsson stefan.karlsson at oracle.com
Mon Nov 25 14:43:56 UTC 2024


Hi Georgios,

The regression seems to come from the lack of CDS. I see similar 
regressions when I run with -Xshare:off.

I guess that these EA builds don't include the CDS archive for compact 
object headers:
$ time jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions 
-XX:+UseCompactObjectHeaders -Xlog:cds*=trace -version
[0.012s][info][cds] trying to map 
/home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa
[0.012s][info][cds] Specified shared archive not found 
(/home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa)
[0.012s][info][cds] Initialize static archive failed.
[0.012s][info][cds] Unable to map shared spaces

Try to first dump the CDS archive with:
$ jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions 
-XX:+UseCompactObjectHeaders -Xshare:dump -version

After I have run that I get the CDS archive:
$ time jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions 
-XX:+UseCompactObjectHeaders -Xlog:cds*=trace -version
[0.011s][info][cds] trying to map 
/home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa
[0.011s][info][cds] Opened archive 
/home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa.
[0.011s][info][cds] Archive was created with UseCompressedOops = 1, 
UseCompressedClassPointers = 1, UseCompactObjectHeaders = 1
...

Could you try and see if that helps the startup times for you?

Cheers,
StefanK

On 2024-11-25 15:22, Georgios Andrianakis wrote:
> Hi folks,
>
> I just tried the Lilliput (JEP 450) using the latest OpenJDK 24 EA 
> build <https://jdk.java.net/24/> on a sample Quarkus application 
> <https://github.com/quarkusio/quarkus-quickstarts/tree/main/rest-client-quickstart>to 
> see how beneficial Lilliput can be for us.
>
> On my machine (a Ryzen 5950X running Linux) with Lilliput disabled, 
> the application starts up in around 600ms and consumes around 140MB of 
> RSS memory (before the application handles any traffic).
> With Lilliput enabled (via -XX:+UnlockExperimentalVMOptions 
> -XX:+UseCompactObjectHeaders) I see RSS falling to around 130MB which 
> is really nice!
> However I also see a startup regression of around 30ms (approximately 
> 5%). Is this something that is expected?
>
> Thanks!
>
> P.S. Apologies if this is not the correct mailing list for Lilliput 
> related topics
>
> -- 
>
> Georgios Andrianakis
>
> Independent Contractor
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20241125/afae0759/attachment-0001.htm>


More information about the hotspot-dev mailing list