| Author |
JVM Heap size - How
|
Ramu Nur
Greenhorn
Joined: Aug 21, 2010
Posts: 20
|
|
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: 6588
|
|
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 - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
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
|
 |
 |
|
|
subject: JVM Heap size - How
|
|
|