• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM Heap size - How

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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).
 
Ranch Hand
Posts: 206
Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic