000028195 - KB-1158 - Correct sizing for Oracle SGA / PGA

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000028195
Applies ToAffected Versions: 4.X; 3.6.X
Resolution

This ACM Knowledgebase is for ACM versions 3.6 and 4.x pnly. ACM versions 5.+ and 6.+ autocalculate the memory use based on memory on the system at initial install. These instructions are for ACM versions BEFORE V5.


 


 


The Oracle Enterprise Manager may complain about the SGA (System Global Area) not being sized correctly. You may also see this error in the logs:
 


ORA-04031, "unable to allocate %s bytes of shared memory"

If you see either of these messages or the system appears to be slow. It's advisable to check and possibly increase the memory available to Oracle for 64bit installations with more than 8GB of system memory. Use the following guidelines to determine the optimal Oracle memory settings for your environment
1. Determine the total installed system memory in BYTES use either command:
 
free -g | grep Mem | awk -F " " {'print $2'}
Or
cat /proc/meminfo | grep MemTotal | gawk '{print $2}'

2. Use the output to determine the settings, If total memory is:
Greater than 32000000 (32GB) on 64bit systems the SGA/PGA should be sized to:
  • pga_aggregate_target=8589934592
  • sga_max_size=8589934592
  • sga_target=8589934592
Greater or equal to 16000000 (16GB) on 64bit systems the SGA/PGA should be sized to:
  • pga_aggregate_target=4294967296
  • sga_max_size=4294967296
  • sga_target=4294967296
Greater than or equal to 8000000 (8GB) all systems the SGA/PGA should be sized to:
This is the maximum for any memory in 32bit systems.
  • pga_aggregate_target=2097152000
  • sga_max_size=2097152000
  • sga_target=2097152000
Less than 8GB the SGA/PGA should be sized to:
  • pga_aggregate_target=466616320
  • sga_max_size=1325400064
  • sga_target=1325400064
To set the oracle parameters use these steps and the sizes listed above for the memory configuration. This example shows a 8GB system (either 32 or 64bit).
1. Run sqlplus as sysdba and execute the following two SQL statements:
 
ALTER SYSTEM SET pga_aggregate_target = 2097152000 SCOPE=BOTH;

ALTER SYSTEM SET sga_max_size = 2097152000 COMMENT='internally adjusted' SCOPE=SPFILE;

2. Exit sqlplus
3. Stop the Aveksa services
 
sudo service aveksa_agent stop (version 3.X only)

sudo service aveksa_server stop

4.Stop and restart Oracle:
 
/etc/init.d/dbora restart (as root)
or
sudo service dbora restart (as oracle)

5. Run sqlplus again as sysdba and execute the following SQL statement:
 
ALTER SYSTEM SET sga_target = 2097152000 SCOPE=BOTH;

This sets both the SGA and PGA (Program Global Area) to 2GB each.
6. Restart the Aveksa services
 
sudo service aveksa_server start
sudo service aveksa_agent start (version 3.X only)

Attachments

    Outcomes