1. What is the heap function in java ?
2. Problem:
How to set the java memory? to avoid the OutOfMemoryException.
Java heap is the heap size allocated to JVM applications which takes
care of the new objects being created. If the objects being created
exceed the heap size, it will throw an error saying memoryOutof Boun.
2. Problem:
and how much is fit?
3. Solution:
A.How to set java memory
Memory usage = Stack Size + Heap Size + Code Size
-Xms | initial java heap size |
-Xmx | maximum java heap size |
-Xss | set thread stack size |
B. How much is fit on your application?
IBM technical report say about head size
Size your Java heap so that your application runs with a minimum heap usage of 40%, and a maximum heap usage of 70%.
Reference:
IBM heap size advice
How to set java memory and debug
Java Memory Talk
what_is_java_heap_size
沒有留言:
張貼留言