Consider the following guidelines for improving servlet performance:
Increase the Java heap size to help garbage collection. The Java heap size can be adjusted by adjusting the values specified to the —Xms and —Xmx jvm- options in server.xml. For example, <jvm-options>-Xms128m-Xmx256m</jvm-options> sets the minimum Java heap size to 128 MB and 256 MB. For more information, see Sun Java System Web Server 7.0 Administrator’s Guide.
Set the stack space if applications use deep recursion, or in any cases where very complex JSP pages are used.
You can set the stack space using set-thread-pool-prop wadm command. For example, $wadm set-thread-pool-prop [other args] stack-size=544288. For more information, see Sun Java System Web Server 7.0 Update 1 NSAPI Developer’s Guide.
Use the NSAPI cache improve servlet performance in cases where the obj.conf configuration file has many directives. To enable the NSAPI cache, include the following line in magnus.conf:
Init fn="nsapi-cache-init" enable=true
Check whether the session ID generator that is used for servlet sessions employs cryptographically unique random number generation algorithms. This method might present a performance problem on older, slow machines. For more information, see Chapter 6, Session Managers.
Reduce the number of directories in the classpath.
Disable dynamic reloading.
Disable the Java Security Manager.