Specifying default GC at JVM startup

Hi there, I'm monitoring my company's intranet with JConsole running on jdk 1.5. The intranet has about 3000 users who log on about every day, so it has a lot of traffic.
Sometimes, during performance peek, the memory reaches about 370 megs ( My maximum heap size as well as my startup heap size is set to 370 megs ). When the memory reaches the maximum size, the memory drops while I'm getting tomcat messages that the pool is exhausted with 100 threads. I tried changing the maximum value of threads to 200 instead of 100 but it does help; the intranet still freezes but at least I'm not getting those tomcat messages... So it doesn't help a lot.
I noticed, in JConsole, that the default GC that is run automatically is PS Scavenge. From the console, I can run the GC manually and it executes the PS MarkSweep algorithm. I noticed that MarkSweep is much more efficient than Scavenge. Is it possible to specify to the JVM to use MarkSweep by default? Therefore the memory would not reach the maximum size or at least it would reach it less often ( Actually my intranet freezes about 3 to 4 times a day, during peek activity ) Would that be a good idea? Is it even possible to do it?
I'm open to all your suggestions,
Thanks a lot
Alexandre Folgueras
[email protected]

Hello
Here are some references that should help inform you about the different collectors
and the tuning choices you can consider:
Performance Documentation for the Java HotSpot VM
http://java.sun.com/docs/hotspot/index.html
Ergonomics in the 5.0 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/ergo5.html
Tuning Garbage Collection with the 5.0 Java Virtual Machine
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html
"Troubleshooting Guide for J2SE 5.0",
http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

