Document Type | Technical Information
Category | Administration
Applicable Product Versions | 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07, 6FS07PS, 7FS01, 7FS02, 7FS02PS
Document Number | TADTI045
Overview
This explains cases where it is difficult to determine how much to set the max session count.
Method
Each session is allocated some memory from PGA and SGA, so the max session value cannot be set indefinitely high. If the value is increased excessively, the following phenomena (*example of failure) occur.
In the case of Tibero, the number of processes is automatically calculated based on the max session value. (By default, one process is configured to handle 10 sessions, and it can be increased if necessary.)
There is no separate upper limit restriction, but since the number of sessions that can be set varies depending on the allocated memory size, it should be set at an appropriate level considering the actual system resources.
Example of Failure
SHM 2G
TARGET 3G
MAXSESSION 600
[tibero@rprmdb sql]$ tbdown;tbboot
sess: 71 user: SYS
There are active session(s).
1. [W]ait until sessions are closed.
2. Shutdown [I]mmediately.
3. [Q]uit without shutting down.
Select action. (Default: 3): I
Tibero instance terminated (IMMEDIATE mode).
Listener port = 8629
*****************************************************
* Warning !!!
* Shared memory size is too small.
* Enlarge shared memory size(TOTAL_SHM_SIZE).
* Current size: 2147483648 bytes
* Minimum size: 2666426440 bytes
*****************************************************
Tibero instance startup failed!
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
SHM 2G
TARGET 3G
MAXSESSION 500
[tibero@rprmdb sql]$ tbboot
"tbdown clean" is executed automatically.
Listener port = 8629
*****************************************************
* Warning !!!
* Shared memory size is too small.
* Enlarge shared memory size(TOTAL_SHM_SIZE).
* Current size: 2147483648 bytes
* Minimum size: 2472394872 bytes
*****************************************************
Tibero instance startup failed!
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
SHM 2G
TARGET 3G
MAXSESSION 400
[tibero@rprmdb sql]$ tbboot
"tbdown clean" is executed automatically.
Listener port = 8629
*****************************************************
* Warning !!!
* Shared memory size is too small.
* Enlarge shared memory size(TOTAL_SHM_SIZE).
* Current size: 2147483648 bytes
* Minimum size: 2288397224 bytes
*****************************************************
Tibero instance startup failed!
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
Out of memory (unable to allocate 496 bytes of shared pool memory for SLAB_ALLOCATOR).
SHM 2G
TARGET 3G
MAXSESSION 300
tibero@rprmdb sql]$ tbboot
"tbdown clean" is executed automatically.
Listener port = 8629
Tibero 6
TmaxData Corporation Copyright (c) 2008-. All rights reserved.
Tibero instance started up (NORMAL mode).
[tibero@rprmdb sql]$ free -h
total used free shared buff/cache available
Mem: 3.7G 501M 1.5G 1.2G 1.8G 1.8G
Swap: 3.9G 0B 3.9GIn a typical OLTP environment, it is assumed that about 10MB of PGA is allocated per session, and the MAX_SESSION_COUNT value is determined accordingly. For example, if there is 1GB of memory, it is considered possible to operate about 100 sessions.
For DW (Data Warehouse) type environments, it is recommended to increase the memory allocation.
Example Setting
MAX_SESSION_COUNT=200 # Maximum expected allowance TOTAL_SHM_SIZE=2G MEMORY_TARGET=3G
When configured as above, about 2GB of memory can be allocated to the PGA, so a maximum of about 200 sessions can be set. It is recommended to set with some margin and later adjust the MAX SESSION value within the system's available memory limit if sessions become insufficient.