| Solaris |
|
|
Starting with Solaris Express Community Edition build 56, improved zonecfg procedures for creating containers are available. It is easier to leverage the resource management capabilities provided by the system when you create a zone. The zonecfg command can now be used to configure temporary pools, memory limits, the default scheduling class for the zone, and rctl aliases. The resource configuration you specify is automatically created for you when the zone boots. You no longer have to perform any manual steps related to setting up resource management.
The zonecfg command can also be used to configure the resource management settings for the global zone.
rcapd has been enhanced so that it can now cap a zone's physical memory consumption. You can use rcapd from the global zone to regulate physical memory consumption in non-global zones. Both rcapd and prstat have been enhanced to determine an accurate value for RSS.
The new functionality is available for both Solaris (native) zones and Linux branded zones.
zonecfg can now be used in the global zone to persistently specify resource management settings for the global zone.
You can now configure zone-wide controls using the set global_property_name subcommand of zonefig instead of using the rctl resource. The following zone-wide resource controls are available.
zonecfg:my-zone> **set cpu-shares=5**
You can use the fair share scheduler (FSS) to control the allocation of available CPU resources among zones, based on their importance.
When you explicitly set the new cpu-shares property, the fair share scheduler (FSS) will be used as the scheduling class for that zone. However, the preferred way to use FSS is to set FSS to be the system default scheduling class with the dispadmin command, so all zones will benefit from getting a fair share of the system CPU resources. If cpu-shares is not set for a zone, the zone will use the system default scheduling class. The following actions set the scheduling class for a zone:
Set the scheduling class to FSS.
zonecfg:my-zone> **set scheduling-class=FSS**
The capped-memory resource sets limits for physical, swap, and locked memory. Each limit is optional, but at least one must be set.
Specify the memory limits for the zone my-zone. Each limit is optional, but at least one must be set.
zonecfg:my-zone> **add capped-memory** zonecfg:my-zone:capped-memory> **set physical=50m** zonecfg:my-zone:capped-memory> **set swap=100m** zonecfg:my-zone:capped-memory> **set locked=30m** zonecfg:my-zone:capped-memory> **end**
You can specify that a subset of the system's processors be dedicated to a non-global zone while it is running by using the new 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 cpu-shares rctl and the pool property.
The dedicated-cpu resource sets limits for number of CPUs, and optionally, the relative importance of the pool.
The following example specifies a CPU range for use by the zone my-zone.
zonecfg:my-zone> **add dedicated-cpu** zonecfg:my-zone:dedicated-cpu> **set ncpus=1-3** zonecfg:my-zone:dedicated-cpu> **set importance=2** zonecfg:my-zone:dedicated-cpu> **end**
If you specify a range because you want dynamic resource pool behavior, also do the following:
This new subcommand is used to clear the value for optional settings. Required settings cannot be cleared. However, some required settings can be changed by assigning a new value.
zonecfg:my-zone> clear pool
For more information, see System Administration Guide: Solaris ContainersResource Management and Solaris Zones.
Copyright 2007 Sun Microsystems, Inc.
Terms of Use
|
Privacy
|
Trademarks
|
Copyright Policy
|
Site Guidelines
|
Site Map
|
Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.
© 2012, Oracle Corporation and/or its affiliates.