Resource Management; Limiting The /Tmp-Size Within A Zone; Limiting The Cpu Usage Of A Zone (Cpu Capping); Resource Pools With Processor Sets - Sun Microsystems SOLARIS 10 Manual

Container guide
Table of Contents

Advertisement

Version 3.1-en
Solaris 10 Container Guide - 3.1 5. Cookbooks

5.5. Resource management

5.5.1. Limiting the /tmp-size within a zone

[dd] In many cases, / t m p is used as t m p f s in swap. This leads to the swap area being shared by
all zones by /tmp in each zone. Although the / tm p areas are visible to each zone itself, global
resources are used. To limit the use of space, /t m p should be mounted in the /e t c/ vf s ta b of
zones with the s i z e option.
swap
-
However, this limitation can be changed by the root administrator of the zone.
Yet, this area is counted as virtual memory of the zone and is therefore also limited by setting
z on ecf g: ad d c a p p e d - m e m o r y : s e t s w ap = < va lu e >.

5.5.2. Limiting the CPU usage of a zone (CPU capping)

[dd] Since Solaris 10 5/08, it is possible to cap the CPU time for a zone. CPU shares can be specified
as potential capping values. Thus, the value 1.5, for example, represents a whole CPU and a half.
With respect to the syntax, care must be taken to specify se t nc p us =1 . 5 (locale=C) or se t
n cp us= 1, 5, depending on the locale setting of the session by the administrator. The setting is
accurate to 1/100 CPUs.
zonecfg:keetonga> add capped-cpu
zonecfg:keetonga:capped-cpu> set ncpus=1.5
zonecfg:keetonga:capped-cpu> end
zonecfg:keetonga> info
capped-cpu:
[ncpus: 1.50]
rctl:
name: zone.cpu-cap
value: (priv=privileged,limit=150,action=deny)
This setting is a hard limit, that is to say, the set CPU capacity cannot be exceeded.

5.5.3. Resource pools with processor sets

[ug] In Solaris (since Solaris 9), CPUs can be portioned out to resource pools. Solaris zones can be
assigned to these resource pools; this allows CPU resources to be separated easily:
With the commands p o o l c f g and p o o l ad m, resource management is activated and the
additional resource pool is created.
With the command p o o l c f g , the processor set (ps e t) is created and assigned to the
resource pool.
With the command z o n e c f g , the attribute po ol of the zone can be changed and the new
resource pool can be set there. This will then be the setting that is valid if the zone is rebooted
without further measures.
With the command p o o l b i n d , the allocation of zones to resource pools can be changed
dynamically. This has no effect on the default setting done with z on ec f g; after a restart of the
zone
the
The processes of a zone that are allocated to a resource pool will then only run on the processors
that belong to the processor set of this resource pool.
If several zones are allocated to a resource pool, the ratio of the CPU time used can be adjusted
between the zones with the fair share scheduler.
The number of CPUs assigned to the processor set is a hard limit and cannot be exceeded by the
processes of the zone
/tmp
tmpfs
setting
from
the
-
yes
size=250m
zone
configuration
Effective: 30/11/2009
is
re-established.
107

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SOLARIS 10 and is the answer not in the manual?

Questions and answers

Table of Contents