Solaris OracleDB zone
From Lolly's Wiki
Setup Solaris server with OracleDB in a zone
Our setup is a 48GB x86-Server
Limit ZFS ARC
Add to /etc/system:
set zfs:zfs_arc_max = <bytes as hex value>
To calculate your own value:
# LIMIT_GB=8 ; printf "*\n** Limit ZFS ARC to %dGB\n*\nset zfs:zfs_arc_max = 0x%x\n" ${LIMIT_GB} $[${LIMIT_GB} * 1024 * 1024 * 1024]
*
** Limit ZFS ARC to 8GB
*
set zfs:zfs_arc_max = 0x200000000
Create Zone
Set values:
ZONENAME=oracle
ZONEPOOL=rpool
ZONEBASE=/var/zones
MAX_SHM_MEMORY=30G
NUMBER_OF_CPUS=2
Create zone with
zfs create -o mountpoint=none ${ZONEPOOL}/zones
zfs create -o compression=on -o mountpoint=${ZONEBASE}/${ZONENAME} ${ZONEPOOL}/zones/${ZONENAME}
chmod 700 ${ZONEBASE}/${ZONENAME}
printf "
create
set autoboot=true
set zonepath=${ZONEBASE}/${ZONENAME}
add dedicated-cpu
set ncpus=${NUMBER_OF_CPUS}
end
set scheduling-class=FSS
set max-shm-memory=${MAX_SHM_MEMORY}
verify
commit
" | zonecfg -z ${ZONENAME} -f -
Enable dynamic pool service to add support for dedicated-cpus:
svcadm enable svc:/system/pools/dynamic
Install and boot:
zoneadm -z ${ZONENAME} install
zoneadm -z ${ZONENAME} boot
zlogin ${ZONENAME} usermod -s /bin/bash root
zlogin ${ZONENAME}
CPU-check:
-bash-3.2# psrinfo -pv
The physical processor has 2 virtual processors (0 1)
x86 (chipid 0x0 GenuineIntel family 6 model 44 step 2 clock 3059 MHz)
Intel(r) Xeon(r) CPU X5675 @ 3.07GHz