sontnvn
asked on
Max-heap-size of JVM
Dear Experts,
I set these properites in JLNP file
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="256m"/>
Result:
I catch OutOfMemory exception when JVM reach 65088 MB
When I change initial-heap-size="64m" ==> initial-heap-size="128m"
The I couldnot start jws.
Could you help me increase more heap size of JVM?
Thank you very much for your help.
I set these properites in JLNP file
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="256m"/>
Result:
I catch OutOfMemory exception when JVM reach 65088 MB
When I change initial-heap-size="64m" ==> initial-heap-size="128m"
The I couldnot start jws.
Could you help me increase more heap size of JVM?
Thank you very much for your help.
Also perhaps should be:
<j2se version="1.3+" initial-heap-size="64m" max-heap-size="256m"/>
<j2se version="1.3+" initial-heap-size="64m" max-heap-size="256m"/>
ASKER
> <j2se version="1.3+" initial-heap-size="64m" max-heap-size="256m"/>
===> Nothing changed
===> Nothing changed
> ===> Nothing changed
Can you explain exactly what is happening.
Can you explain exactly what is happening.
ASKER
Case 1:
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="256m"/>
Case2:
<j2se version="1.3+" initial-heap-size="64m" max-heap-size="256m"/>
In both case, My application throw OutOfMemory exception. I trace memory information and this is the result:
Runtime.getRuntime().total Memory()/1 024 = 65088
Runtime.getRuntime().freeM emory()/10 24 = 17638
Runtime.getRuntime().maxMe mory()/102 4 = 131072
Physical memory is 1GB, why Runtime.getRuntime().maxMe mory()/102 4 always return 131072?
Anyway, when I run my application by java command line and set -Xmx = 256 then it ran well.
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="256m"/>
Case2:
<j2se version="1.3+" initial-heap-size="64m" max-heap-size="256m"/>
In both case, My application throw OutOfMemory exception. I trace memory information and this is the result:
Runtime.getRuntime().total
Runtime.getRuntime().freeM
Runtime.getRuntime().maxMe
Physical memory is 1GB, why Runtime.getRuntime().maxMe
Anyway, when I run my application by java command line and set -Xmx = 256 then it ran well.
> Physical memory is 1GBwhy Runtime.getRuntime().maxMe mory()/102 4 always return 131072?
Physical memory is not reltaed, the VM has it's own allocated memory space.
Physical memory is not reltaed, the VM has it's own allocated memory space.
ASKER
How can we force JVM increase its maxMemory size? (JWS environment)
When the application throw OutOfMemory exception, task manager (Win2k) report Mem Usage = ~110 000MB.
When the application throw OutOfMemory exception, task manager (Win2k) report Mem Usage = ~110 000MB.
> How can we force JVM increase its maxMemory size?
That is supposedly what max-heap-size should be doing.
Can you post your complete jnlp file.
That is supposedly what max-heap-size should be doing.
Can you post your complete jnlp file.
ASKER
Below is our jnlp file
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://napple/nApple"
href="nApple.jnlp">
<resources>
<!--<j2se version="1.3+" initial-heap-size="128m" max-heap-size="256m"/> -->
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="128m"/>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="nApple.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="com.ykgw.ees.u i.NApple">
<argument>10</argument>
<argument>1</argument>
<argument>http://napple/nApple/nApple.wsdl</argument>
<argument>http://tempuri.org/nApple/message/</argument>
<argument>http://schemas.xmlsoap.org/soap/encoding/</argument>
<argument>http://tempuri.org/nApple/action/PlanDispatcher</argument>
<argument>50</argument>
</application-desc>
</jnlp>
>That is supposedly what max-heap-size should be doing.
==> That mean we cannot change this value?
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
codebase="http://napple/nApple"
href="nApple.jnlp">
<resources>
<!--<j2se version="1.3+" initial-heap-size="128m" max-heap-size="256m"/> -->
<j2se version="1.3+" initial-heap-size="64m"/>
<j2se version="1.3+" max-heap-size="128m"/>
<j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="nApple.jar" main="true" download="eager"/>
</resources>
<application-desc main-class="com.ykgw.ees.u
<argument>10</argument>
<argument>1</argument>
<argument>http://napple/nApple/nApple.wsdl</argument>
<argument>http://tempuri.org/nApple/message/</argument>
<argument>http://schemas.xmlsoap.org/soap/encoding/</argument>
<argument>http://tempuri.org/nApple/action/PlanDispatcher</argument>
<argument>50</argument>
</application-desc>
</jnlp>
>That is supposedly what max-heap-size should be doing.
==> That mean we cannot change this value?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
why not?