Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Performance Tuning Guide

- Previous: InternalLogbufferSize
- Next: Summary

#### Calculating the number of locks

To calculate the number of locks needed, estimate the following parameters:

- Number of concurrent users that request session data to be stored in HADB (one session record per user)

- Maximum size of the BLOB session

- Persistence scope (max session data size in case of session/modified session and maximum number of attributes in case of modified session). This requires `setAttribute()` to be called every time the session data is modified.

  If:

- x is the maximum number of concurrent users, that is, x session data records are present in the HADB, and

- y is the session size (for session/modified session) or attribute size (for modified attribute),

  Then the number of records written to HADB is:

  xy/7000 + 2x

  Record operations such as insert, delete, update and read will use one lock per record.

Note –

Locks are held for both primary records and hot-standby records. Hence, for insert, update and delete operations a transaction will need twice as many locks as the number of records. Read operations need locks only on the primary records. During refragmentation and creation of secondary indices, log records for the involved table are also sent to the fragment replicas being created. In that case, a transaction needs four times as many locks as the number of involved records. (Assuming all queries are for the affected table.)

- Previous: InternalLogbufferSize
- Next: Summary

- © 2010, Oracle Corporation and/or its affiliates