Creating and Using Oracle Solaris Kernel Zones

Exit Print View

Updated: December 2014
 
 

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.

The physical memory assigned to a kernel zone is allocated in its entirety when it is configured. The memory allocated is only for the exclusive use of the kernel zone. For example, once a kernel zone is booted, all of the memory as specified in the capped-memory resource appears to be in use to the host operating system.

On an x86 system, the capped-memory resource must be set in increments of 2 megabytes (MB).

On a SPARC system, the capped-memory resource must be set in increments of 256 megabytes (MB).

The zone allocates the capped-memory resource when the zone boots. This amount remains fixed while the zone is running.

See Chapter 1, How to Plan and Configure Non-Global Zones, in Creating and Using Oracle Solaris Zones for general information on how to set the capped-memory zone resource.

If kernel zone memory size is increased prior to installation, you must also increase the kernel zone root disk size to account for the larger swap and dump devices. If a kernel zone does not have a disk explicitly added, a zvol is created and used as the root disk. By default, the zvol is 16GB in size. If a different root disk size is required, use the zoneadm install –x install-size command to modify the disk size. For example, to specify a 32GB root disk size on the kernel zone, kzone1:

global# zoneadm -z kzone1 install -x install-size=32G

For additional information on setting the capped-memory zone resource, see Chapter 1, How to Plan and Configure Non-Global Zones, in Creating and Using Oracle Solaris Zones . For information on modifying the disk size using the zoneadm command, see the zoneadm(1M) man page.

Example 1-3  Setting the capped-memory Resource on a SPARC System

This example shows how to set the capped-memory resource on a SPARC system.

global# zonecfg -z kzone1
zonecfg:kzone1> select capped-memory
zonecfg:kzone1:capped-memory> set physical=2048m
zonecfg:kzone1:capped-memory> end
zonecfg:kzone1> exit
Example 1-4  Setting the capped-memory Resource on an x86 System

This example shows how to set the capped-memory resource on an x86 system.

global# zonecfg -z kzone1
global# zonecfg -z kzone1
zonecfg:kzone1> select capped-memory

zonecfg:kzone1:capped-memory> set physical=16g
zonecfg:kzone1:capped-memory> end
zonecfg:kzone1> exit