Friday, April 4, 2008

Solaris 10 Kernel Tuning for Oracle 10g

These steps are in addition to or unique to Solaris when compared with Linux kernel tuning procedure.

Read Metalink note 317257.1 : Running Oracle Database in Solaris 10 Containers Best Practices

Read document for bug 5237047 INCORRECT SYSTEM REQUIREMENTS FOR SOLARIS 10 on metalink. This document shows the incorrect information given in the installation guide (until it is updated with correct information in future).

If RAC is being installed them read metalink note 367442.1 for the error 'srvctl' Unable to Start Large SGA Instance ORA-27102

1. Seperate 64 bit LD_LIBRARY_PATH

2. SUNWsprox package doesn't exist for Solaris 10 so it is not required.

3. add a project for oracle user
projadd -c "Oracle"

Append the following line to the "/etc/user_attr" file.

Add the following to /etc/system with suitable values.
set noexec_user_stack=1
set semsys:seminfo_semmns=1024
set semsys:seminfo_semvmx=32767

To change the kernel dynamically
prctl -n project.max-shm-memory -v 4gb -r -i project

To make these values persist across reboots
projmod -s -K "project.max-shm-memory=(priv,4gb,deny)"
this will add the entry to /etc/project.

Other parameters to consider

Use projmod -rK to remove an entry.
projmod -rK "process.max-sem-nsems=(priv,256,deny)"

To see the current value for oracle user login as oracle and type
prctl $$

To increase the UDP buffer limits add the following script to /etc/init.d

cd /etc/init.d
vi udp_ora

case "$1" in
ndd -set /dev/udp udp_xmit_hiwat 65536
ndd -set /dev/udp udp_recv_hiwat 65536
ndd /dev/udp udp_xmit_hiwat
ndd /dev/udp udp_recv_hiwat
echo "Usage: $0 { start state }"
exit 1

Then make a soft link to run the script
ln -s /etc/init.d/udp_rac /etc/rc3.d/S86udp_ora