<div dir="ltr"><div>Hello Stefan,</div><div><br></div><div>Thanks a lot for the tip! </div><div>Indeed, forcing the creation of the archive eliminates the regression in startup time. <br></div><div><br></div><div>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?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Nov 25, 2024 at 4:44 PM Stefan Karlsson <<a href="mailto:stefan.karlsson@oracle.com">stefan.karlsson@oracle.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  
  <div>
    Hi Georgios,<br>
    <br>
    The regression seems to come from the lack of CDS. I see similar
    regressions when I run with -Xshare:off.<br>
    <br>
    I guess that these EA builds don't include the CDS archive for
    compact object headers:<br>
    $ time jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions
    -XX:+UseCompactObjectHeaders -Xlog:cds*=trace -version<br>
    [0.012s][info][cds] trying to map
    /home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa<br>
    [0.012s][info][cds] Specified shared archive not found
    (/home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa)<br>
    [0.012s][info][cds] Initialize static archive failed.<br>
    [0.012s][info][cds] Unable to map shared spaces<br>
    <br>
    Try to first dump the CDS archive with:<br>
    $ jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions
    -XX:+UseCompactObjectHeaders -Xshare:dump -version<br>
    <br>
    After I have run that I get the CDS archive:<br>
    $ time jdk-24-ea-b25/bin/java -XX:+UnlockExperimentalVMOptions
    -XX:+UseCompactObjectHeaders -Xlog:cds*=trace -version<br>
    [0.011s][info][cds] trying to map
    /home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa<br>
    [0.011s][info][cds] Opened archive
    /home/stefank/java/jdk-24-ea-b25/lib/server/classes_coh.jsa.<br>
    [0.011s][info][cds] Archive was created with UseCompressedOops = 1,
    UseCompressedClassPointers = 1, UseCompactObjectHeaders = 1<br>
    ...<br>
    <br>
    Could you try and see if that helps the startup times for you?<br>
    <br>
    Cheers,<br>
    StefanK<br>
    <br>
    <div>On 2024-11-25 15:22, Georgios
      Andrianakis wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>
          <div>Hi folks,</div>
          <div><br>
          </div>
          <div>I just tried the Lilliput (JEP 450) using the latest
            OpenJDK 24 EA <a href="https://jdk.java.net/24/" target="_blank">build</a> on a <a href="https://github.com/quarkusio/quarkus-quickstarts/tree/main/rest-client-quickstart" target="_blank">sample Quarkus
              application </a>to see how beneficial Lilliput can be for
            us.</div>
          <div><br>
          </div>
          <div>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). <br>
          </div>
          <div>With Lilliput enabled (via 
            -XX:+UnlockExperimentalVMOptions
            -XX:+UseCompactObjectHeaders) I see RSS falling to around
            130MB which is really nice!</div>
          <div>However I also see a startup regression of around 30ms
            (approximately 5%). Is this something that is expected?</div>
          <div><br>
          </div>
          <div>Thanks!<br>
          </div>
          <div><br>
          </div>
          <div>P.S. Apologies if this is not the correct mailing list
            for Lilliput related topics<font color="#888888"><br clear="all">
            </font></div>
        </div>
        <br>
        <span class="gmail_signature_prefix">-- </span><br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <p style="font-weight:bold;margin:0px;padding:0px;font-size:14px;font-family:"RedHatText",sans-serif">
                <span>Georgios</span> <span>Andrianakis</span> <span style="color:rgb(170,170,170);margin:0px"></span> </p>
              <p style="font-weight:normal;font-size:12px;margin:0px;font-family:"RedHatText",sans-serif">
                <span>Independent Contractor</span></p>
              <p style="font-weight:normal;font-size:12px;margin:0px;font-family:"RedHatText",sans-serif"><span><br>
                </span> </p>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </div>

</blockquote></div><div><br clear="all"></div><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>
        <p style="font-weight:bold;margin:0px;padding:0px;font-size:14px;font-family:"RedHatText",sans-serif">
          <span>Georgios</span>
          <span>Andrianakis</span>
          <span style="color:rgb(170,170,170);margin:0px"></span>
        </p>
        
        <p style="font-weight:normal;font-size:12px;margin:0px;font-family:"RedHatText",sans-serif">
          <span>Independent Contractor</span></p><p style="font-weight:normal;font-size:12px;margin:0px;font-family:"RedHatText",sans-serif"><span><br></span>
        </p>
        
        <div style="margin-bottom:8px"></div></div></div></div>