You must allocate a fixed amount of physical RAM to the kernel zone virtual platform. You can define this amount by setting the kernel zone capped-memory resource type's physical property.
The physical memory assigned to a kernel zone is allocated in its entirety when the zone boots. The memory allocated is for the exclusive use of the kernel zone. After a kernel zone is booted, all of the memory specified in the capped-memory resource is unavailable to the host operating system and other zones.
The default CPU and memory configuration for kernel zones is 4 VCPUs and 4 GB of memory, to enable applications to run in the kernel zone. Increase the kernel zone memory size (capped-memory:physical) to manage larger workloads:
On a SPARC based system, set the resource in increments of 256 MB.
On an x86 based system, set the resource in increments of 2 MB.
The capped-memory:pagesize-policy property specifies the policy for allocating page size for the kernel zone's physical memory. By default a kernel zone uses the largest page size available to enable best performance. See About Memory Page Size Policy and Physical Memory for more information.
An additional kernel zone template, SYSsolaris-kz-minimal, provides the minimal supported kernel zone configuration of 1 VCPU and 2 GB of memory.
For detailed information about setting the capped-memory zone resource type, see Capped Memory Guidelines for a solaris-kz Zone in Oracle Solaris Zones Configuration Resources.
If you increase kernel zone memory size prior to installation, you must also increase the kernel zone root disk size to account for the larger swap and dump devices. If you do not explicitly add a disk to a kernel zone, a zvol is created and used as the root disk. By default, the zvol is 16 GB in size. To specify a different root disk size, use the zoneadm install –x install-size command. For example, to specify a 32GB root disk size on the kernel zone kzone1, you would use the following command when you install:
global$ pfbash zoneadm -z kzone1 install -x install-size=32G
For information about modifying the disk size by using the zoneadm command, see the zoneadm(8) man page.Example 6 Setting the capped-memory Resource on a SPARC Based System
This example shows how to specify 2048MB of memory for a kernel zone on a SPARC based system.
global$ pfbash zonecfg -z kzone1 zonecfg:kzone1> select capped-memory zonecfg:kzone1:capped-memory> set physical=2048m zonecfg:kzone1:capped-memory> end ; exitExample 7 Setting the capped-memory Resource on an x86 Based System
This example shows how to specify 16GB of memory for a kernel zone on an x86 based system.
global$ pfbash zonecfg -z kzone1 zonecfg:kzone1> select capped-memory zonecfg:kzone1:capped-memory> set physical=16g zonecfg:kzone1:capped-memory> end ; exit
The pagesize-policy property of the capped-memory resource controls how the system selects a page size for a kernel zone.
The default kernel zone template SYSsolaris-kz sets the pagesize-policy property to largest-available, which is the recommended value for best performance. This setting enables the system to select the appropriate page size to use with the kernel zone's amount of physical memory. The physical memory size must be a multiple of the page size, so the system selects the largest page size that aligns with the amount of physical memory specified for the kernel zone. Booting with pagesize-policy=largest-available always succeeds.
For best performance, set an appropriate amount of physical memory that will enable the largest page size to be selected when pagesize-policy=largest-available is set.
If a kernel zone's pagesize-policy property is cleared or not set, the kernel zone uses the lowest allowable page size required to boot on the particular hardware platform on which it is running. This page size might not be appropriate. The physical property must be set to an amount that is a multiple of the largest page size supported, as shown in Example 8, Setting Physical Memory to Use the Largest Page Size.
If the target system has a smaller page size than the source system.
If the source kernel zone was created in an update of Oracle Solaris 11.4 and the target is an Oracle Solaris release that does not support the pagesize-policy property, such as the initial release of Oracle Solaris 11.3.
The SPARC T5 supports various page sizes, as the following output shows. The largest is 2147483648 bytes or 2GB.
Using 2GB pagesize increments, the capped-memory:physical property is set to 8GB. This value enables the system to use the largest page size when pagesize-policy is set to largest-available.
global$ pfbash pagesize -a 8192 65536 4194304 268435456 2147483648 global$ pfbash zonecfg -z kzone1 zonecfg:kzone1> select capped-memory zonecfg:kzone1:capped-memory> set physical=8G zonecfg:kzone1:capped-memory> info capped-memory: physical: 8G pagesize-policy: largest-available zonecfg:kzone1:capped-memory> end ; exit global$ rebootExample 9 Clearing the pagesize-policy Property Before Migrating a Kernel Zone to an Earlier Oracle Solaris Release
This example shows how to clear the pagesize-policy property to prepare for migrating a kernel zone to an Oracle Solaris release that does not support the property.
global$ pfbash -z kzone1 zonecfg:kzone1> select capped-memory zonecfg:kzone1:capped-memory> clear pagesize-policy zonecfg:kzone1:capped-memory> end zonecfg:kzone1> commit global$ reboot
You can do a trial run of the migration by using the zoneadm migrate -n command to see if the pagesize-policy needs to be cleared. For more information, see About the zoneadm migrate Command.
For more information about setting the physical and pagesize-policy properties, see Capped Memory Guidelines for a solaris-kz Zone in Oracle Solaris Zones Configuration Resources.