JVM arguments

Hi,
I am using a pre-determined set of VM arguments where -Xmx was 500m. I am a bit skeptic about the 500m, would there be any problem of not using VM memory arguments which are not multiples of 256m(I am not sure if there is a word for memory sizes which are exact figures like 256, 512, 1k etc).
Would there be any performance difference(big or small) between using 500m and 512m as the -xmX VM argument.
Thank you very much,
Amnesiac.

1) You have allocated 500 MB. You use 296.
2) You have allocated 512 MB. You use 296.
Do you think there's a performance difference? :) There won't be unless your program's GC behavior accidentally leads to thrashing in that lat particular 12 MB, which is unlikely.
The word you are looking for are "powers of 2" I think, by the way.

Similar Messages

  • Why are my JVM arguments not taking effect

    Hi,
    I'm trying to set the  -Dweblogic.security.SSL.protocolVersion=TLS1 at the server level as well as application.
    For the application (Agile PLM), I added the above into the Arguments section in the Console UI and I can see the change in the config.xml but I can still connect to .../Agile  using nothing SSL3 when I set my browser to use it only. I know my browser works OK because I changed our Atlassian product and it gives me errors with just SSL3.0.
    I'm also trying to set the set setting at the server level because I believe that the LDAP SSL error that I'm getting is due to the Domain Controller no longer accepting SSL 3.0 but I tried changed SetDomainEnv.cmd and SetEnv.cmd and neither would work as I can still get the /Console page.
    I'm on Windows 2008R2, WLS 12.c Agile 9.3.4
    in every case, I shut down WLS and restarted it.
    What is the correct file for WLS12.c on Windows to set the JVM arguments as I find answers to update different files or use WLST which I haven't used it yet but I should be able to just update the correct file and get the Protocol enforced?
    The command that I added to my two files:
    on SetDomainEnv.cmd:
    set JAVA_OPTIONS= -Dweblogic.security.SSL.protocolVersion=TLS1 %JAVA_OPTIONS%
    on SetEnv.cmd:
    SET JAVA_OPTIONS_WIN=-Dweblogic.security.SSL.protocolVersion=TLS1   
    Thanks
    Anatole

    Connect your device to a computer's itunes - that's the most reliable way to copy photos.  You should be doing this anyway, otherwise if the device craps out, you may end up losing all your photos.  Even if you have backup to icloud turned on - many users have discovered that a restore didn't return their pictures.
    As for photo stream...
    Check the following:
    From your Home screen, tap Settings > iCloud > Photo Stream, and make sure the slider is set to the ON position.
    From the Home screen, tap Settings > Wi-Fi, make sure the slider is set to ON, and that your device is connected to a wireless network.
    Ensure that Camera app is closed on the device where you took the photo. Photo Stream will not upload photos from an iOS device until the Camera app is closed.
    Ensure your iOS device has not fallen below 20% battery power. To preserve battery life, Photo Stream downloading and uploading are disabled when the battery reaches this threshold. Downloading and uploading will resume once you charge your device, and the battery charge is greater than 20%.

  • Specified in jnlp jvm argument but not   applied   by browser

    jlnp file specifies passing passing vm arguments   using java-vm-arguments attribute , it also provides list of acceptable arguments  as mentioned here http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html.
    In my case , jvm argument  is   -Djava.security.debug=sunpkcs11,pkcs11. I added   this to jlnp file but this  is never loded by the browser jvm.  This is not mentioned in the above link so can this argument be passed to an applet?
    here is my jnlp file
    <pre>
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="" href="">
        <information>
            <title>Applet</title>
            <vendor>ARTMS</vendor>
        </information>
        <resources>
            <j2se version="1.7+"  java-vm-args="-Djava.security.debug=sunpkcs11,pkcs11"/>
            <jar href="dsapplet.jar"/>
        </resources>
        <property name="java.security.debug" value="sunpkcs11,pkcs11"/>
        <applet-desc
             name="Applet"
             main-class="com.service.TestApplet"
             width="900"
             height="300">
                 <param name="java_arguments" value="-Djava.security.debug=sunpkcs11,pkcs11"/>
         </applet-desc>
      <security>
      <all-permissions/>
      </security>
         <update check="background"/>
    </jnlp>
    </pre>

    I tried with java web start still the jvm argument is not applied , please advice can this argument  -Djava.security.debug=sunpkcs11,pkcs11    be applied to java web start ?

  • Why does buckminster not resolve my passed JVM argument?

    I have a jenkins job which uses buckminster to build an eclipse product.
    At the beginning I have an "Extended Choice Parameter" where the "customer" key can be selected.
    In the buckminster configuration I use this "customer" variable to select the right cquery:
    import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'
    Since the variable "customer" is per default not available in the commands, I added the following to the "JVM arguments":
    -Dcustomer=${customer}
    This all used to work well, but now I updated the server and build environment from Java 1.7 32-Bit to Java 1.8 64-Bit. Since then I get the following error trying to build:
    java.io.FileNotFoundException: [Path to job]\source\scodi-customer\${customer}\server\features\ch.scodi.${customer}.server.feature\site.cquery (The system cannot find the path specified)
    Before the variable was resolved fine.
    Is this a buckminster or java8 problem, not being able to resolve the ${customer} variable? Is there maybe another (cleaner) way to pass the variable to the buckminster configuration?
    I did some further testing and added the following to the JVM arguments, I get the same exception referring to a missing ${customer}. It looks to me that JVM arguments are ignored.
    -Dcustomer=CUSTOMER

    Finally I found a workaround.
    I had to rename my "customer" variable to "CUSTOMER", now it is resolved in the buckminster command area:
    From:
    import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'
    To:
    import '${WORKSPACE}/source/scodi-customer/${CUSTOMER}/server/features/ch.scodi.${CUSTOMER}.server.feature/site.cquery'
    Also my JVM parameters from:
    -Dcustomer=${customer}
    To:
    -Dcustomer=${CUSTOMER}
    Found out the JVM parameters are not relevant to the buckminster command interface but are used later in "cspex" files.
    Running Jenkins on a Windows machine this might be the Problem...
    So the actual problem was the naming of the "Extended Choice Parameter", not being capitalized.

  • Default JVM arguments

    Hi
    I would like to know what are the default JVM arguments when server jvm is started without any additional flags, like this:
    java -server myapp
    I have been unable to find bullet proof document from those. I'm running Sun 1.5.0_08 on 32bit Win2003.
    I would espacially be interested on thread stack size, useTLAB?, xmx & xms...
    Br
    Draes

    Ah, yes - it is the defaults for MaxPermSize
    that are 32m for client and 64m for server.The default MaxPermSize is 64m for both client and
    server, at least in 1.4 and later releases.
    However, starting with 1.5, the default value for
    PermSize, which is the initial size of the
    permanent generation, is different: server is 16m,
    client is 8m in 1.5 and 12m in 1.6.Already from 1.4.2: http://java.sun.com/docs/hotspot/gc1.4.2/faq.html (FAQ #30)
    I do find it strange that I can find no mention of these changes in the release notes;
    http://java.sun.com/products/archive/j2se/1.4.0_04/ReleaseNotes.html
    http://java.sun.com/products/archive/j2se/1.4.1_07/ReleaseNotes.html

  • Setting jvm arguments

    Hello,
    I know there is a way to get jvm arguments from a java program using the java.lang.management.RuntimeMXBean.getInputArguments() method.
    But, is there a way to set them from a java program ?
    Would appreciate any help.

    For a web application, the JVM properties indeed need to be set for the application server's JVM and as such it cannot be set in the IDE. (The IDE cannot pass the parameters anyway since it merely invokes the commands provided by the appserver to start/stop/deploy-apps).
    To solve your problem, you will need to set the JVM arguments at the appserver. You can set the JVM arguments in the admin console of the appserver. If you jush wish to set some environment properties for a given webapp, then you can use 'System.setProperty("environment.setting","local");' in the app's initialization code.

  • Spaces in JVM arguments

    On Windows, I want to hand a directory path to the JVM in the following way
    java -Dworking.dir=<mydir>
    Unfortunately, the <mydir> is provided by the %USERPROFILE% environment variable and
    contains whitespace (c:\documents and settings\username). How can I quote this argument to prevent the JVM from complaining about the bad option 'and' which supposedly starts after the first whitespace?
    Thanks a lot
    Andreas

    If I do:
    set JAVAOPTIONS=-Dworking.dir="%USERPROFILE%"
    java ...
    quoting does NOT workWindoze shell (cmd.exe) deals with the quotes you supplied EXACTLY as it is supposed to.
    contrary to the
    straightforward shell command.
    I need JAVAOPTIONS because it is the only way to
    have the parameter passed to Java WebStart.The exact behavour varies between different Windoze versions.
    You need to think laterally. Starting from
    set _JAVA_OPTIONS=-Dworking.dir=%USERPROFILE%first, there are spaces in that so we need the whole thing quoted
    set _JAVA_OPTIONS="-Dworking.dir=%USERPROFILE%"next, that probably won't work as it is, assuming JAVAOPTIONS expands to
    -Dworking.dir=C:\Documents and Settings\fubarso we need to insert some escaped quotes as well
    set _JAVA_OPTIONS="-Dworking.dir=\"%USERPROFILE%\""which, with any luck, should see JAVAOPTIONS expanding to
    -Dworking.dir="C:\Documents and Settings\fubar"If you still have problems, Google for how to escape special characters in the Windoze shell.

  • Adding JVM arguments programmatically

    Hi,
    I want to start my JVM without -Xdebug etc. arguments. E.g. java MyClass
    And on specific event it will programmatically (without restarting JVM) set the debug arguments and will be accessible for remote debugging. Is it possible and how?
    Thanks.

    Benzion wrote:
    I already explained. We want the Server to run without debug, to get best performance. And to be able to switch debug on and off when we need debugging. Without restarting the server.No, you didn't explain that at all. You just said you wanted to turn debug on and off. You didn't say why.
    Have you measured any kind of performance degradation with leaving it turned on all the time? I doubt there is any. It will just sit listening for a debugger to connect. If one doesn't, then no resources will be consumed (apart from one listening server socket).

  • Specifying log file as jvm argument not working

    I've long used the java.util.logging by having a logging.properties file and specifying the "java.util.logging.FileHandler.pattern" in that file and specifying the location of the logging.properties as a jmv arg (-Djava.util.logging.config.file=logging.properties). No issues with that.
    I now, however, want to override the file pattern by using a jvm arg (-Djava.util.logging.FileHandler.pattern=somename.log), but when I do that, I get no file log output. If I leave it specified in the logging.properties it uses the value there and NOT the jvm arg value. If I comment it out of the logging.properties file is uses nothing (no file output).
    I see (via Google) others using this parameter, but I am having no luck.
    All in latest JDK release (6u11).
    Can't find any documentation on doing this on Sun's site (it might be there, but I haven't been able to find it). Don't see posts of others having this problem. I've got the same results on linux and OSX, different releases and all.
    Thanks for any insight in advance!

    This is easy to do! Remember you can write things like
    ... ${user.home}...In your config file. So write something like:
    log4j.rootLogger=debug, R
    log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.R.File=${my.file}Then launch your app with:
    java ... -Dmy.file=goomba.txt ...

  • Where can I find a list of valid -X and -D JVM arguments?

    I just searched the web and Sun's site and came up with... Nuttin'! I only searched for a half hour but this is ridiculous! Where is it? Does anyone know?

    For -X arguments, type the command "java -X" to get a list.
    For -D arguments, check the API docs for the System.getProperties method.

  • Jar Manifest with JVM arguments

    It is possible to get VM argument from manifest, if it is, how to do ?
    if not how it possible to get VM argument in executable jar file ?
    Thanks all
    s@id

    Hi everybody,
    I happy, that I'm not the only one suffering from this limitation. Right now I'm writing a Java application which will be used not only by persons who have Java experience. I guess most of them wouldn't even know how else to start it than double-clicking on the jar-file. And in my opinion, that's perfectly alright! When starting an native executable, you also don't think about defining a maximum heap size and even non-developers can easily use these applications. But I don't what to start if native applications are better or not. I really love Java and I don't want to miss it, that's for sure.
    But I don't understand, why on the one hand Java tries to "sell itself" as a real alternative to native applications and one the see the intention to let Java applications more and more "feel" like them (e.g. with introduction of features like TrayBar support or making it easy to open/edit/... files with any application assigned to that file type), but on the other hand there is no official way to easily setup the environment to start these Java apps. I mean, you can use Applets or the WebStart facility for deployment, but that can't be the right way! I can think about so many applications which I would really like to have as a real offline tool. What is, if the PCs I want to use my app on don't have an internet connection?
    Ok, but to make a long story short, I'm really looking for any way to make it easy for the users of my application to "just use it" rather then telling them when how to increase the maximum heap size or which script they have to use to run it. And the only way I see right now is the idea of using a wrapper just for starting a new VM with additional parameters. Even this is a bad hack in my opinion, but I'll try if this is useful for me.
    Anyway, I hope that maybe someone already found a better solution cause I can't believe that this problem is really uncommon.
    If I find a better solution I'll let you know.
    Regards,
    Black Widow

  • Jvm argument to log exception stack trace?

    I am attempting to debug an application where the developers decided to catch the root exception and throw a generic application exception. Hence the original exception is lost. Is there any arguement that can be passed to the JVM during startup that would tell the JVM's exception handler to write the root exception to standard out?

    You should to fix the application.
    An application may produce exceptions in the normal running of the application. If the application is catching the exception, the JVM would not know which one you didn't want to catch it.
    You could try running the application in a debugger. In many debuggers you can trap on exception. As I my previous point you may need to get through a few irrelevant exceptions.
    Another option is to decompile (e.g. jad) the application main class (one class should be enough) Change it and run with the changed class. You will then see the exception.

  • RefreshKrb5Config=true from command line JVM argument

    Can we set refreshKrb5Config=true from command line JVM argu,ent like we set java.security.krb5.conf using -D option ? We are not using jass config file.

    doubled the amount of code!If the code size is measured in the number of lines. More subtle size measurements are also conceivable.
    Once in the past we got a new boss who introduced an exact measurement for the programmers' efficiency based on the statistics taken from the cvs (Concurrent Versioning System) repository.
    Soon the colleagues began to comment out whole code blocks and reintroduce them instead of simply modifying them. Thus the number of the code lines changed by them skyrocketed.
    There was a nice guy there. During his studies, he used to be the system & network administrator at a hostel for students of the electrical engineering faculty at the technical university. We feel it must have been a nice job. We plain programmers used Linux as desktop OS, but he used Solaris: even good old Linux was not good enough for him. (Windows? Naturally out of question!) I put up a big fight with our chief until I persuaded him to allow the Exchange server's supporting the standard (non-proprietary) mailing protocols, so that we were able to use the mailing infrastructure from our Linux and his Solaris boxes albeit without the calendar functions.
    Well, this guy was an expert for difficult technical questions, he engineered the site-wide single-sign-on system etc. When he perused a piece of code, he shrank it by eliminating obsolete methods, by refactoring parallel ones etc. His measured output was negative...

  • Passing arguments to the JVM for a certain project

    Hello!
    in our project we need to set some JVM-arguments
    like "-Denvironment.setting=local"
    but i can't figure out how to do that in the Studio Creator IDE
    maybe you have a solution
    thx in advance

    For a web application, the JVM properties indeed need to be set for the application server's JVM and as such it cannot be set in the IDE. (The IDE cannot pass the parameters anyway since it merely invokes the commands provided by the appserver to start/stop/deploy-apps).
    To solve your problem, you will need to set the JVM arguments at the appserver. You can set the JVM arguments in the admin console of the appserver. If you jush wish to set some environment properties for a given webapp, then you can use 'System.setProperty("environment.setting","local");' in the app's initialization code.

  • How can a JVM terminate with an exit code of 141 and no other diagnostics?

    Hello,
    We are encountering a JVM process that dies with little explanation other than an exit code of 141. No hotspot error file (hs_err_*) or crash dump.  To date, the process runs anywhere from 30 minutes to 8 days before the problem occurs. The last application log entry is always the report of a lost SSL connection, the result of an thrown SSLException.  (The exception itself is unavailable at this time – the JVM dies before it is logged -- working on that.)
    How can a JVM produce an exit code of 141, and nothing else?  Can anyone suggest ideas for capturing additional diagnostic information?  Any help would be greatly appreciated!  Environment and efforts to date are described below.
    Thanks,
    -KK
    Host machine: 8x Xeon server with 256GB memory, RHEL 6 (or RHEL 5.5) 64-bit
    Java: Oracle Java SE 7u21 (or 6u26)
    java version "1.7.0_21"
    Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
    Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
    JVM arguments:
    -XX:+UseConcMarkSweepGC
    -XX:+CMSIncrementalMode
    -XX:+CMSClassUnloadingEnabled
    -XX:MaxPermSize=256m
    -XX:NewSize=64m
    -Xms128m
    -Xmx1037959168
    -Djava.awt.headless=true
    -Djava.security.egd=file:///dev/./urandom
    Diagnostics attempted to date:
    LD_PRELOAD=libjsig.so.   A modified version of libjsig.so was created to report all signal handler registrations and to report SIGPIPE signals received.  (Exit code 141 could be interpreted as 128+SIGPIPE(13).)  No JNI libraries are registering any signal handlers, and no SIGPIPE signal is reported by the library for the duration of the JVM run.  Calls to ::exit() are also intercepted and reported.  No call to exit() is reported.
    Inspect /var/log/messages for any indication that the OS killed the process, e.g. via the Out Of Memory (OOM) Killer.  Nothing found.
    Set ‘ulimit –c unlimited’, in case the default limit of 0 (zero) was preventing a core file from being written.  Still no core dump.
    ‘top’ reports the VIRT size of the process can grow to 20GB or more in a matter of hours, which is unusual compared to other JVM processes.  The RES (resident set size) does not grow beyond about 375MB, however, which is an considered normal.
    This JVM process creates many short-lived Thread objects by way of a thread pool, averaging 1 thread every 2 seconds, and these objects end up referenced only by a Weak reference.   The CMS collector seems lazy about collecting these, and upwards of 2000 Thread objects have been seen (in heap dumps) held only by Weak references.  (The Java heap averages about 100MB, so the collector is not under any pressure.) However, a forced collection (via jconsole) cleans out the Thread objects as expected.  Any relationship of this to the VIRT size or the JVM disappearance, however, cannot be established.
    The process also uses NIO and direct buffers, and maintains a DirectByteBuffer cache. There is some DirectByteBuffer churn. MBeans report stats like:
    Direct buffer pool: allocated=669 (20,824,064 bytes), released=665 (20,725,760), active=4 (98,304)  [note: equals 2x 32K buffers and 2x 16K buffers]
    java.nio.BufferPool > direct: Count=18, MemoryUsed=1343568, TotalCapacity=1343568
    These numbers appear normal and also do not seem to correlate with the VIRT size or the JVM disappearance.

    True, but the JNI call would still be reported by the LD_PRELOAD intercept, unless the native code could somehow circumvent that.  Using a test similar to GoodbyeWorld (shown below), I verified that the JNI call to exit() is reported.  In the failure case, no call to exit() is reported.
    Can an OS (or a manual) 'kill' specify an exit code?  Where could "141" be coming from?
    Thanks,
    -K2
    === GoodbyeWorldFromJNI.java ===
    package com.attachmate.test;
    public class GoodbyeWorldFromJNI
        public static final String LIBRARY_NAME = "goodbye";
        static {
            try {
                System.loadLibrary(LIBRARY_NAME);
            } catch (UnsatisfiedLinkError error) {
                System.err.println("Failed to load " + System.mapLibraryName(LIBRARY_NAME));
        private static native void callExit(int exitCode);
        public static void main(String[] args) {
            callExit(141);
    === goodbye.c ===
    #include <stdlib.h>
    #include "goodbye.h"  // javah generated header file
    JNIEXPORT void JNICALL Java_com_attachmate_test_GoodbyeWorldFromJNI_callExit
      (JNIEnv *env, jclass theClass, jint exitCode)
        exit(exitCode);
    === script.sh ===
    #!/bin/bash -v
    uname -a
    export PATH=/opt/jre1.7.0_25/bin:$PATH
    java -version
    pwd
    LD_PRELOAD=./lib/linux-amd64/libjsigdebug.so java -classpath classes -Djava.library.path=lib/linux-amd64 com.attachmate.test.GoodbyeWorldFromJNI > stdout.txt
    echo $?
    tail stdout.txt
    === script output ===
    [keithk@keithk-RHEL5-dev goodbyeJNI]$ ./script.sh
    #!/bin/bash -v
    uname -a
    Linux keithk-RHEL5-dev 2.6.18-164.2.1.el5 #1 SMP Mon Sep 21 04:37:42 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
    export PATH=/opt/jre1.7.0_25/bin:$PATH
    java -version
    java version "1.7.0_25"
    Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
    pwd
    /tmp/goodbyeJNI
    LD_PRELOAD=./lib/linux-amd64/libjsigdebug.so java -classpath classes -Djava.library.path=lib/linux-amd64 com.attachmate.test.GoodbyeWorldFromJNI > stdout.txt
    echo $?
    141
    tail stdout.txt
    JSIG: exit(141) called
    JSIG: Call stack has 4 frames:
    JSIG: ./lib/linux-amd64/libjsigdebug.so [0x2b07dc1bdc2f]
    JSIG: ./lib/linux-amd64/libjsigdebug.so(exit+0x29) [0x2b07dc1bea41]
    JSIG: /tmp/goodbyeJNI/lib/linux-amd64/libgoodbye.so [0x2aaab3e82547]
    JSIG: [0x2aaaab366d8e]       
    === ===

Maybe you are looking for

  • Cannot Install Java JDK on Windows 7 Home Premium

    Hello all, I'm sorry if this is the wrong place to post this question. I have an issue trying to install ANY JDK on Windows 7 Home Premium. When I run the install it throws an Error: 1722. I've tried looking around on Google but haven't found much. H

  • TS1538 Connection between iPhone and iTunes

    My computer recognizes the connection between the USB and my iPhone 4 but iTunes doesn't find it. I've ran diagnostics and it comes up red which means iTunes can't locate it, but in My Documents my phone shows up. So what is going on?

  • Photoshop Elements 9 Won't Register

    I was trying to recover my serial number, and the website informed me it needed to be registered. So I went into my program and hit help > product registration where it said that I needed to log in. So I did and it said my product had been registered

  • Redirecting the URL

    Hi All, I would like the APEX URL to be redirected to another simple URL. I don't want to allow users to see the application, page and session id for e.g. the original link is: http://host/pls/apex//f?p=101:4:1726201165347608 I would like them to see

  • Music jumps

    I've waited a year to get an apple TV and today I finially did, however I'm so upset with it!! It keeps jumping my music like a CD player does to a scratched CD and I know it's not my wi-fi because I am on the faster one. Why does it keep doing this?