Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-1616

getPhysicalMemory() returns -1 in an IBM JVM

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 3.0.0
    • Component/s: core server
    • Labels:
      None
    • Support Ticket IDs:
    • Sprint:
      DJ Sustaining Sprint 10, DJ Sustaining Sprint 12

      Description

      Startup logging reports:

      [02/Nov/2014:16:14:01 -0500] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381713 msg=JVM Information: pxa6470_27sr1fp1-20140708_01 (SR1 FP1) by IBM Corporation, 64-bit architecture, 536870912 bytes heap size
      [02/Nov/2014:16:14:01 -0500] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381716 msg=JVM Host: chassis-migration-iam-0001.autobahn.tools.example.com, running Linux 2.6.32-431.11.2.el6.x86_64 amd64, unknown physical memory size, number of processors available 32
      [02/Nov/2014:16:14:01 -0500] category=RUNTIME_INFORMATION severity=NOTICE msgID=20381715 msg=JVM Arguments: "-Xoptionsfile=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64/compressedrefs/options.default", "-Xlockword:mode=default,noLockword=java/lang/String,noLockword=java/util/MapEntry,noLockword=java/util/HashMap$Entry,noLockword=org/apache/harmony/luni/util/ModifiedMap$Entry,noLockword=java/util/Hashtable$Entry,noLockword=java/lang/invoke/MethodType,noLockword=java/lang/invoke/MethodHandle,noLockword=java/lang/invoke/CollectHandle,noLockword=java/lang/invoke/ConstructorHandle,noLockword=java/lang/invoke/ConvertHandle,noLockword=java/lang/invoke/ArgumentConversionHandle,noLockword=java/lang/invoke/AsTypeHandle,noLockword=java/lang/invoke/ExplicitCastHandle,noLockword=java/lang/invoke/FilterReturnHandle,noLockword=java/lang/invoke/DirectHandle,noLockword=java/lang/invoke/ReceiverBoundHandle,noLockword=java/lang/invoke/DynamicInvokerHandle,noLockword=java/lang/invoke/FieldHandle,noLockword=java/lang/invoke/FieldGetterHandle,noLockword=java/lang/invoke/FieldSetterHandle,noLockword=java/lang/invoke/StaticFieldGetterHandle,noLockword=java/lang/invoke/StaticFieldSetterHandle,noLockword=java/lang/invoke/IndirectHandle,noLockword=java/lang/invoke/InterfaceHandle,noLockword=java/lang/invoke/VirtualHandle,noLockword=java/lang/invoke/InvokeExactHandle,noLockword=java/lang/invoke/InvokeGenericHandle,noLockword=java/lang/invoke/VarargsCollectorHandle,noLockword=java/lang/invoke/ThunkTuple", "-Xjcl:jclse7b_27", "-Dcom.ibm.oti.vm.bootstrap.library.path=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64/compressedrefs:/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64", "-Dsun.boot.library.path=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64/compressedrefs:/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64", "-Djava.library.path=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64/compressedrefs:/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/amd64::/usr/lib", "-Djava.home=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre", "-Djava.ext.dirs=/usr/lib/jvm/java-1.7.1-ibm-1.7.1.1.1.x86_64/jre/lib/ext", "-Duser.dir=/opt/ldifs", "-Djava.runtime.version=pxa6470_27sr1fp1-20140708_01 (SR1 FP1)", "-Djava.class.path=/opt/opendj/classes:/opt/opendj/resources/*.jar:/opt/opendj/lib/bootstrap.jar", "-server", "-Dorg.opends.server.scriptName=import-ldif", "-Dsun.java.command=org.opends.server.tools.ImportLDIF --configClass org.opends.server.extensions.ConfigFileHandler --configFile /opt/opendj/config/config.ldif --append --noPropertiesFile --replaceExisting --rejectFile /opt/ldifs/rej.ldif --includeBranch dc=chassis,dc=example,dc=com --backendID identities --ldifFile /opt/ldifs/full_members.ldif", "-Dsun.java.launcher=SUN_STANDARD", "-Dsun.java.launcher.pid=122788"
      

      We log "unknown" for the memory size if getPhysicalMemory() returns -1, which it looks like it will do for non-Sun JVMs.

      A subsequent large import-ldif job (25m entries) starts adding at 10k/sec but hits some limit and subsequently the rate drops to 1k/sec. It is likely that the memory budgetting calculations don't anticipate getPhysicalMemory() returning -1.

        Attachments

          Activity

            People

            • Assignee:
              ian.packer Ian Packer [X] (Inactive)
              Reporter:
              cjr Chris Ridd
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: