10 October 2006
Oracle SGA with Solaris Dynamic Intimate Shared Memory
ISM
Solaris locks all SGA shared memory segments in the physical memory by forcing the use of ISM. ISM segments cannot be dynamically resized, which means instance restarts are required for the change of SGA components. This is the default Solaris behaviour.
Another problem with ISM is that memory between real SGA and SGA_MAX_SIZE is unavailable for other running processes.
DISM
This problem can be addressed in Solaris 8 and higher, with the use of Dynamic ISM. DISM enables Unix shared segments to be adjusted dynamically. Process ora_dism_$ORACLE_SID locks and unlocks memory pages in the name of the attached Oracle process. The unused segments from the physical memory will be deallocate into the swap area. Therefore, swap area size should be sized to be as large as SGA_MAX_SIZE.
With DISM, you can add or remove physical memory boards and dynamically resize SGA components, while never needing to restart the Oracle instance.
Enabling DISM
If you configure SGA_MAX_SIZE larger than the sum of its component, Oracle will attempt to use DISM.
How to check whether DSIM has been enabled?
Checking whether ora_dism_$ORACLE_SID is running is not enough. The best way is to check what type of shared memory segment any Oracle process is attached to.
$ ps -ef | grep -i smo[n]
oracle 13734 1 0 Oct 04 ? 3:21 ora_smon_finlsp
$ pmap 13734
13734: ora_smon_finlsp
0000000100000000 54984K r-x-- /appl/oracle/product/9.2_64/bin/oracle
00000001036B0000 896K rwx-- /appl/oracle/product/9.2_64/bin/oracle
0000000103790000 432K rwx-- [ heap ]
0000000380000000 20992000K rwxs- [ dism shmid=0x4c01 ]
FFFFFFFF7B470000 256K rw--R [ anon ]
If ISM is used, then you will get:
0000000380000000 20992000K rwxs- [ ism shmid=0x4c01 ]
References
Solaris locks all SGA shared memory segments in the physical memory by forcing the use of ISM. ISM segments cannot be dynamically resized, which means instance restarts are required for the change of SGA components. This is the default Solaris behaviour.
Another problem with ISM is that memory between real SGA and SGA_MAX_SIZE is unavailable for other running processes.
DISM
This problem can be addressed in Solaris 8 and higher, with the use of Dynamic ISM. DISM enables Unix shared segments to be adjusted dynamically. Process ora_dism_$ORACLE_SID locks and unlocks memory pages in the name of the attached Oracle process. The unused segments from the physical memory will be deallocate into the swap area. Therefore, swap area size should be sized to be as large as SGA_MAX_SIZE.
With DISM, you can add or remove physical memory boards and dynamically resize SGA components, while never needing to restart the Oracle instance.
Enabling DISM
If you configure SGA_MAX_SIZE larger than the sum of its component, Oracle will attempt to use DISM.
How to check whether DSIM has been enabled?
Checking whether ora_dism_$ORACLE_SID is running is not enough. The best way is to check what type of shared memory segment any Oracle process is attached to.
$ ps -ef | grep -i smo[n]
oracle 13734 1 0 Oct 04 ? 3:21 ora_smon_finlsp
$ pmap 13734
13734: ora_smon_finlsp
0000000100000000 54984K r-x-- /appl/oracle/product/9.2_64/bin/oracle
00000001036B0000 896K rwx-- /appl/oracle/product/9.2_64/bin/oracle
0000000103790000 432K rwx-- [ heap ]
0000000380000000 20992000K rwxs- [ dism shmid=0x4c01 ]
FFFFFFFF7B470000 256K rw--R [ anon ]
If ISM is used, then you will get:
0000000380000000 20992000K rwxs- [ ism shmid=0x4c01 ]
References
- Excellent Solaris document is at:
- Solaris bug for DISM: 4787183