How to set the heap size of a JEE application?

173 views Asked by At

I am developing a web classified web site using jsp, java and servlets.

My requirements are:

  • images
  • 2gb web size
  • database
  • category list with fully functional classified web site.

So far, my web host provider gives me 128mb heap size.

How can I calculate my web site heap size need? Tell me if 128mb heap size will fulfill my initial recurements.

1

There are 1 answers

1
Curious1 On

Heap size depends upon the actual live objects present at a time when your application is running. You can use a profiler like jprofiler, visualvm to profile your application simulating the maximum load you want to put at a time. You can use the tips provid in below useful links to find the heap requirement of your application
http://javaeesupportpatterns.blogspot.in/2012/07/5-tips-for-proper-java-heap-size.html
http://docs.oracle.com/html/A90444_01/sizing.htm
Also you can always do heap settings for JVM,provided you have enough RAM.