Step-by-step instructions for how to install Oracle Database 12c on Oracle Solaris 11 in a non-global Oracle Solaris Zone, which provides several advantages: database isolation, simplified resource control, and the ability to reduce licensing costs.
When installing Oracle Database 12c for production applications, solution architects strive for the highest levels of performance, scalability, availability, and manageability. That's why Oracle takes a comprehensive approach—integrating, optimizing, and extensively testing Oracle Database with Oracle Solaris and Oracle's SPARC servers—because doing that optimizes demanding production database deployments.
Oracle strategically invests in Oracle Solaris for database use, enhancing and enriching the operating system to deliver leading-edge performance for both online transaction processing (OLTP) and decision support system (DSS) workloads. Oracle conducts extensive integration testing and performance analysis to engineer optimizations in Oracle Solaris 11 that enable exceptional database performance and scalability. For example, joint engineering teams focus on enhancements that improve service levels, such as shared memory resizing without downtime or fast initialization to make databases available quickly. The white paper "Oracle Solaris 11—The Optimal Platform for Deploying Oracle Database" gives many specifics about how Oracle Solaris has been optimized for Oracle Database workloads.
Oracle Solaris includes built-in features that can directly benefit database deployments: Oracle Solaris Zones for no-cost virtualization, Predictive Self Healing for continuous availability, DTrace for application observability, ZFS for next-generation volume and file system management, and fine-grained user and process rights for enhanced security. The Oracle Solaris 11.2 release adds new capabilities (such as Kernel Zones and Unified Archives) and integrates a full OpenStack distribution (see www.oracle.com/solaris).
Deploying Oracle Database on Oracle Solaris 11 has clear advantages for production database applications. This article will show just how easy it is to install Oracle Database on the Oracle Solaris 11.2 release. Specifically it gives five major steps for installing a single Oracle Database 12c instance in a non-global Oracle Solaris Zone, a lightweight built-in virtual environment that encapsulates the database instance. Generally the procedures used here reflect best practices for database installation.
While you can install Oracle Database in either a global or non-global Oracle Solaris Zone, in this article, we'll install the database in a non-global zone. Using a non-global zone for database deployment offers these distinct advantages:
Isolation. Oracle Solaris Zones isolate database instances with respect to fault, operation, network, and security management, and for resource allocation control. Zones create totally sandboxed environments for running Oracle Database instances. Database processes that execute in one zone have no access to database processes running in another zone. This capability simplifies database consolidation, allowing multiple instances and versions to coexist safely on a single physical machine.
Independently managed and autonomous environments. Because Oracle Solaris Zones are discrete and independent environments, a non-global zone can be booted, patched, and shut down independently. A failure or reboot of one zone has no impact on other zones (unless, of course, a failure is due to a shared component). A zone reboot is faster than a full server reboot (seconds versus minutes), so a database in a rebooted zone is available more quickly.
Distinctive identity. If a database instance requires a separate identity (for example, an independent host name and IP address), a zone is a uniquely identifiable virtual environment that can have virtual network interfaces defined. Administrators can also apply networking resource controls to zones, aligning network bandwidth consumption with service level targets.
Easy database instance migration. Oracle Solaris Zones simplify database instance migration from one virtual environment to another. When a database needs more CPU power, for example, it's possible to add CPUs to an Oracle Solaris Zone and reboot the zone. If a database needs more compute capacity than what's available in the physical server, the zone can be migrated to a zone on a larger server.
Hard partitioning. Assigning a resource pool or capping CPU cores can configure Oracle Solaris Zones as hard partitions for Oracle Database licensing purposes. This can potentially lower database licensing costs. The following steps give an example of how to implement hard partitioning in conjunction with zones.
Step 1: Install Oracle Solaris 11 on a Server
The first step is to install the Oracle Solaris 11 operating system on a server. Images for Oracle Solaris 11 are freely available for download from the Oracle Technology Network. Consult the installation documentation for detailed directions. The installation can use any of the Oracle Solaris server package groups, such as solaris-minimal-server and solaris-small-server, because we will resolve software package dependencies in a later step. (The solaris-minimal-server package is often installed for database deployments because it creates a minimized configuration.)
During installation there is a system configuration process that's required to set up host parameters—the host name, language, time zone, networking (IP address, netmask, router, name service, and so on), and the default accounts and passwords. Before you start this configuration process, you might need to consult your system or network administrator to obtain a host name and network information for the server (and the zone that you'll install subsequently). The summary screen in Figure 1 shows the configuration settings for the global zone of the Oracle Solaris 11 server we'll call s11-server.
When the Oracle Solaris installation is complete, log in as the user that was configured during the installation process and assume the privileged role of root. Then create a directory that we'll use when configuring the non-global zone in the next step:
root@s11-server:~# mkdir /u01
Step 2: Configure a Non-global Oracle Solaris Zone
Configuring a non-global zone on the new Oracle Solaris 11 server is relatively easy—we'll set up configuration parameters for the zone, install it, and then boot it to obtain a fully functional virtual server in which we'll install the database. (Note that we could install the database in the global zone, but we want to take advantage of the isolation and capping advantages of using a non-global zone virtual environment.)
There are a few zone configuration requirements to consider:
Make sure there's at least 6.4 GB of physical disk space for the zone's file system.
Obtain an IP address and a host name for the non-global zone in which the database will be installed. Again, you might need to consult a system or network administrator to obtain these.
Determine the quantity of virtual CPUs (vCPUs) to be reserved for the zone. Oracle recognizes capped Oracle Solaris Zones as licensable entities called hard partitions. There are several ways to implement CPU hard partitioning to comply with Oracle Database licensing policies (see the paper "Hard Partitioning With Oracle Solaris Zones"), including the following:
- Using the capped-cpu property for the zone configuration command (zonecfg)
- Using the dedicated-cpu property for zonecfg
- Using a resource pool with assigned hardware threads (vCPUs) and assigning the pool to a zone (as in the example here)
On a SPARC server, it's recommended to configure a processor set, associate the processor set with a resource pool, and assign vCPUs to the processor set:
# poolcfg -c 'create pset dbPset_set(uint pset.min=8;uint pset.max=8)'
# poolcfg -c 'create pool dbPool'
# poolcfg -c 'associate pool dbPool(pset dbPset)'
# poolcfg -c 'transfer to pset dbPset(cpu 0;cpu 1; cpu 2; cpu 3; cpu 4; cpu 5; cpu 6; cpu 7)'
# pooladm -c
From a performance standpoint, allocating a full core to each database instance helps to optimize database performance because it gives database processes exclusive access to the pipelines, cache, and other resources within an individual core. Small workloads can use a single core, if practical, while you can assign multiple cores to larger workloads. (The number of cores will depend on your specific requirements.) When we configure the zone, we assign the resource pool to the zone.
We start by executing zonecfg with the name of the zone we want to create: si-zone, as shown in Figure 2. This is the non-global zone in which we'll install the database.