1. How much time does the server keeps the huge JSP object? If it keeps till the GC what will happen if number of Client request for the same JSP page at a time is high?
JSPs compile into
servlets. The lifecycle of the servlet is managed by WebLogic. The Servlet spec only guarantees the 0 or more requests will be processed by the servlet before it is destroyed. It is entirely up to WebLogic as to when the Servlet is destroyed and hence available for GC. WebLogic could destroy the servlet after a single request (but it doesn't). Basically WebLogic tries to manage its memory the best it can, if this means destroying your servlet/JSP then it will. These types of details are very dependent on the configuration of your server.
If you want, you can
test to see when your page is getting created and destroyed, just write to the WL log when these events occur. Hint: override jspInit() and jspDestroy().
2. How do we set the GC time ?
Garbage Collection cannot be configured, it is up to the JVM to decide when is the best time to GC. The best a developer can do is "suggest" JVM perform garbage collection.
3. What is heap size?
The amount of memory available to the JVM.
4. What is the purpose of "-hotspot -ms128m -mx128m" we set in the weblogic startup command.
Sets the heap size to a minimum of 128MB and a maximum of 128MB.
5. Please suggest some server performance tips.
Check out this book:
Title:
J2EE Performance Testing with BEA WebLogic Server
ISBN: 1904284000