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
export LD_LIBRARY_PATH_64=$ORACLE_HOME/lib

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

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

Append the following line to the "/etc/user_attr" file.
oracle::::project=oracle

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 user.oracle

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

Other parameters to consider
process.max-sem-nsems
process.max-sem-ops
project.max-sem-ids
project.max-shm-ids


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

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

#!/sbin/sh
case "$1" in
'start')
ndd -set /dev/udp udp_xmit_hiwat 65536
ndd -set /dev/udp udp_recv_hiwat 65536
;;
.
'state')
ndd /dev/udp udp_xmit_hiwat
ndd /dev/udp udp_recv_hiwat
;;
.
*
echo "Usage: $0 { start state }"
exit 1
;;
esac

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