Best Practices for Running Oracle Databases in Solaris Containers

Best Practices for Running Oracle Databases in Solaris Containers” now available on Sun/BluePrints site. This document describes Solaris Containers features for using with Oracle databases. You will learn how to setup Container and assign resources to it (scheduler, CPU and memory capping). It tells you which privilege gives you ability to use Dynamic Intimate Shared Memory (DISM) with Oracle. You may find how to setup Container so it will have it's own IP stack. Mounting UFS and ZFS filesystems, devices in Containers and System V Resource Controls also covered.


Summary

Solaris Containers provide a very flexible and secure method of managing multiple applications on a single Solaris OS instance. Solaris Containers use Solaris Zones software partitioning technology to virtualize the operating system and provide isolated and secure runtime environments for applications. Solaris Resource Manager can be used to control resource usage, such as capping memory and CPU usage,helping to ensure workloads get required system resources. By utilizing Solaris containers, multiple applications, or even multiple instances of the same application, can securely coexist on a single system, providing potential server consolidation savings.

Oracle 9i R2 and 10g R2 databases have been certified to run in a Solaris container. This paper provides step-by-step directions for creating a non-global zone in a Solaris container that is appropriate for running a non-RAC Oracle database. In addition, it describes special considerations that apply when running an Oracle database within a Solaris container.

Comments:

Roma oracle RDBMS is not supported in LOCAL ZONES by Oracle

Posted by Sergey Khochay on March 30, 2009 at 03:34 AM PDT #

Sergey, Oracle in Container supported since about 2005.

Posted by Roman Ivanov on March 30, 2009 at 06:40 AM PDT #

Gui Fritz.
Cool blog.

Posted by asm oracle on September 10, 2009 at 10:46 PM PDT #

Hi I am new to the solaris containers/zone environment. I have been working with oracle databases for a long time though.

I have a server called gpsapp02 with 8 CPu's and a total of 400Gb of data and a total of 8GB of RAM.

I intend to create 4 containers on this server all with their own IP addresses. Only one of these i intend to put oracle on to. I have tried reading your document and indeed created a zone called oracle-zone. I am having some issues with the process though. I wish the oracle-zone to only see 100Gb of data from the zfs filesystem, have 2 CPU's and 2GB of ram. I will show you what I have below but if you can let me know the best way to do this I would appreciate it. I tried creating the zone called oracle-zone but I had issues with the network card and also the zone had access to the full zfs filesystem.

-- global zone df -h

Filesystem size used avail capacity Mounted on
/dev/dsk/c1t0d0s0 5.1G 3.4G 1.7G 68% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 5.4G 596K 5.4G 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap2.so.1
5.1G 3.4G 1.7G 68% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 5.4G 128K 5.4G 1% /tmp
swap 5.4G 36K 5.4G 1% /var/run
zfspool 398G 492M 397G 1% /zfspool

-- pooladm

system default
string system.comment
int system.version 1
boolean system.bind-default true
string system.poold.objectives wt-load

pool pool_default
int pool.sys_id 0
boolean pool.active true
boolean pool.default true
int pool.importance 1
string pool.comment
pset pset_default

pool oracle-pool
int pool.sys_id 2
boolean pool.active true
boolean pool.default false
int pool.importance 1
string pool.comment
pset oracle-pset

pset pset_default
int pset.sys_id -1
boolean pset.default true
uint pset.min 1
uint pset.max 65536
string pset.units population
uint pset.load 3
uint pset.size 5
string pset.comment

cpu
int cpu.sys_id 7
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 4
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 6
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 3
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 5
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 1
string cpu.comment
string cpu.status on-line

cpu
int cpu.sys_id 0
string cpu.comment
string cpu.status on-line

pset oracle-pset
int pset.sys_id 2
boolean pset.default false
uint pset.min 1
uint pset.max 1
string pset.units population
uint pset.load 0
uint pset.size 1
string pset.comment

cpu
int cpu.sys_id 2
string cpu.comment
string cpu.status on-line

-- zpool list

NAME SIZE USED AVAIL CAP HEALTH ALTROOT
zfspool 404G 493M 404G 0% ONLINE -

Posted by Tom on October 27, 2009 at 06:00 PM PDT #

Tom, lets try to broke the problem into pieces:

1. ZFS should be prepared like this.
# zfs create zfspool/OracleZone
# zfs set quota=100G zfspool/OracleZone

2. assign CPU, change oracle pool values of min and max to 2 so it will look like
pset oracle-pset
uint pset.min 2
uint pset.max 2

3. what the problem with network?

4. Memory change oracle-zone
zonecfg:oracle-zone> add capped-memory
zonecfg:oracle-zone:capped-memory> set physical=2G
zonecfg:oracle-zone:capped-memory> end

Posted by Roman Ivanov on October 27, 2009 at 10:25 PM PDT #

Thanks Roman, I appreciate the quick response and good advise.

I have configured the zone with your help. I was having issues with the network card as I was confused about using a NET_PHYSICAL for the network card when we were creating a vrtual interface. But all good now.
Now that I have configured the oracle-zone with 2GB of capped memory, 2 cpu's and 100GB of disk space.

What other recommendations would suggest for running an oracle database on this zone?

zonecfg -z oracle-zone info
zonename: oracle-zone
zonepath: /zfspool/OracleZone
brand: native
autoboot: true
bootargs:
pool: oracle-pool
limitpriv:
scheduling-class:
ip-type: shared
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
net:
address: xxx.xxx.xxx.xxx (ip address removed)
physical: nge1
defrouter not specified
capped-memory:
physical: 2G

another quick question when adding solaris patches should I be installing patched on only the global zone or both global and local zone?

Posted by Tom on October 28, 2009 at 06:51 PM PDT #

Tom, good to hear it works now.

patching global zone will also patch your oracle-zone.

I would suggest reading
http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide
about limiting ARC cache and zfs record size.
http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide

Posted by Roman Ivanov on October 28, 2009 at 09:28 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Roman (pomah) Ivanov, ISV Engineering. Tips how to run Oracle best on Sun. Performance monitoring and tuning for system administrators. OpenSolaris user experience.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today