By default, a kernel zone is given four virtual CPUs upon creation. You can change the number of virtual CPUs by using any of the following methods:
Adding and modifying the dedicated-cpu resource
Adding and modifying the virtual-cpu resource
Adding CPUs from an anet locality group
For best performance, configure a dedicated-cpu resource. By setting this value, you tell the kernel zone to run only on those selected CPUs. No other processes on the system can run on the CPUs that are dedicated to the kernel zone.
You can assign the CPU value in terms of available cores or processors. Use psrinfo -vp to obtain processor information about the system. For example, the following psrinfo -vp output shows that there are six available cores on the system global:
global$ psrinfo -vp The physical processor has 6 cores and 48 virtual processors (0-47) The core has 8 virtual processors (0-7) The core has 8 virtual processors (8-15) The core has 8 virtual processors (16-23) The core has 8 virtual processors (24-31) The core has 8 virtual processors (32-39) The core has 8 virtual processors (40-47) SPARC-T4 (chipid 0, clock 2998 MHz)
This example shows how to verify that no CPUs are allocated or dedicated to kzone1, and then allocates them. It assumes that kzone1 is on the global system that is running a SPARC T4 with six cores.
global$ pfbash zonecfg -z kzone1 zonecfg:kzone1> info dedicated-cpu zonecfg:kzone1> add dedicated-cpu zonecfg:kzone1:dedicated-cpu> set cpus=8-15 zonecfg:kzone1:dedicated-cpu> end zonecfg:kzone1> info dedicated-cpu cpus: 8-15 zonecfg:kzone1:dedicated-cpu> end zonecfg:kzone1> exit
For more information, see dedicated-cpu Resource Type in Oracle Solaris Zones Configuration Resources.
The virtual-cpu resource type specifies the number of virtualized CPUs visible to the kernel zone. On the host system, virtualized CPUs share CPU time with other zones. Setting a virtual-cpu resource is beneficial for consolidation, but can affect system performance. For more information and examples, see virtual-cpu Resource Type (solaris-kz Only) in Oracle Solaris Zones Configuration Resources.
You can specify CPUs from a locality group. Specifying CPUs from a locality group can improve network performance if the locality group is the same as the underlying network device.
For more information about working with locality groups, review the following: