Maximizing Servlet Performance Consider the following guidelines for improving servlet performance: • Thejvm12. conf file has a configuration parameter,jvm. stickyAttach. Setting the value of this parameter to 1 causes threads to remember that they are attached to the JVM, thus speeding up request processing by eliminating AttachCurrentThread and DetachCurrentThread calls. It can, however, have aside- effect: recycled threads which may be doing other processing can be suspended by the garbage collector arbitrarily. Thread pools can be used to eliminate this side effect for other subsystems. For more information about thread pools, see the iPlanet Web Server Administrator’s Guide. • Increase thefront- end thread stack size inmagnus. conf( via the StackSize directive), or the respective pool stack size parameter if you’re using thread pools. For more information, see the NSAPI Programmer’s Guide for iPlanet Web Server. • Increase the heap size to help garbage collection:jvm. minHeapSize or maxHeapSize or the Configure JVM Attributes page. • Ensure that yourjvm. classpath is short( if you don't need some of the examples). You can setjvm.include.CLASSPATH= 0 so it won’t inherit the CLASSPATH environment variable. • Sometimes, iPlanet Web Server 6.0 may run out of stack space if applications use deep recursion when a JIT 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 themagnus. conf file. For more information, see the NSAPI Programmer’s Guide for iPlanet Web Server. • 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 6,“ Session Managers.”