Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6465357

CMS: default choice of NewSize can cause obscure startup failure w/small -Xms

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs10
    • 6
    • hotspot
    • None
    • gc
    • 1.4.2
    • b03
    • generic
    • generic

        A change in the default choice of NewSize w/CMS has revealed an
        existing day-one bug that can cause a start-up error w/small
        initial heap settings:

        % $ALT_BOOTDIR/bin/java -version
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
        Java HotSpot(TM) Server VM (build 1.5.0-b64, mixed mode)

        % $ALT_BOOTDIR/bin/java -server -Xms4m -Xmx128m -XX:+UseConcMarkSweepGC -version
        Error occurred during initialization of VM
        Too small initial heap for new size specified

        % $ALT_BOOTDIR/bin/java -server -Xms4m -XX:NewSize=2m -Xmx128m -XX:+UseConcMarkSweepGC -version
        java version "1.5.0"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
        Java HotSpot(TM) Server VM (build 1.5.0-b64, mixed mode)


        This becomes somewhat worse with 6.0 where the default settings were changed
        to use a larger default NewSize:

        % $BOOTDIR/bin/java -version
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
        Java HotSpot(TM) Server VM (build 1.6.0-rc-b97, mixed mode)

        % $BOOTDIR/bin/java -server -Xms16m -Xmx128m -XX:+UseConcMarkSweepGC -version
        Error occurred during initialization of VM
        Too small initial heap for new size specified

        % $BOOTDIR/bin/java -server -Xms16m -XX:NewSize=8m -Xmx128m -XX:+UseConcMarkSweepGC -version
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
        Java HotSpot(TM) Server VM (build 1.6.0-rc-b97, mixed mode)

        % $BOOTDIR/bin/java -server -Xms18m -XX:+UseConcMarkSweepGC -version
        java version "1.6.0-rc"
        Java(TM) SE Runtime Environment (build 1.6.0-rc-b97)
        Java HotSpot(TM) Server VM (build 1.6.0-rc-b97, mixed mode)

              ysr Y. Ramakrishna
              ysr Y. Ramakrishna
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: