Lilliput impact on startup time
Georgios Andrianakis
gandrian at redhat.com
Mon Nov 25 16:56:00 UTC 2024
Just tried Alexey's build and everything works like a charm!
Thanks for the help folks!
On Mon, Nov 25, 2024 at 6:26 PM Georgios Andrianakis <gandrian at redhat.com>
wrote:
> Thanks a lot for the information Roman!
>
> I will try Alexey's builds and report back if there are any issues.
>
> On Mon, Nov 25, 2024 at 6:16 PM Kennke, Roman <rkennke at amazon.de> wrote:
>
>> Hi Georgios,
>>
>> This is a peculiarity with the Oracle builds. Oracle has decided to not
>> generate CDS archives with compact headers in their builds:
>> https://bugs.openjdk.org/browse/JDK-8341553
>>
>> Other vendors are free to generate compact-headers-CDS-archives, and,
>> afaik, it is on-by-default in OpenJDK sources.
>>
>> FWIW, the COH-CDS archives are generated in Aleksey’s build, you may want
>> to give them a try:
>> https://builds.shipilev.net/openjdk-jdk/
>>
>> Roman
>>
>>
>> > 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 on a sample Quarkus application 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
>>
>>
>>
>>
>>
>> Amazon Web Services Development Center Germany GmbH
>> Krausenstr. 38
>> 10117 Berlin
>> Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
>> Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
>> Sitz: Berlin
>> Ust-ID: DE 365 538 597
>>
>
>
> --
>
> 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/d169d773/attachment-0001.htm>
More information about the hotspot-dev
mailing list