1) Werner Puschitz’s
recommendations for /etc/security/limits.conf are:
oracle
soft nofile
63536
oracle
hard nofile
63536
oracle
soft nproc
16384
oracle
hard nproc
16384
oracle
soft memlock
1048576
oracle
hard memlock
1048576
2) Werner Puschitz:
"it is recommended to set SEMOPM equal to SEMMSL." That would
mean us increasing SEMOPM from 100 to 250. Do that by editing /etc/sysctl.conf and changing line:
kernel.sem = 250 32000 100 128
to:
kernel.sem = 250 32000 250 128
3) Example - we need 7642 hugepages
to hold current server SGAs. Best to give it a
little bit more headroom for future databases / increases to existing sgas – maybe to the same size as the current shmmax of 8gb? Make the change with, e.g.:
echo "vm.nr_hugepages=8192"
>> /etc/sysctl.conf
#!/bin/bash # # hugepages_settings.sh # # Linux bash script to compute values for the # recommended HugePages/HugeTLB configuration # # Note: This script does calculation for all shared memory # segments available when the script is run, no matter it # is an Oracle RDBMS shared memory segment or not. # Check for the kernel version KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'` # Find out the HugePage size HPG_SZ=`grep Hugepagesize /proc/meminfo | awk {'print $2'}` # Start from 1 pages to be on the safe side and guarantee 1 free HugePage NUM_PG=1 # Cumulative number of pages required to handle the running shared memory segments for SEG_BYTES in `ipcs -m | awk {'print $5'} | grep "[0-9][0-9]*"` do MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q` if [ $MIN_PG -gt 0 ]; then NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q` fi done # Finish with results case $KERN in '2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`; echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;; '2.6') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;; *) echo "Unrecognized kernel version $KERN. Exiting." ;; esac # End