Estimating the size of the resident portion of shared memory

You can use formulas to estimate the size of the resident portion (in KB) of shared memory when you allocate operating-system shared memory.

About this task

The result of your calculations is an estimate that normally, slightly exceeds the actual memory that is used for the resident portion of shared memory.

The following estimate was calculated to determine the resident portion of shared memory on a 64-bit server. The sizes that are shown are subject to change, and the calculation is approximate.

Procedure

To estimate the size of the resident portion of shared memory
  1. Estimate the size of the data buffer, using the following formula:
    buffer_value = (BUFFERS * pagesize) + (BUFFERS * 254) + 250000
    pagesize
    is the shared-memory page size, as onstat -b shows it on the last line in the buffer size field.

    If you have multiple buffer pools, add the buffer sizes for each buffer pool together.

  2. Calculate the values in the following formulas:
    locks_value = LOCKS * 136
    logbuff_value = LOGBUFF * 1024 * 3
    physbuff_value = PHYSBUFF * 1024 * 2
    locks_value = LOCKS * 128
    logbuff_value = LOGBUFF * 1024 * 3
    physbuff_value = PHYSBUFF * 1024 * 2
  3. Calculate the estimated size of the resident portion in KB, using the following formula:
    rsegsize = 1.02 * (locks_value + logbuff_value 
               + physbuff_value + 1,200,000) / 1024
    rsegsize = 1.02 * (buffer_value + locks_value
     + logbuff_value  + physbuff_value + 1,200,000) / 1024