Version 3.1-en Solaris 10 Container Guide - 3.1 5. Cookbooks Effective: 30/11/2009
created with poolcfg and pooladm.
5.5.9. Dynamic resource pools for zones
[dd] As already described in 4.6.2.5 Dynamic resource pools , dynamic resource pools can very easily
be used for zones since Solaris 10 8/07. The number of CPUs required is specified in the zone
configuration. If the corresponding zone is started up, a temporary resource pool is created and
assigned to the starting zone. This resource pool will exist for the duration of the zone and will also be
destroyed once the zone is turned off.
CPUs can be specified by a fixed number of CPUs (e.g. set ncpu=10). In this case, this number
must be made available to the zone at the time it starts up and will also remain assigned to it for the
duration of its runtime.
If a CPU range (e.g. set ncpus=10-14) is stated, the minimum number of CPUs must be
available at the time the zone is started up. During the zone's runtime, the poold of the zone
assigns CPUs dynamically depending on demand by the zone and depending on the availability of
CPU in the system. (For poold to run, the service /system/pool/dynamic must be
activated.) If several resource pools compete for available CPU, a decision is made based on
importance as to which resource pool is served preferentially.
global # svcs dynamic
STATE STIME FMRI
online Jan_19 svc:/system/pools/dynamic:default
global # zonecfg -z zone1
zonecfg:zone1> add dedicated-cpu
zonecfg:zone1:dedicated-cpu> help
zonecfg:zone1:dedicated-cpu> set ncpus=10-14
zonecfg:zone1:dedicated-cpu> set importance=30
zonecfg:zone1:dedicated-cpu> end
zonecfg:zone1> commit
zonecfg:zone1> exit
Once the zone is started, poolstat can be used to display the status of available resource pools.
global # poolstat 5
pset
id pool size used load
0 pool_default 32 0.02 0.04
<<State change>>
pset
id pool size used load
0 pool_default 18 0.61 0.05
12 SUNWtmp_zone1 14 0.00 0.03
pset
id pool size used load
0 pool_default 18 0.03 0.07
12 SUNWtmp_zone1 14 1.40 0.08
If during the runtime of a zone, in the absence of automatic influence by poold, a zone is to have
additional CPUs assigned to it, this must be done by using the command poolcfg. However, the
change in the number of CPUs must remain within the specified CPU range.
• Increasing the number of CPUs in a resource pool
poolcfg -dc 'transfer 3 from pset pset_default to SUNWtmp_zone1'
• Reducing the number of CPUs in a resource pool
poolcfg -dc 'transfer 2 from pset SUNWtmp_zone1 to pset_default'
Adjustment of the resource pools with zonecfg is static and is analyzed only when the zone is
started, that is, when the resource pool is created. A change of the CPU range during the runtime of
the zone can be made with poolcfg.
poolcfg -dc 'modify pset SUNWtmp_zone1 (uint pset.min=15;uint
pset.max=20)'
109