Increase JVM heap size when calling it from C++

I have a program that loads images and only works properly increasing heap.
java McVImg
gives me an Out of memory error.
java -Xmx120M McVImg
works fine.
If I want to call JVM from a C++ program using Java native interface,
How should I increase JVM heap ?
Thanks in advance. Ignasi Villagrasa.

I'm trying to do what you told me and it doesn't work.
I show the C++ code I'm using:
void JavaParam::LoadJVM()
     JavaVMInitArgs vm_args;
     JavaVMOption options[2];
jint res;
     vm_args.version = JNI_VERSION_1_2;
JNI_GetDefaultJavaVMInitArgs(&vm_args);
     if (res < 0)
fprintf(stderr, " Requested version is not supported\n");
          fputs ("Requested version is not supported\n",traza);
          fflush(traza);
exit(-1);
     //Establecemos classpath
     //Atencion el classpath ser� el jar
     //options[0].optionString = "-Djava.class.path=..";
     options[0].optionString = "-Djava.class.path=..\\mcjava.jar";
     options[1].optionString = "-Xmx120M";
     //Nuevos argumentos
vm_args.options=options;
     vm_args.nOptions = 2;
     vm_args.ignoreUnrecognized = JNI_FALSE;
     //Creamos Maquina Virtual Java
res = JNI_CreateJavaVM(&jvm,(void **)&env,&vm_args);
if (res < 0)
fprintf(stderr, "Can't create Java VM: %d\n",(int)res);
          fprintf(traza, "Can't create Java VM RES: %d \n",(int)res);
          fflush(traza);
exit(1);
     jvm_creada = 1;
Is that right ?
Thanks in advance. Ignasi Villagrasa.

