Avoiding Directories In The Classpath; Configuring The Web Application's Session Settings - Sun Microsystems Sun Java System Web Server 7.0 Manual

Update 1 performancetuning, sizing, and scaling guide
Table of Contents

Advertisement

Tuning Java Web Application Performance

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 Prefix, and Class Path Suffix fields on the
configuration's Java tab ⇒ General sub tab for the configuration or use the command wadm
set-jvm-prop. Also, package the web application's .class files in a .jar archive in
WEB-INF/lib instead of packaging the .class files as is in WEB-INF/classes, and ensure that
the .war archive does not contain a WEB-INF/classes directory.

Configuring the Web Application's Session Settings

If you have relatively short-lived sessions, try decreasing the session timeout by configuring 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 configured to be either
s1ws60 or mmap, the session manager uses cross-process locks to ensure session data integrity.
These can be configured to improve performance as described below.
Note –
backward-compatibility only.
Tuning maxLocks (UNIX/Linux)
The implication of the number specified 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 file 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.
80
Sun Java System Web Server 7.0 Update 1 Performance Tuning, Sizing, and Scaling Guide •
For Java technology-enabled servers, multi-process mode is deprecated and included for

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Sun Java System Web Server 7.0 and is the answer not in the manual?

Questions and answers

Table of Contents