Calculating the Shared Memory Size
This chapter describes how to calculate the size of the shared memory.
The shared memory in Tibero is divided into fixed memory and shared pool memory as follows:
Fixed Memory Its size is fixed based on a parameter value set at database startup.
– Buffer cache (database buffer)
– Log buffer
– Others: space for global variables and managing working threads and session information.
Shared Pool Memory It is dynamically allocated during database operation.
– DD cache
– PP cache (library cache)
– Others
Considerations
Consider the following when calculating the size of the shared memory.
The size of the shared memory cannot be increased dynamically while the database is running.
The size of the shared memory must be determined properly based on the usage patterns of the buffer cache and shared pool.
- Buffer Cache
Determine the size according to the Buffer Cache Hit rate in TPR after executing major workloads.
If the hit rate is lower than 90%, increase the buffer cache.
- Shared Pool Memory
Determine the size according to the SHARED POOL MEMORY item in v$sga after executing major workloads.
If the shared pool usage is too high (insufficient free area), increase the shared pool memory.
At least 1 MB of the shared pool memory is required for each session.
Calculating the Size
The size of each area in the shared memory can be checked with v$sga.
The size of the shared memory can be set and queried with the following initialization parameters.
Shared Memory
The following example queries the size with the TOTAL_SHM_SIZE parameter.
Buffer Cache
The following example queries the size with the DB_CACHE_SIZE parameter.
Single mode : ⅔ of TOTAL_SHM_SIZE
TAC mode : ½ of TOTAL_SHM_SIZE
Log Buffer
The following example queries the size with the LOG_BUFFER parameter. (the default value of LOG_BUFFER is 10 MB.)
Shared Pool Memory
The size can be calculated by subtracting the fixed memory size from the total shared memory size as follows:
Single mode The total shared pool size must be greater than _MIN_SHARED_POOL_SIZE.
TAC mode Sufficient space for Cluster Cache Control (CCC) and Cluster Wait-lock Service (CWS) is required. About 25% of a total buffer cache size is used by shared pools.
The shared pool space excluding space for CCC and CWS must be greater than
_MIN_SHARED_POOL_SIZE.
The free shared pool size for PP and DD caches must be greater than CCC and CWS spaces.
Last updated