Similar Messages

  • How to increase JVM Heap Size

    Hi all,
    Our Environment
    ===============
    OS - Windows XP Service Pack 3
    Oracle Developer Suite - 10.1.2.3.0
    Oracle Forms & Reports Service 10.1.2.3.0
    Oracle Database 10.2.0.1.0
    JDK 1.5
    Jinitiator 1.3.1.30
    Apache POI 3.5
    From forms we are writing to excel files after copying XL template using Apache POI 3.5 and JDK 1.5. This XL template file has got lot of macros.
    We have imported the Java class files into form as pl/sql library. We are able to write upto 7Mb size of XL file. Beyond that size it comes with the error Ora-105101.
    We tried to increase the JVM Heap Size to 640M by setting values -Xmx640M everywhere in OC4J_BI_FORMS/Server Properties/Java Options, Home/Server Properties/Java Options through Enterprise Manager console. Also manually set the values in OPMN.XML and reloaded the same. Also set -Xmx640M in Jinitiator 1.3.1.30 Java Runtime Parameters. Also set in Java console. All settings have no effect.
    We have written a small program to display the run time memory from forms, which displays only maximum memory 63M all the time.
    PACKAGE BODY HeapSize IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('HeapSize', '()V', args));
    END;
    -- Method: getTotalMemory ()D
    FUNCTION getTotalMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getTotalMemory', '()D', args);
    END;
    -- Method: getMaxMemory ()D
    FUNCTION getMaxMemory(
    obj ORA_JAVA.JOBJECT) RETURN NUMBER IS
    BEGIN
    args := NULL;
    RETURN JNI.CALL_DOUBLE_METHOD(FALSE, obj, 'HeapSize', 'getMaxMemory', '()D', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    obj:=HeapSize.new;
    message('Total memory '||HeapSize.getTotalMemory(obj));
    message('Max memory '||HeapSize.getMaxMemory(obj));
    END;
    Below procedure is for writing to Excel file.
    ============================================
    PACKAGE BODY UWWriteExcel IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    args := NULL;
    RETURN (JNI.NEW_OBJECT('UWWriteExcel', '()V', args));
    END;
    -- Method: copyExcel (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copyExcel(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'copyExcel', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    -- Method: getSpreadSheetPara (Ljava/lang/String;)V
    PROCEDURE getSpreadSheetPara(
    obj ORA_JAVA.JOBJECT,
    a0 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getSpreadSheetPara', '(Ljava/lang/String;)V', args);
    END;
    -- Method: openSheet (I)V
    PROCEDURE openSheet(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_INT_ARG(args, a0);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'openSheet', '(I)V', args);
    END;
    -- Method: getCellValues (IID)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 NUMBER) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_DOUBLE_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IID)V', args);
    END;
    -- Method: getCellValues (IILjava/lang/String;)V
    PROCEDURE getCellValues(
    obj ORA_JAVA.JOBJECT,
    a0 NUMBER,
    a1 NUMBER,
    a2 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(3);
    JNI.ADD_INT_ARG(args, a0);
    JNI.ADD_INT_ARG(args, a1);
    JNI.ADD_STRING_ARG(args, a2);
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'getCellValues', '(IILjava/lang/String;)V', args);
    END;
    -- Method: exportExcel ()V
    PROCEDURE exportExcel(
    obj ORA_JAVA.JOBJECT) IS
    BEGIN
    args := NULL;
    JNI.CALL_VOID_METHOD(FALSE, obj, 'UWWriteExcel', 'exportExcel', '()V', args);
    END;
    -- Method: copy (Ljava/lang/String;Ljava/lang/String;)V
    PROCEDURE copy(
    a0 VARCHAR2,
    a1 VARCHAR2) IS
    BEGIN
    args := JNI.CREATE_ARG_LIST(2);
    JNI.ADD_STRING_ARG(args, a0);
    JNI.ADD_STRING_ARG(args, a1);
    JNI.CALL_VOID_METHOD(TRUE, NULL, 'UWWriteExcel', 'copy', '(Ljava/lang/String;Ljava/lang/String;)V', args);
    END;
    BEGIN
    NULL;
    END;
    declare
    obj ORA_JAVA.JOBJECT;
    BEGIN
    message('-1');pause;
    obj:=UWWriteExcel.new;
    message('0');pause;
    UWWriteExcel.copyExcel(obj,'C:\\excel\\CAT2009WS.XLS','C:\\excel\\CAT2009WS.XLS');
    message('1');pause;
    UWWriteExcel.openSheet(obj,0);
    message('2');pause;
    UWWriteExcel.getCellValues(obj,6,2,900);
    message('3');pause;
    UWWriteExcel.getCellValues(obj,7,2,911);
    message('4');pause;
    UWWriteExcel.exportExcel(obj);
    END;
    When the size of XL is more than 7Mb, after message(0) it will be display oracle error.
    From command prompt if we run the same java class file by passing -Xmx256m parameter we are able to write to big XL file.
    Can anyone tell me where I am wrong... Can we increase the JVM Heap Size from forms...

    I have a simular problem.
    Via Forms I call a Java class (import Java class -> PL/SQL class java method).
    For this specific process I need to set the Xmx java option...
    How do I do this ?
    Changing the java option for the Forms-OC4J in the EM doesn't help.
    Is there an other level where I can modify this ?
    Does the java process of the forms is the single process that exists ? How does he handles such java calls?
    Are that separed java processes ? threads ? ....
    Thanks !!!

  • Getting exception after increasing the heap size

    Hi ,
    I have increased the heap size of my manged server from 512MB to 1024MB and started the server. When I tried to post the messages to queue I am getting the below exception and my managed server is going down. Weblogic server version is 10.3.0. Could you please help me to resolve this issue. It is verr urgent
    ******* EXCEPTION FROM THE MAIN METHOD -Generic Exception *******
    weblogic.jms.common.JMSException: weblogic.messaging.dispatcher.DispatcherException: weblogic.rjvm.PeerGoneException: No message was received for: '240' seconds
    at weblogic.jms.dispatcher.DispatcherAdapter.convertToJMSExceptionAndThrow(DispatcherAdapter.java:116)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(DispatcherAdapter.java:53)
    at weblogic.jms.client.JMSProducer.toFEProducer(JMSProducer.java:1271)
    at weblogic.jms.client.JMSProducer.deliveryInternal(JMSProducer.java:783)
    at weblogic.jms.client.JMSProducer.sendInternal(JMSProducer.java:541)
    at weblogic.jms.client.JMSProducer.sendWithListener(JMSProducer.java:394)
    at weblogic.jms.client.JMSProducer.send(JMSProducer.java:384)
    at weblogic.jms.client.WLProducerImpl.send(WLProducerImpl.java:970)
    at QueueSendConfig.send(QueueSendConfig.java:88)
    at QueueSendConfig.main(QueueSendConfig.java:126)
    Caused by: weblogic.messaging.dispatcher.DispatcherException: weblogic.rjvm.PeerGoneException: No message was received for: '240' seconds
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:350)
    at weblogic.jms.dispatcher.DispatcherAdapter.dispatchSyncTran(DispatcherAdapter.java:51)
    ... 8 more
    Caused by: weblogic.rjvm.PeerGoneException: No message was received for: '240' seconds
    at weblogic.rjvm.ResponseImpl.getThrowable(ResponseImpl.java:202)
    at weblogic.messaging.dispatcher.DispatcherProxy.unmarshalResponse(DispatcherProxy.java:253)
    at weblogic.messaging.dispatcher.DispatcherProxy.dispatchSyncTranFuture(DispatcherProxy.java:134)
    at weblogic.messaging.dispatcher.DispatcherWrapperState.dispatchSyncTran(DispatcherWrapperState.java:338)
    Thanks & Regards
    James

    Hi James,
    weblogic.rjvm.PeerGoneException is basically caused due to a network failure between the peers like message producer and the consumer failing to communicate in the specified time frame.
    240 seconds is the default value for the t3 connection timeout, if the peer is not getting response for 240 seconds. Then it would timed out.
    This value can be tuned, however it is not recommended.
    Can you check the network traffic and see if any network glitches causing the issue?
    Also check whether you are trying to send large messages over a slow network causing the delay.
    You can capture the thread dumps as well to get more insights on the issue.
    Cheers,
    Andy

  • Plz can you help me. How to increase the Heap Size!!!!!!!!!!!

    Hi,
    i'm new to 10g appl server
    Failed to deploy web application "AGXI51". Failed to deploy web application "AGXI51". . The evaluate phase failed. The Adapter used in the evaluate may have thrown an exception.
    Resolution:
    Please call Oracle support.
    Base Exception:
    java.lang.OutOfMemoryError
    null. java.lang.OutOfMemoryError
    i'm getting this Error while deploying the application.So wat is the procedure to increase the Heap Size
    Regards,
    Niranjan.D

    Locate opmn.xml on your instance. In file locate section relevant for container you use (i.e. "home"). In next line you can see tags where startup parameters are set. You should add following parameters (this will set heap size on 512Mb)
    -Xms512m -Xmx512m
    For detailed explanation I would recommend you to check following link:
    http://download-uk.oracle.com/docs/cd/B25221_03/web.1013/b14431/troublesht.htm
    Hope this help.

  • How to increase the heap size of the container in whioch BPEL is running ?

    Hi All,
    I recently raised an SR they have asked me to do the following,
    Can you please try and start the container running the BPEL process with max
    heap space (-Xmx) of 2 GB and the eden space (-Xmn) at about 60% of 1228m and
    the option -XX:+AggressiveHeap set. (even though this option is recommended for
    multi processor machines say 4)
    can anyone kindly explain me how to increase the Heap size and Eden size of BPEL container ?
    Thank You

    Hi Deepak I cant see any attribute or element in the oc4j_opmn.xml file regarding heap memory. In the server properties I changed the size of heap memeory how can I rollback.
    I am getting the following error
    Configuration information
    Running in C:\product\10.1.3.1\OracleAS_1
    Operation mode:Startup, App Server, No Enterprise Manager, Single Instance
    Oracle home:C:\product\10.1.3.1\OracleAS_1
    Oracle home name:Unnamed
    Instance name:SOA.01hw117905.India.TCS.com
    Instance type:allProducts
    Version:10.1.3.4.0
    Uses infrastructure:false
    Not an infrastructure instance, no infrastructure information available
    Components:[j2ee, apache, orabpel, oraesb, owsm, Wsil]
    2009-08-19 09:08:51.863--Begin log output for Mid-tier services (SOA.01hw117905.India.TCS.com)
    2009-08-19 09:08:51.863--Processing Step: starting OPMN
    2009-08-19 09:09:00.394--Processing Step: starting OPMN managed processes
    2009-08-19 09:09:35.19--End log output for Mid-tier services (SOA.01hw117905.India.TCS.com)
    An unknown OPMN error has occured
    oracle.appserver.startupconsole.model.ConsoleException: An unknown OPMN error has occured
         at oracle.appserver.startupconsole.control.OPMNController.doStart(OPMNController.java:121)
         at oracle.appserver.startupconsole.control.Controller.start(Controller.java:69)
         at oracle.appserver.startupconsole.control.GroupController.doStart(GroupController.java:47)
         at oracle.appserver.startupconsole.control.Controller.start(Controller.java:69)
         at oracle.appserver.startupconsole.view.controller.ControllerAdapter.start(ControllerAdapter.java:30)
         at oracle.appserver.startupconsole.view.controller.MasterControlAdapter.run(MasterControlAdapter.java:94)
         at oracle.appserver.startupconsole.view.Runner.main(Runner.java:39)
    Caused by: oracle.ias.opmn.optic.OpticControlException: Error from opmn during process control operation
         at oracle.ias.opmn.optic.AbstractOpmnEntity.runCommand(AbstractOpmnEntity.java:174)
         at oracle.ias.opmn.optic.AbstractOpmnEntity.start(AbstractOpmnEntity.java:110)
         at oracle.appserver.startupconsole.control.OPMNController.doStart(OPMNController.java:89)
         ... 6 more
    Exception caused by
    Error from opmn during process control operation
    oracle.ias.opmn.optic.OpticControlException: Error from opmn during process control operation
         at oracle.ias.opmn.optic.AbstractOpmnEntity.runCommand(AbstractOpmnEntity.java:174)
         at oracle.ias.opmn.optic.AbstractOpmnEntity.start(AbstractOpmnEntity.java:110)
         at oracle.appserver.startupconsole.control.OPMNController.doStart(OPMNController.java:89)
         at oracle.appserver.startupconsole.control.Controller.start(Controller.java:69)
         at oracle.appserver.startupconsole.control.GroupController.doStart(GroupController.java:47)
         at oracle.appserver.startupconsole.control.Controller.start(Controller.java:69)
         at oracle.appserver.startupconsole.view.controller.ControllerAdapter.start(ControllerAdapter.java:30)
         at oracle.appserver.startupconsole.view.controller.MasterControlAdapter.run(MasterControlAdapter.java:94)
         at oracle.appserver.startupconsole.view.Runner.main(Runner.java:39)
    <?xml version='1.0' encoding='WINDOWS-1252'?>
    <response>
    <msg code="-82" text="Remote request with weak authentication.">
    </msg>
    <opmn id="01hw117905:6200" http-status="206" http-response="2 of 3 processes started.">
    <ias-instance id="SOA.01hw117905.India.TCS.com">
    <ias-component id="default_group">
    <process-type id="home">
    <process-set id="default_group">
    <process id="172" pid="2176" status="Alive" index="1" log="C:\product\10.1.3.1\OracleAS_1\opmn\logs\\default_group~home~default_group~1.log" operation="request" result="success">
    <msg code="0" text="">
    </msg>
    </process>
    </process-set>
    </process-type>
    <process-type id="oc4j_soa">
    <process-set id="default_group">
    <process id="173" pid="5556" status="Stopped" index="1" log="C:\product\10.1.3.1\OracleAS_1\opmn\logs\\default_group~oc4j_soa~default_group~1.log" operation="request" result="failure">
    <msg code="-21" text="failed to start a managed process after the maximum retry limit">
    </msg>
    </process>
    </process-set>
    </process-type>
    </ias-component>
    <ias-component id="HTTP_Server">
    <process-type id="HTTP_Server">
    <process-set id="HTTP_Server">
    <process id="171" pid="2724" status="Alive" index="1" log="C:\product\10.1.3.1\OracleAS_1\opmn\logs\\HTTP_Server~1.log" operation="request" result="success">
    <msg code="0" text="">
    </msg>
    </process>
    </process-set>
    </process-type>
    </ias-component>
    </ias-instance>
    </opmn>
    </response>

  • Change your JVM heap size

    Can you please let me know how to increase the JVM Heap Size -- on linux fedora 6.0.
    Thank you,

    See -Xmx
    http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html

  • Forms Server JVM Heap Size

    Hi,
    Is it possible to change the java importer JVM Heap size on the Forms server in 9iR2?
    Currently, I get a java.lang.OutOfMemory exception when trying to run some imported Java on the server through my form.
    Thanks in advance,
    Ian

    We are looking into adding the ability to specify the heap size of the JVM when you use the Java Importer. It can't be done right now.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • How can I increase the thumbnail size when using Safari to upload an image to a website?

    I upload many images to multiple websites and when using Safari to upload these images, the thumbnails are so small I can barely make out what the image is. I can easily figure out how to increase the thumbnail size when viewing them in Finder and set the default to my liking, but I cannot seem to find a way to do this in Safari. The last topic I saw on this was form 2013 and have not seen any update. Is there a way to do this?

    Delete all unused, invisible layers.
    Sometimes zip compression is better than jpg compression (in the pdf output settings). Zip is lossless, and works better with non gradient colour or no images.
    Flattening the image before you save it to pdf can reduce the file size if you are using jpg compression.
    Post a preview of your pdf and we can comment further on how to reduce the file size.

  • I am receiving this error message when trying to export pictures: 'Unable to Export": An internal error has occured: Win32 API error 2 ( "The system cannot find the file specified.") when calling ShellExecuteExW from AgWorkspace.shellExecute.// I have a H

    I am receiving this error message when trying to export pictures: 'Unable to Export": An internal error has occured: Win32 API error 2 ( "The system cannot find the file specified.") when calling ShellExecuteExW from AgWorkspace.shellExecute.// I have a HP ENVY Phoenix, fully loaded, 1 1/2 years old.

    Nevermind I fixed it. Thank you.

  • Is it possible? "automatically increasing text block size when typing?"

    I want to know that:  "automatically increasing text block size when typing?" This works exactly in Freehand 10, 11.
    is it possible?
    Thanks.

    Smart Text Reflow was added to CS4, which might also be of interest to you.
    Adobe does, in fact listen to customer requests for new and improved features. Not all requests can be satisfied during each release cycle, but if you have a suggestion, you should file it at Adobe - Feature Request/Bug Report Form

  • How to get jvm heap size?

    Hi All,
    I would like to get the jvm heap size.
    by which method to get jvm heap size?
    Where it can be executed?
    Thanks,

    You can get this:
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#freeMemory()

  • Can't create DeliveryBean when call bpel from jsp

    Can't create DeliveryBean when call bpel from jsp
    /*** code ********************************/
    Properties props = new java.util.Properties();
    java.net.URL url = ClassLoader.getSystemResource("context.properties");
    props.load(url.openStream());
    Locator locator = new Locator(domain, "bpel", props);
    IDeliveryService deliveryService = (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
    NormalizedMessage nm = new NormalizedMessage();
    String convId = GUIDGenerator.generateGUID();
    nm.setProperty(NormalizedMessage.CONVERSATION_ID, convId);
    nm.addPart("payload", xml);
    NormalizedMessage res = deliveryService.request(processID,operationName, nm);
    /*** code ********************************/
    This code works well in java , but when I use it in jsp on tomcat server,
    the following exception ocured:
    Can not create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NameNotFoundException: Name ejb is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:768) at org.apache.naming.NamingContext.lookup(NamingContext.java:151) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279) at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83) at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53) at workflow.bpel.BpelProcessHelper.invokeSyncBpel(BpelProcessHelper.java:54) at
    Will anyone to tell me where "ejb/collaxa/system/DeliveryBean" bean is?
    Which jar file is this class in ?
    Thanks

    did you try including bpel/lib/orabpel.jar & bpel/system/server/j2ee/ob_ejb_engine.jar in your tomcat classpath.

  • Increase JVM memory size in build.xml?

    Hi,
    I want to know if it is possible to increase the JVM memory size in the "build.xml" file of my java fx project itself?If so,how to go about it?
    Thanks a lot.

    I think you can achieve that by specifying <fx:jvmarg>.
    For example:
    <fx:deploy width="${applet.width}"
                   height="${applet.height}"   
                   embedJNLP="true"
                   nativeBundles="all"
                      outdir="${dist.dir}" 
                   outfile="${application.title}"
                   verbose="true">
         <!--
         Increase JVM memory size.
         http://docs.oracle.com/javafx/2/deployment/javafx_ant_task_reference002.htm#CIAGFFIF
         -->
         <fx:platform javafx="2.2+" j2se="7.0">
              <fx:jvmarg value="-Xms64M"/>
              <fx:jvmarg value="-Xmx512M"/>
         </fx:platform>
    </fx:deploy>Hope that helps!
    Edited by: ytw on Nov 16, 2012 12:30 PM

  • Does Solaris10 for x86 allow me to set java jvm heap size up to 3G

    Does Solaris10 for x86 allow me to set java jvm heap size up to 3G,is it really true solaris only take 512M memory address space?I can only set 2668M(2.5G)on linux cause linux kernel take 1G memory address space.Thanks~~

    [url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html]Runtime seems to have some useful methods...

  • Why JVM shows another Heap size when Xms=Xsx?

    Hi everybody. I have two instances of oc4j on a cluster of two nodes. The configuration of parameters on opmn.xml is exactly the same for both instances.
    Particulary I see an strange behavior on memory heap. I expect that if Xmx and Xms parameters are equals to 4096, then the heap size must be fixed on 4 Gb exactly, and there will be not resizing.
    But monitoring the heaps with JVisualVM I can see that the heap size of the first instance is moving between 3.7 and 4 Gb, and the Heap size of the second node is moving around 3.2 Gb. The hosts have both 16 Gb of RAM, it's running on Windows 2003 Server R2 and there is no overload on the OS.
    Possibly the behavior is normal and I just have a wrong understanding of what is expectable.
    Here are some parameteres extracted from opmn.xml file:
    -D64
    -Dcom.sun.management.jmxremote
    -Xmx4096M
    -Xms4096M
    -XX:+UseParallelGC
    -verbose:gc
    -XX:+PrintGCTimeStamps
    -XX:+PrintGCDetails
    -Xloggc:D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\archivo_loggc.log
    -Dcom.sun.management.jmxremote.port=8004
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    -Djava.security.policy=D:\oracle\product\10.1.3\soa\j2ee\OC4J_SOA\config\java2.policy
    -Djava.awt.headless=true
    -Dhttp.webdir.enable=false
    -Doc4j.userThreads=true
    -Doracle.mdb.fastUndeploy=60
    -Doc4j.formauth.redirect=true
    -Djava.net.preferIPv4Stack=true
    -Dorabpel.home=D:\oracle\product\10.1.3\soa\bpel
    -Xbootclasspath/p:D:\oracle\product\10.1.3\soa\bpel\lib\orabpel-boot.jar
    -Dstdstream.filesize=8
    -Dstdstream.filenumber=30
    -Dhttp.proxySet=false
    -XX:MaxPermSize=768M
    -XX:PermSize=768M
    -Doraesb.home=D:\oracle\product\10.1.3\soa\integration\esb
    -Dorabpel.process.lock.timeout=300
    -Drmi.client.connection.timeout=100
    -Doracle.dms.hunter.sleeptime=600000
    -Doracle.dms.gatherers=300000,2:1800000:3
    -Djavax.net.ssl.keyStore=D:\oracle\product\10.1.3\soa\jdk\jre\lib\security\cacerts
    -Djavax.net.ssl.keyStorePassword=changeit
    -DopmnPingInterval=90
    -Xrs
    -DHTTPClient.socket.staleCheck=true
    -DHTTPClient.disableKeepAlives=true
    -XX:+HeapDumpOnOutOfMemoryError

    Hi Sebastien, Thanks for responding.
    In fact I'm looking exactly where you say to determine your heap size.
    The thing is that I can't understand why one instance takes some minor heap size and fluctuates the size while the other instance take around 4 Gb and kept static in this value. I can see there is no diferences on configuration for both. I know that the used heap must present diferent behavior, but not the total size. I think that the size should be fixed and static with Xmx=Xms=4096, but this is not happening.
    I would like to show an image to ilustrate what I'm describing.
    About the PermGen, I think there's no problem with that, around 80% is in effective use, and this value is stable.
    Best regards

Maybe you are looking for

  • How to add jar files  classpath in sun stdio creator

    Hi, i am using log4j-1.2.13.jar in my application. how to add it to my classpath in sun stdio. with regards shannu sarma

  • Installed variables are not showing up in Query

    variable Edited by: sam on Feb 15, 2008 8:09 PM

  • Info Record - Purchase group

    Hi, I'm creating info records and I have two doubts/issues: 1 - Even if in the screen layout configuration the purchase group is not mandatory, when I'm creating the info record the system gives me a error message. The purchase group is really necess

  • Photo Sync Trouble

    Since the update to iTunes 7.0 and beyond, every time I try to sync photos (or Outlook Calendar), the program just quits. Also, when I try to make iTunes the default player for audio files, it says I do not have permissions. Anyone know what's going

  • Oracle 11GR2 + RMAN

    Hi all, I have a RAC database 11GR2 with 2 nodes. I backup database via RMAN and catalog. My catalog is stored in this database. Could you explain me how to create a second RMAN catalog on another database (on another host) ? Thanks !