<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Sangheon,<br>
    <br>
    Thanks for the explanation.  I was using a different class<br>
    machine that did not have the same large page size.<br>
    <br>
    Jon<br>
    <br>
    <div class="moz-cite-prefix">On 8/22/2016 4:30 PM, sangheon wrote:<br>
    </div>
    <blockquote
      cite="mid:b996e11b-f368-c33c-d593-140538e22a81@oracle.com"
      type="cite">
      <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
      Hi Jon,<br>
      <br>
      <div class="moz-cite-prefix">On 08/22/2016 02:55 PM, Jon Masamitsu
        wrote:<br>
      </div>
      <blockquote
        cite="mid:00f50a2d-73ea-3bbb-83e2-7f64c487cd05@oracle.com"
        type="cite"> <br>
        <br>
        On 08/22/2016 12:49 PM, sangheon wrote: <br>
        <blockquote type="cite">Hi Dima and Jon, <br>
          <br>
          Let me interrupt a little bit. <br>
          <br>
          As you know, we can have quite big heap alignment with large
          pages enabled. And this affects to our heap ergonomics. <br>
          However, as the test case tests only whether the VM is
          successfully initialized or not, I think large 'Xms' option is
          enough to fix the problem. <br>
          For me, the new 'Xms/Xmx' values seem always OK to initialize
          VM. <br>
          <br>
          Jon, the original test failure contains '-Xms7m -Xmx9m'
          options. <br>
          "GC triggered before VM initialization completed. Try
          increasing NewSize, current value 1280K. " <br>
        </blockquote>
        <br>
        If I execute "java -XX:+PrintGCDetails -XX:+UseConcMarkSweepGC
        -Xms7m -Xmx9m -XX:+UseLargePages -version" <br>
        <br>
        I see <br>
        <br>
        [0.165s][info   ][gc,heap,exit ] Heap <br>
        [0.165s][info   ][gc,heap,exit ]  par new generation   total
        2432K, used 1679K [0x00000000ff600000, 0x00000000ff8a0000,
        0x00000000ff8a0000) <br>
        [0.165s][info   ][gc,heap,exit ]   eden space 2176K,  77% used
        [0x00000000ff600000, 0x00000000ff7a3d30, 0x00000000ff820000) <br>
        [0.165s][info   ][gc,heap,exit ]   from space 256K,   0% used
        [0x00000000ff820000, 0x00000000ff820000, 0x00000000ff860000) <br>
        [0.165s][info   ][gc,heap,exit ]   to   space 256K,   0% used
        [0x00000000ff860000, 0x00000000ff860000, 0x00000000ff8a0000) <br>
        [0.165s][info   ][gc,heap,exit ]  concurrent mark-sweep
        generation total 5504K, used 0K [0x00000000ff8a0000,
        0x00000000ffe00000, 0x0000000100000000) <br>
        <br>
        which says "par new generation   total 2432K" so isn't 2432K the
        ParNew size? <br>
      </blockquote>
      In your log, you are right.<br>
      But I want to ask you whether you ran the above command on the
      same or similar host machine?<br>
      <br>
      I got below message from same kind of machine.<br>
      <br>
      $ java -Xlog:gc+heap=trace -Xms7M -Xmx9M -XX:+UseConcMarkSweepGC
      -XX:+UseLargePages -version<br>
      <br>
      [0.004s][trace][gc,heap] CMS ergo set MaxNewSize: 0<br>
      [0.004s][trace][gc,heap] CMS set min_heap_size: 7340032
      initial_heap_size:  7340032 max_heap: 0<br>
      [0.020s][debug][gc,heap] Minimum heap 536870912  Initial heap
      536870912  Maximum heap 536870912<br>
      [0.020s][trace][gc,heap] 1: Minimum young 1310720  <u><b>Initial
          young 1310720</b></u>  Maximum young 1310720<br>
      [0.020s][trace][gc,heap] Minimum old 65536  Initial old 535560192 
      Maximum old 535560192<br>
      Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve
      shared memory. (error = 1)<br>
      [0.766s][debug][gc,heap] GC(0) Heap before GC invocations=0 (full
      0):<br>
      [0.766s][debug][gc,heap] GC(0)  <b><u>par new generation   total
          1152K</u></b>, used 1024K [0x00000000e0000000,
      0x00000000e0140000, 0x00000000e0140000)<br>
      [0.766s][debug][gc,heap] GC(0)   eden space 1024K, 100% used
      [0x00000000e0000000, 0x00000000e0100000, 0x00000000e0100000)<br>
      [0.766s][debug][gc,heap] GC(0)   from space 128K,   0% used
      [0x00000000e0100000, 0x00000000e0100000, 0x00000000e0120000)<br>
      [0.766s][debug][gc,heap] GC(0)   to   space 128K,   0% used
      [0x00000000e0120000, 0x00000000e0120000, 0x00000000e0140000)<br>
      [0.767s][debug][gc,heap] GC(0)  concurrent mark-sweep generation
      total 523008K, used 0K [0x00000000e0140000, 0x0000000100000000,
      0x0000000100000000)<br>
      [0.767s][debug][gc,heap] GC(0)  Metaspace       used 3786K,
      capacity 4480K, committed 4480K, reserved 1056768K<br>
      [0.767s][debug][gc,heap] GC(0)   class space    used 338K,
      capacity 384K, committed 384K, reserved 1048576K<br>
      [0.798s][info ][gc,heap] GC(0) ParNew: 1024K->126K(1152K)<br>
      [0.799s][info ][gc,heap] GC(0) CMS: 0K->738K(523008K)<br>
      [0.799s][debug][gc,heap] GC(0) Heap after GC invocations=1 (full
      0):<br>
      [0.799s][debug][gc,heap] GC(0)  par new generation   total 1152K,
      used 126K [0x00000000e0000000, 0x00000000e0140000,
      0x00000000e0140000)<br>
      [0.799s][debug][gc,heap] GC(0)   eden space 1024K,   0% used
      [0x00000000e0000000, 0x00000000e0000000, 0x00000000e0100000)<br>
      [0.799s][debug][gc,heap] GC(0)   from space 128K,  98% used
      [0x00000000e0120000, 0x00000000e013f9c8, 0x00000000e0140000)<br>
      [0.799s][debug][gc,heap] GC(0)   to   space 128K,   0% used
      [0x00000000e0100000, 0x00000000e0100000, 0x00000000e0120000)<br>
      [0.799s][debug][gc,heap] GC(0)  concurrent mark-sweep generation
      total 523008K, used 738K [0x00000000e0140000, 0x0000000100000000,
      0x0000000100000000)<br>
      <br>
      So the ParNew size is 1152K and the initial young size is
      1280K(1310720) from my log.<br>
      <br>
      FYI, the test machine has 524288 kB of huge page size and I think
      yours has different huge page size.<br>
      <br>
      Thanks,<br>
      Sangheon<br>
      <br>
      <br>
      <blockquote
        cite="mid:00f50a2d-73ea-3bbb-83e2-7f64c487cd05@oracle.com"
        type="cite"> <br>
        Jon <br>
        <br>
        <blockquote type="cite"> <br>
          To answer to Jon's original question, the reason of "1280k
          (1310720)" is that NewSize(default value of 1363144) is
          aligned to gen alignment(65536) from
          GenCollectorPolicy::initialize_flags().
          collectorPolicy.cpp:line 316 <br>
          We resize NewSize from
          GenCollectorPolicy::initialize_size_info() if needed, but it
          seems like this is not the case. <br>
          <br>
          Given above, the patch seems okay. <br>
          <br>
          Thanks, <br>
          Sangheon <br>
          <br>
          <br>
          On 08/22/2016 10:37 AM, Jon Masamitsu wrote: <br>
          <blockquote type="cite"> <br>
            <br>
            On 08/22/2016 08:55 AM, Dmitry Fazunenko wrote: <br>
            <blockquote type="cite">Jon, <br>
              <br>
              The problem could be reproduced by the following command:
              <br>
              <br>
              #> java -Xmx3m -XX:+UseConcMarkSweepGC
              -XX:+AggressiveOpts -version <br>
              Error occurred during initialization of VM <br>
              GC triggered before VM initialization completed. Try
              increasing NewSize, current value 640K. <br>
            </blockquote>
            <br>
            I didn't notice that "-Xmx3m" was on the command line for
            the original failure. <br>
            Without -Xmx3m I expected that the default heap was large
            and wondered why <br>
            NewSize was so small. <br>
            <br>
            Jon <br>
            <br>
            <blockquote type="cite"> <br>
              increasing Xmx from 3m to 4m helps: <br>
              <br>
              #> java -Xmx4m -XX:+UseConcMarkSweepGC
              -XX:+AggressiveOpts -version <br>
              java version "9-ea" <br>
              Java(TM) SE Runtime Environment (build 9-ea+132) <br>
              Java HotSpot(TM) 64-Bit Server VM (build 9-ea+132, mixed
              mode) <br>
              <br>
              I don't see anything suspicious in the GC log (attached).
              <br>
              <br>
              There is no requirement to minimal heap required for
              Hotspot to work normally, so I think the tests should not
              start VM with so small heaps. <br>
              <br>
              <br>
              Thanks, <br>
              Dima <br>
              <br>
              <br>
              <br>
              <br>
              On 19.08.2016 21:02, Jon Masamitsu wrote: <br>
              <blockquote type="cite">Dima, <br>
                <br>
                The error message I see in the logs is <br>
                <br>
                GC triggered before VM initialization completed. Try
                increasing NewSize, current value 1280K. <br>
                <br>
                Do you know why the NewSize is so small?  I ask because
                I'm <br>
                not sure setting a larger heap size will always fix this
                failure. <br>
                <br>
                If the test is run (with the parameters that fail) and
                -Xlog:gc*=trace, you might <br>
                see why the NewSize is so small (if you don't know now).
                <br>
                <br>
                Jon <br>
                <br>
                <br>
                On 8/19/2016 9:02 AM, Dmitry Fazunenko wrote: <br>
                <blockquote type="cite">Hello, <br>
                  <br>
                  May I have to get a couple of reviews for a trivial
                  fix: <br>
                  <br>
                  <a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="https://bugs.openjdk.java.net/browse/JDK-8164133">https://bugs.openjdk.java.net/browse/JDK-8164133</a>
                  <br>
                  <a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="http://cr.openjdk.java.net/%7Edfazunen/8164133/webrev.01/">http://cr.openjdk.java.net/~dfazunen/8164133/webrev.01/</a>
                  <br>
                  <br>
                  Two tests set very small maximum heap size, which may
                  cause: <br>
                    starts VM with too small heap size, which might
                  cause <br>
                    Error occurred during initialization of VM <br>
                  None of those tests does really require such a small
                  heap, so just increasing should help. <br>
                  <br>
                  Thanks, <br>
                  Dima <br>
                  <br>
                  <br>
                  <br>
                </blockquote>
                <br>
              </blockquote>
              <br>
            </blockquote>
            <br>
          </blockquote>
          <br>
        </blockquote>
        <br>
      </blockquote>
      <br>
    </blockquote>
    <br>
  </body>
</html>