If you have relatively short 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 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 3 Developer’s Guide to Java Web Applications.
In multi-process mode when the persistence-type in sun-web.xml is configured to mmap, the session manager uses cross-process locks to ensure session data integrity. These can be configured to improve performance as described below.
For Java technology-enabled servers, multi-process mode is deprecated and included for backward-compatibility only.
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 3 Developer’s Guide to Java Web Applications.
The following example describes the effect on process size when configuring the persistence-type="mmap" using the manager-properties properties. For more information, see MMap Session Manager (UNIX Only) in Sun Java System Web Server 7.0 Update 3 Developer’s Guide to Java Web Applications.
maxSessions = 1000 maxValuesPerSession = 10 maxValueSize = 4096
This example creates a memory mapped file of size 1000 X 10 X 4096 bytes, or ~40 MB. As this is a memory mapped file, the process size will increase by 40 MB upon startup. The larger the values you set for these parameters, the greater the increase in process size.