Managing Kernel Zone Memory

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 MBs.

  • On an x86 based system, set the resource in increments of 2 MBs.

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.

Note:

On Fujitsu SPARC M12 servers, Fujitsu M10 servers, or SPARC M10 servers, a kernel zone created with the SYSsolaris-kz-minimal template might not be bootable because of insufficient memory. If the kernel zone cannot be booted, increase the memory assigned to the kernel zone through the physical property of the capped-memory resource.

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 2-2 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 ; exit

Example 2-3 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