Avoiding Directories in the Classpath
For certain applications (especially if the Java Security Manager is enabled) you can improve
performance by ensuring that there are no unneeded directories in the classpath. To do so,
change the Server Class Path, Class Path Prex, and Class Path Sux elds on the
conguration's Java tab ⇒ General sub tab for the conguration or use the command wadm
set-jvm-prop. Also, package the web application's .class les in a .jar archive in
WEB-INF/lib instead of packaging the .class les as is in WEB-INF/classes, and ensure that
the .war archive does not contain a WEB-INF/classes directory.
Conguring the Web Application’s Session Settings
If you have relatively short-lived sessions, try decreasing the session timeout by conguring the
value of the timeOutSeconds property under the session-properties element in
sun-web.xml from the default value of 10 minutes.
If you have relatively long-lived sessions, you can try decreasing the frequency at which the
session reaper runs by increasing the value of the reapIntervalSeconds property from the
default value of once every minute.
For more information about these settings, and about session managers, see Sun Java System
Web Server 7.0 Update 1 Developer’s Guide to Java Web Applications.
In multi-process mode when the persistence-type in sun-web.xml is congured to be either
s1ws60 or mmap, the session manager uses cross-process locks to ensure session data integrity.
These can be congured to improve performance as described below.
Note – For Java technology-enabled servers, multi-process mode is deprecated and included for
backward-compatibility only.
Tuning maxLocks (UNIX/Linux)
The implication of the number specied in the maxLocks property can be gauged by dividing
the value of maxSessions with maxLocks. For example, if maxSessions = 1000 and you set
maxLocks = 10, then approximately 100 sessions (1000/10) contend for the same lock.
Increasing maxLocks reduces the number of sessions that contend for the same lock and might
improve performance and reduce latency. However, increasing the number of locks also
increases the number of open le descriptors, and reduces the number of available descriptors
that would otherwise be assigned to incoming connection requests.
For more information about these settings, see Chapter 6, “Session Managers,” in Sun Java
System Web Server 7.0 Update 1 Developer’s Guide to Java Web Applications.
TuningJavaWebApplicationPerformance
SunJavaSystemWebServer7.0Update1 PerformanceTuning,Sizing,and ScalingGuide •80