Consider the following guidelines for improving servlet performance:
Increase the heap size to help garbage collection.
Sun Java System Web Server 6.1 may occasionally run out of stack space if applications use deep recursion when a JIT (just-in-time) compiler is enabled, especially on UNIX platforms where the default stack size is small, or in any cases where very complex JSP pages are used.
You can set the stack space using the StackSize directive in the magnus.conf file. For more information, see the Sun Java System Web Server 6.1 SP6 NSAPI Programmer’s Guide.
The use of the NSAPI cache improves 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
The session ID generator, which is used for servlet sessions, employs cryptographically strong unique random number generation algorithms. This may present a performance problem on older, slow machines. For more information, see Chapter 5, Session Managers