Lilliput impact on startup time
Georgios Andrianakis
gandrian at redhat.com
Mon Nov 25 14:50:12 UTC 2024
Hello Stefan,
Thanks a lot for the tip!
Indeed, forcing the creation of the archive eliminates the regression in
startup time.
So now my question becomes, will this process be necessary even when JDK 24
ships, or will the archive be part of the release so users don't have to
create it manually?
On Mon, Nov 25, 2024 at 4:44 PM Stefan Karlsson <stefan.karlsson at oracle.com>
wrote:
> 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
>
>
>
>
--
Georgios Andrianakis
Independent Contractor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-dev/attachments/20241125/28da6059/attachment.htm>
More information about the hotspot-dev
mailing list