Similar Messages

  • How to specify default desktop and/or startup items for EVERY user login?

    Hi
    My work iMac is

    +Oops! User error! Anyway, here's the rest of my message...+
    The iMac I use at the university where I work connects to Active Directory for authentication - there are no local user logins (apart from the admin account of course).
    I'd like to know how to set the default items for all user logins. Specifically, I'd like the system to automatically create an alias on the desktop to a shared folder for every new user login, or automatically open that folder in Finder when logged in.
    Though I'm the main user, if I'm not around other people may require access to the stuff I do for the multitude of projects I work on for a department of 30 people, and as everyone else uses a PC and only a few are Mac savvy, I'd like to make it as easy as possible for the poor dears to find the files. (We have a shared network drive where I can put some stuff but unfortunately our allocation is not very big!)
    Thanks.

  • Cannot start OC4J instance after specifying default java.security.manager

    Hi All,
    I am using OracleiAS 10.1.3.4 and trying to make use of the new User and Role APIs introduced in 10.1.3.1.
    While trying to get an object of IdentityStore using the following code, I got this error -
    java.security.PrivilegedActionException: oracle.security.idm.ConfigurationException: java.security.AccessControlException: access denied (oracle.security.jazn.JAZNPermission getOC4JIntegrationData)
    oidFactory = (IdentityStoreFactory) AccessController.doPrivileged(
    new PrivilegedExceptionAction()
    public Object run() throws IMException
    IdentityStoreFactoryBuilder builder =
    new IdentityStoreFactoryBuilder();
    return builder.getIdentityStoreFactory();
    I then tried specifying the default security manager in start JAVA options for my oc4j instance - Djava.security.manager. I also verified that my java policy file is present under $ORACLE_HOME/j2ee/oc4j_soa/config/java2.policy. But the issue is - once I put this default secirity manager in startup options in opmn.xml, the oc4j instance does not get started, it gives following error -
    08/12/30 02:58:22 Start process
    Dec 30, 2008 2:58:24 AM com.evermind.server.XMLDataSourcesConfig parseRootNode
    INFO: Legacy datasource detected...attempting to convert to new syntax.
    08/12/30 02:58:29 WARNING: Application.setConfig Application: default is in failed state as initialization failed.
    java.lang.ExceptionInInitializerError
    08/12/30 02:58:29 Error initializing server: Application: default is in failed state as initialization failed
    08/12/30 02:58:32 Fatal error: server exiting
    Any idea ? Any pointers please ?
    Thanks,
    Ankit

    Ankit,
    Check your syntax for the datasource. If you migrated from file-based to OID, then you should look at this link:
    http://download.oracle.com/docs/cd/E12524_01/relnotes.1013/e12523/oc4j.htmThere is a known issue when migrating from file-based to OIM\OID. Navigate to:
    12.2 JAZNMigration Tool Does Not Migrate ADFPrincipal Type Correctly
    -Michael

  • Can I set the default locale for jvm

    Hi,
    Can I set the default locale for jvm?
    How to do it?
    Pan

    My windows default locale is chinese .I have thought of your opinion. But in
    windows nt , if I change the locale , all the environment will be
    destroyed(just like reinstall it , it's difficult for me) . So , Is there
    any other approach?
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Did you try to change the locale in the Windows control panel?
    (Control panel -> Regional Options -> Your locale)
    Pan YangBin <[email protected]> wrote:
    I have tried changing this system property and other properties such
    as -Duser.language=en -Dfile.encoding=Cp1252 , but all these properties
    did
    not changed, you can get this infomation from the log file .Maybe these
    system properties are readonly.
    Thanks very much.
    Pan
    Chris Halstead <[email protected]> wrote in message
    news:[email protected]...
    Try adding -Duser.region=US to the java command line used to start
    WebLogic...
    -chris
    "Pan YangBin" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    The problem exists in my project still exist.That is it.
    When I did not set weblogic.jsp.encoding to GB2312 in my web
    application(web.xml), and when the jsp file contain's chinese , the
    output
    will be error(error chinese) .And when I did not set it , the output
    is
    correct, but when I use request.getParameter("SomeFormElement")(theelement
    inputed chinese), the return value is error(still chinese error).And
    when
    I
    am in windows nt english version and do not set this property, all
    these
    two
    problems dispear. And I try to compare the java files those were
    generated
    by weblogic from the jsp file , there is only two additional clause
    in
    the
    java file. That's it:
    ((weblogic.servlet.jsp.JspWriterImpl)out).setEncoding("GB2312");
    response.setHeader("Content-Type", "text/html; charset=GB2312");
    (the web.xml has <context-param>
    <param-name>weblogic.jsp.encoding</param-name>
    <param-value>GB2312</param-value>
    </context-param> to be set
    So, I think maybe it works well if I change the default locale toenglish.
    And unfortunately, your method is also failed.(I have to use weblogic
    in
    chinese environment)
    Would you please help me to solve this problem?
    Pan
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Try java ... -Duser.language=en ...
    or mode con cp select=437 in the command prompt before running
    weblogic.
    Pan YangBin <[email protected]> wrote:
    I'm using weblogic server 5.1 sp6 in chinese environment, and I
    want
    weblogic compile my jsp with en_us locale . So I can't use
    Locale.setDefault(new Locale(...)) to set the default locale ,butI
    really
    want someway configure.
    Pan
    Dimitri Rakitine <[email protected]> wrote in message
    news:[email protected]...
    Locale.setDefault(new Locale(...)) ?
    Pan YangBin <[email protected]> wrote:
    Hi,
    Can I set the default locale for jvm?
    How to do it?
    PanDimitri
    Dimitri
    Dimitri

  • Random Default Background Image on startup

    OK so I know how to change the default image on Leopard startup and am aware thats not a supported thing to do....however as someone who takes a lot of photos I thought it would be nice to be able to have a random image be show from a particular folder on startup.
    Anyone know if this is possible to do with an AppleScript or another method?
    Thanks
    nstand

    Hello Chet,
    Take a look at this posting that gives instructions on how to set/change a back ground image.
    https://supportforums.cisco.com/document/44191/how-modifychange-background-image-ip-phone-new
    One gotcha that I have ran into before, is the List.xml file needs to be modified in WORD.
    To change the background image on a phone from the call manager, you will need to: 
    ->uncheck the option "enable end user to access phone background", under -> Device -> Device settings -> common phone profile.  However, when we made this change, all phones restarted and all calls were dropped!!!!!
    ->Enter background image name in the "background image field" toward the bottom of the phone configuration page.  Only name of the image is needed, not the path.
    In earlier releases of callmanager you could not change the background image from the ccm.  The work around that I used was to use an app called Phonedesigner.
    Hope this helps,
    if so, please rate.

  • How to set the JVM Startup Options?

    Hi,
    I want to know how to set the JVM Startup Options...
    The idea is, I want to test how the remote clients can access an EJB that is running on a different machine... Remote client here means, I have a java client application that runs on one machine and that contacts an EJB thats running on a different machine... I posted this question in J2EE forum and I got this reply...
    If you need to access EJB components that are residing in a remote system other than the system where the application client is being developed, set the values for the Java Virtual Machine startup options:
    jvmarg value = "-Dorg.omg.CORBA.ORBInitialHost=${ORBhost}"
    jvmarg value = "-Dorg.omg.CORBA.ORBInitialPort=${ORBport}"
    Now how to set the JVM Startup Options? I know my server ORBHost Name and the ORBPort..
    Anybody to help !!!
    Thanks in advance,
    Karthik

    java -Dorg.omg.CORBA.ORBInitialHost=${ORBhost} -Dorg.omg.CORBA.ORBInitialPort=${ORBport} <the main class>
    That should do it..

  • Windows 8.1 is forgetting Acrobat as my default PDF viewer after startup

    I installed Arcobat XI Pro on Windows 8.1. I set Acrobat as my default PDF viewer during the installation. After the installation, none program was set as the default PDF viewer. When I tried to open a PDF file, Windows asked which program I want to use as my default PDF viewer. I Choose Acrobat.
    Each time I start up my computer, Windows has forgotten my default PDF viewer. I did some research to find out if it was a problem with Windows or with Acrobat. I turns out to be a problem with Acrobat, becuase if I set Adobe Reader as my default PDF viewer, Windows does remember my default PDF viewer after startup.
    Is there anybody with the same problem and do you have a solution?

    Hi Anand,
    Thanks for your responds.
    This way is not working either. Both Reader and Acrobat are version 11.0.9.
    Do you have any other solution? Beside, do you have any idea what is causing the problem?
    Regards,
    Matthijs

  • NullPointerException on JVM startup when changing Class.getDeclaredField()

    On any JVM starting with 1.5 and later the included test case causes this exception on startup:
    java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:394)
    at java.lang.System.initProperties(Native Method)
    at java.lang.System.initializeSystemClass(System.java:1072)
    The test case involves overriding Class.getDeclaredField() via -Xbootclasspath/p. Originally the bug came out when using Instrumentation.redefineClasses().
    To run the test case:
    1) Download and unzip from [http://ngra.de/gdm-test.zip]
    2) Run "java -cp asm-all-3.1.jar:gdm.jar Install", this will generate a gdm-boot.jar file.
    3) Run "java -Xbootclasspath/p:gdm.jar:gdm-boot.jar Test", this should produce the error.
    The test cases adds one method call before ARETURN instruction in Class. getDeclaredField(). The call is INVOKESTATIC Test.test()V.
    Does anyone know if it's a known bug and if there are any workarounds for this? The same bug manifests in Instrumentation.redefineClasses() by messing up the constant pool when the getDeclaredField() is changed

    Apparently the problem was that in Java 5+ there is a AtomicReferenceFieldUpdaterImpl, which is accessed from System.initializeClass() on JVM startup and which calls Class.getDeclaredField(). Since at that point the proper classloading is not set up yet, trying to access a class outside rt.jar causes a ClassNoDefFoundError cascading upwards to the NPE we get. The fix is to check the sun.misc.VM.isBooted() flag to be sure that class loading is allowed, otherwise skipping the injected code. Hope this can help someone :)

  • What is the need for calling default constructor by JVM?

    What is the need for calling default constructor by JVM? why the JVM should intiializes default values to the data
    fields if the constructor is not there in our class?

    mahar wrote:
    What is the need for calling default constructor by JVM? Huh? The JVM does not need to call the default constructor. It needs to call a constructor.
    You decide which one by the way you use "new".
    why the JVM should initialize default values to the data fieldsHuh?
    ... if the constructor is not there in our class?Huh? The default constructor is always there. It may be private but it is still there.

  • 'configuration file does not specify default realm'

    Hi,
    I am using below solaris 10 OS version:
    [root@nlxsl009 ~]$ cat /etc/release
    Solaris 10 5/09 s10s_u7wos_08 SPARC
    Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
    Use is subject to license terms.
    Assembled 30 March 2009
    The Kerberos version available on our Solaris 10 OS is: MIT Kerberos V5.
    I had installed the Kerberos from the instruction given at MIT Kerberos site but getting following error:
    'configuration file does not specify default realm'.
    I tried to configure my KDC but it seems my Kerberos was not installed properly.
    Can you refer any site from where I can properly install Kerberos from Solaris10 OS DVD?
    Thanks and Regards
    Anand Deshmane
    Edited by: ananddeshmane on Apr 1, 2010 7:20 AM

    I think you need to post this question to a Solaris forum, it is definetely not a Oracle Database Installation question.
    -Andy

  • Neo V Network Selection always Returns to Default "WCDMA/GSM" on Startup

    I prefer to set the network selection to WCDMA only to get better voice call quality. However since updating to 4.1.B.0.587, the phone always set to default "WCDMA/GSM" on startup then I need to manually set it again to "WCDMA only". It is not so disturbing, but previous firmware releases doesn't have this problem. Sony, please fix it in next firmware.

    This is an already report issue and our developers are looking into to it as we speak.
     - Community Manager Sony Xperia Support Forum
    If you're new to our forums make sure that you have read our Discussion guidelines.
    If you want to get in touch with the local support team for your country please visit our contact page.

  • JVM startup

    I need to develop an app thats connects to oracle db, retrieves a resultset and for each record creates or not a file on some path based on record data. This app must runs this procedure every 2 minutes. The question is: My app must starts every 2 minutes or is better the app starts on system start and sleep for 2 minutes? What criteria i would use to deffine this thing? On starting every 2 minutes, how to decrease JVM startup penalty?
    I'm using a E10K machine running Solaris 8 and Oracle8i Enterprise Edition Release 8.1.7.4.0 - 64bit Production. This machine works very loaded and there is a long delay after calling java programs.

    I welcome any responses to this question as I am not
    in design phase yet.
    I am working with an application that does some sort
    of hibernate caching when a user hits an empty cache
    for the first time. When multiple users hit the
    cache, which happens because the cache takes a couple
    minutes to load, there are major problems.
    I think if I synchronize access to the caching I may
    avoid this, but I am still apt to have a long caching
    being done for the first user.
    Does anybody know of anyway I can cache what I need to
    as the JVM starts up?
    WAS 5.0.
    Thanks.Hi there,
    I'm not 100% sure of hte environment you are in here. Are you deploying a web application in WebSphere? In that case you can use a startup class/servlet/EJB to solve this problem for you.
    Karianna

  • Specifying -d64 or -d32 JVM in JNLP

    My question is relative simple -- is there a way to specify or request a 64 bit JVM where one is available in a JNLP file?
    From the command line it would be something like java -d64 ... Is there an equivalent JNLP resource tag?
    Apologies if this is a FAQ -- I've done a fair bit of web searching and come up empty.

    At this time, Java Web Start does not support 64-bit JREs.
    We are working on the 64-bit version, and when it is availavle, the java-vm-args="-d64" or "-d32" will direct Java web start to only consider the 64 or 32 bit JREs respecitivly.
    The default, if not specified, will be to run the 32 bit version of the JRE, unless only a 64 bit version of the required JRE is available.
    /Andy

  • Default Internet Connect at startup?

    This is probably a ridiculously simple issue, butI recently installed 10.4.5 on my G4 Titanium laptop. Since that installation, my airport connection to my home wireless network no longer connects automatically at startup. I must select it every time. I can't seem to find where to make this happen. Can anyone help me?
    THanks,
    Paul

    Hi Paul,
    Try this:
    Firstly go to System Preferences>Network>Show: Airport. Click the 'Airport' tab if it isn't already selected. Select preferred networks from the 'By Default, join:' window and select your network name.
    Then click the 'Options' button and untick the box that says "Disconnect from wireless networks when I log out", in the drop down box. Click OK in the drop down box, and Save Changes in the main window.
    Once you are connecting automatically consider at the very least switching off SSID broadcast on your router so that your network is not visible to others. Enabling WPA security too is preferable.
    Have fun!
    Adrian

  • Jvm startup fails with error when using large -Xmx value

    I'm running JDK 1.6.0_02-b05 on RHEL5 server. I'm getting error when starting the JVM with large -Xmx value. The host has ample memory to succeed yet it fails. I see this error when I'm starting tomcat with a bunch of options but found that it can be easily reproduced by starting the JVM with -Xmx2048M and -version. So it's this boiled down test case that I've been examining more closely.
    host% free -mt
    total used free shared buffers cached
    Mem: 6084 3084 3000 0 184 1531
    -/+ buffers/cache: 1368 4716
    Swap: 6143 0 6143
    Total: 12228 3084 9144
    Free reveals the host has 6 GB of RAM, approximately half is available. Swap is totally free meaning I should have access to about 9 GB of memory at this point.
    host% java -version
    java version "1.6.0_02"
    Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
    Java HotSpot(TM) Server VM (build 1.6.0_02-b05, mixed mode)
    java -version succeeds
    host% java -Xmx2048M -version
    Error occurred during initialization of VM
    Could not reserve enough space for object heap
    Could not create the Java virtual machine.
    java -Xmx2048M -version fails. Trace of this reveals mmap call fails.
    mmap2(NULL, 2214592512, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = -1 ENOMEM (Cannot allocate memory)
    Any ideas?

    These are the relevant java options we are using:
    -server -XX:-OmitStackTraceInFastThrow -XX:+PrintClassHistogram -XX:+UseLargePages -Xms6g -Xmx6g -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=128m -XX:MaxPermSize=192m -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -XX:+ExplicitGCInvokesConcurrent -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.awt.headless=true
    This is a web application that is very dynamic and uses lots of database calls to build pages. We use a large clustered cache to reduce trips to the database. So being able to acces lots of memory is important to our application.
    I'll explain some of the more uncommon options:
    We use the Concurrent Garbage collector to reduce stop the world GC's. Here are the CMS options:
    -XX:+UseConcMarkSweepGC
    -XX:+CMSClassUnloadingEnabled
    -XX:+CMSPermGenSweepingEnabled An explicit coded GC invokes the Concurrent GC instead of the stop the world GC.
    -XX:+ExplicitGCInvokesConcurrentThe default PermSizes where not large enough for our application. So we increased them.
    -XX:PermSize=128m
    -XX:MaxPermSize=192mWe had some exceptions that were omitting their stack traces. This options fixes that problem:
    -XX:-OmitStackTraceInFastThrowWe approximate between 10% to 20% performance improvement with Large Page support. This is an advance feature.
    -XX:+UseLargePagesUseLargePages requires OS level configuration as well. In SUSE10 we configured the OS's hugepages by executing
    echo "vm.nr_hugepages = 3172" >> /etc/sysctl.confand then rebooting. kernel.shmmax may also need to be modified. If you use Large Page be sure to google for complete instructions.
    When we transitioned to 64bit we transitioned from much slower systems having 4GB of ram to much faster machines with 8GB of ram, so I can't answer the question of degraded performance, however with our application, the bigger our cache the better our performance, so if 64bit is slower we more than make up for it being able to access more memory. I bet the performance difference depends on the applications. You should do your own profiling.
    You can run both the 32bit version and the 64bit version on most 64bit OSes. So if there is a significant difference run the version you need for the application. For example if you need the memory use the 64bit version if you don't then use the 32bit version.

Maybe you are looking for