aspose file tools*
The moose likes Performance and the fly likes JVM Heap size - How Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "JVM Heap size - How" Watch "JVM Heap size - How" New topic
Author

JVM Heap size - How

Ramu Nur
Greenhorn

Joined: Aug 21, 2010
Posts: 22
Hi
Is there a standard technique to set the JVM heap size for an application? Or is it a trail-and-error (after profiling) with some start up values?

Thanks
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6657
    
    5

Trail and error mostly. Some apps hog memory and others dont. It depends on how state is maintained; what is cached; how large the cache is; what the purge policy for caches are; etc etc.

A load and performance test usually highlights the limits of CPU / memory / Threads. A good rule of thumb is to add some buffer to the max limit (say 20%. But 20% of what number ? That can be a factor too).


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
chander shivdasani
Ranch Hand

Joined: Oct 09, 2007
Posts: 206

Ya, i agree to Deepak. Its mainly by trial error.
One thing to look is how often does JVM do GC. Make sure its not spending most of its time doing GC.


Enjoy, Chander
SCJP 5, Oracle Certified PL/SQL Developer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM Heap size - How
 
Similar Threads
JVM memory allocation
OutOfMemory Exception. Please Help!
JVM memory allocation
java.lang.OutOfMemoryError
Java Memory Heap Exception