Chapter 17
Non-Global Zone Configuration (Overview)
This chapter provides an introduction to non-global zone configuration.
The following topics are covered in this chapter:
After you have learned about zone configuration, go to Chapter 18, Planning and Configuring Non-Global Zones (Tasks) to configure non-global zones for installation on your system.
For information about lx branded zone configuration, see Chapter 30, Planning the lx Branded Zone Configuration (Overview) and Chapter 31, Configuring the lx Branded Zone (Tasks).
About Resources in Zones
A zone that includes resource management features is called a container. Resources that can be controlled in a container include the following:
Resource pools or assigned CPUs, which are used for partitioning machine resources.
Resource controls, which provide a mechanism for the constraint of system resources.
Scheduling class, which enables you to control the allocation of available CPU resources among projects, based on their importance. This importance is expressed by the number of shares of CPU resources that you assign to each workload.
Pre-Installation Configuration Process
Before you can install a non-global zone and use it on your system, the zone must be configured.
The zonecfg command is used to create the configuration and to determine whether the specified resources and properties are valid on a hypothetical system. The check performed by zonecfg for a given configuration verifies the following:
Ensures that a zone path is specified
Ensures that all of the required properties for each resource are specified
For more information about the zonecfg command, see the zonecfg(1M) man page.
Zone Components
This section covers the required and optional zone components that can be configured. Additional information is provided in Zone Configuration Data.
Zone Name and Path
You must choose a name and a path for your zone.
Zone Autoboot
The autoboot property setting determines whether the zone is automatically booted when the global zone is booted. The zones service, svc:/system/zones:default must also be enabled.
Resource Pool Association
If you have configured resource pools on your system as described in Chapter 13, Creating and Administering Resource Pools (Tasks), you can use the pool property to associate the zone with one of the resource pools when you configure the zone.
If you do not have resource pools configured, you can still specify that a subset of the system's processors be dedicated to a non-global zone while it is running by using the dedicated-cpu resource. The system will dynamically create a temporary pool for use while the zone is running.
Note - The dedicated-cpu resource is incompatible with the pool property.
dedicated-cpu Resource
The dedicated-cpu resource specifies that a subset of the system's processors should be dedicated to a non-global zone while it is running. When the zone boots, the system will dynamically create a temporary pool for use while the zone is running.
The dedicated-cpu resource sets limits for ncpus, and optionally, importance.
ncpus | Specify the number of CPUs or specify a range, such as 2-4 CPUs. If you specify a range, also do the following:
|
importance | If you are using a CPU range, also set the importance property, The importance property, which is optional, defines the relative importance of the pool. This property is only needed when you specify a range for ncpus and are using dynamic resource pools managed by poold. If poold is not running, then importance is ignored. If poold is running and importance is not set, importance defaults to 1. For more information, see pool.importance Property Constraint. |
Note - The cpu-shares rctl and the dedicated-cpu resource are incompatible.
Scheduling Class
You can use the fair share scheduler (FSS) to control the allocation of available CPU resources among projects, based on their importance. This importance is expressed by the number of shares of CPU resources that you assign to each workload. By using the FSS, you can set shares on projects within the zone even if you don't set cpu-shares.
The scheduling class for a non-global zone is set to the scheduling class for the system by default. When you set the cpu-shares property, to get the full benefit of the fair share scheduler (FSS), you should also set FSS to be the default system scheduling class with the dispadmin command. That way, processes in the global zone or in other zones that do not have the scheduler set to FSS by some other method use the FSS by default. The following actions set the scheduling class for a zone:
You can use the scheduling-class property in zonecfg to set the scheduling class for the zone.
You can set the scheduling class for a zone through the resource pools facility. If the zone is associated with a pool that has its pool.scheduler property set to a valid scheduling class, then processes running in the zone run in that scheduling class by default. See Introduction to Resource Pools and How to Associate a Pool With a Scheduling Class.
If the cpu-shares rctl is set and FSS has not been set as the scheduling class for the zone through another action, zoneadmd sets the scheduling class to FSS when the zone boots.
Note that you can use the priocntl described in the priocntl(1) man page to move running processes into a different scheduling class without changing the default scheduling class and rebooting.