InfoCenter Home >
4: Developing applications >
4.4: Personalizing applications >
4.4.1: Tracking sessions >
4.4.1.1: Session programming model and environment >
4.4.1.1.7: Tuning session support >
4.4.1.1.7.1: Tuning session support: Session persistence

4.4.1.1.7.1: Tuning session support: Session persistence

IBM WebSphere Application Server avoids using the database to read in or access the session when it is determined that the entry in the session cache is still the most recently updated copy. To tune the cache, set the base in-memory session pool size and allow overflow.

In addition to the cache table itself, the product maintains a list of the most recently used sessions in memory, ordered from least to most recently used. Whenever a session is accessed, it is added to the most-recently-used end of the list. When the cache table becomes full and a session that is not in the cache is accessed, the least recently used session is removed from the cache (but not from the database; the session is still valid until explicitly invalidated or timed out) to make room for the new entry.

This removal occurs whether or not overflow is enabled. However, under heavy-concurrent-access scenarios, multiple new sessions might compete for the space vacated by the single, least recently used entry.

  • When overflow is disabled, only one new session is placed in the cache; the others must be reread from the database. To optimize performance, the product does not retry to add the next new session by removing the next least recently used entry.
  • When overflow is enabled, one new session is added to the base table, and the rest reside in memory in the overflow table. Analysis and customer experience show that the size of this table remains relatively small compared to the base in-memory session pool size.

It is also important to establish session affinity so that the caching can be most effective. See the Related information for details.

Go to previous article: Tuning session support Go to next article: Tuning session support: Multirow schema

 

 
Go to previous article: Tuning session support Go to next article: Tuning session support: Multirow schema