RESIZING SGA IN ORACLE RAC 10g USING SOLARIS PROJECT FILE
Its very crucial and important to have a well needed size of SGA . Here I will go thru some steps in order to resize SGA on oracle RAC 10g setup on Sun Solaris 10, when you are using /etc/project file to configure your oracle required memory instead of /etc/system file .
The recommended method for modifying the /etc/project file is to use the "proj*" commands,
such as projadd(1) for creating a project and projmod(1) for modifying a project.
Examples of projadd and projmod
a.) # projadd -c "Oracle" 'user.oracle'
b.) # projmod -s -K "project.max-shm-memory=(privileged,6GB,deny)" 'user.oracle'
** Resource Control assignments made in this way (in the /etc/project file) are permanent, and will survive a system re-boot.
** There is also an "on-the-fly" way to temporarily set Resource Control assignments using the prctl(1) command. However, unlike the /etc/project file, resource assignments made in this way will NOT survive a system re-boot.
My Exercise
In My system i found below entries for poracle project ( Oracle owner on system)
poracle:100:OracleProject:poracle:pdba:project.max-sem-ids=(priv,4096,deny);project.max-sem-nsems=(priv,4906,deny);project.max-sem-ops=(priv,4906,deny);project.max-shm-ids=(priv,256,deny)
I was unable to see parameter "project.max-shm-memory" , which actually define oracle required memory on system.
Here on the other hand when i try to increase my sga_target parameter from 4 GB to higher , My database was unable to come up with error defined Memory not available to extend .
While digging up more on proejct file inside metalink , I found if "max-shm-memory" is not defined in project file system has been designed in such a way where it allows oracle to use 1/4th of total available system memory .
That was really interesting as My system is having 16 GB of memory and out of 16 GB , 4 GB was usable for Oracle
due to default nature of project file in SOLARIS 10 .
Now it was straight for me to add "project.max-shm-memory" in project file in order to increase oracle required memory . Below command modified the existing poracle project and added shm max memory for Oralce user .
projmod -s -K "project.max-shm-memory=(privileged,8GB,deny)" 'user.poracle'
Login as root
Run below command
# projmod -s -K "project.max-shm-memory=(privileged,8GB,deny)" 'user.poracle'
#cat /etc/project
poracle:100:OracleProject:poracle:pdba:project.max-sem-ids=(priv,4096,deny);project.max-sem-nsems=(priv,4906,deny);project.max-sem-ops=(priv,4906,deny);project.max-shm-ids=(priv,256,deny);project.max-shm-memory=(priv,8589934592,deny)
Do it on all RAC nodes .
Newly assigned memory will available on each new session and will persist after server reboot .
Now happily you can increase your SGA (sga_target) size without prompting any error .
** You need to define only (sga_target= ..) in init.ora file When using automatic SGA . **