Solaris OracleDB zone: Difference between revisions

From Lolly's Wiki
Jump to navigationJump to search
No edit summary
Line 19: Line 19:


==Create Zone==
==Create Zone==
Set values:
<source lang=bash>
<source lang=bash>
ZONENAME=oracle
ZONENAME=oracle
ZONEPOOL=rpool
ZONEPOOL=rpool
ZONEBASE=/var/zones
ZONEBASE=/var/zones
MAX-SHM-MEMORY=30G
NUMBER_OF_CPUS=2
</source>


Create zone with
<source lang=bash>
zfs create -o mountpoint=none ${ZONEPOOL}/zones
zfs create -o mountpoint=none ${ZONEPOOL}/zones
zfs create -o compression=on -o mountpoint=${ZONEBASE}/${ZONENAME} ${ZONEPOOL}/zones/${ZONENAME}
zfs create -o compression=on -o mountpoint=${ZONEBASE}/${ZONENAME} ${ZONEPOOL}/zones/${ZONENAME}
Line 32: Line 38:
set zonepath=${ZONEBASE}/${ZONENAME}
set zonepath=${ZONEBASE}/${ZONENAME}
add dedicated-cpu
add dedicated-cpu
set ncpus=5-6
set ncpus=${NUMBER_OF_CPUS}
end
end
set scheduling-class=FSS
set scheduling-class=FSS
set max-shm-memory=30G
set max-shm-memory=${MAX-SHM-MEMORY}
verify
verify
commit
commit
Line 42: Line 48:
zoneadm -z ${ZONENAME} install
zoneadm -z ${ZONENAME} install
</source>
</source>
# Enable dynamic pool service to add support for dedicated-cpus
svcadm enable svc:/system/pools/dynamic
zoneadm -z ${ZONENAME} boot

Revision as of 19:06, 5 November 2014

Kategorie:Solaris

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 -

zoneadm -z ${ZONENAME} install
  1. Enable dynamic pool service to add support for dedicated-cpus

svcadm enable svc:/system/pools/dynamic

zoneadm -z ${ZONENAME} boot