Information Technology Reference
In-Depth Information
GZ# zonecfg -z web
zonecfg:web> set max-lwps=300
zonecfg:web> exit
GZ# zoneadm -z web reboot
This parameter should not be set so low that it detracts from normal applica-
tion operation. Instead, an accurate baseline for the number of LWPs for a given
Container should be determined and this value then set at an appropriate level.
This resource constraint can also be dynamically changed for a running
Container:
GZ# prctl -n zone.max-lwps -v 500 -t privileged -r -e deny -i zone web
Unless you trust the users of the Container and their applications, we encourage
the use of this cap to minimize the impact of fork-bombs.
The number of LWPs used by a Container can be monitored using the following
command:
GZ# prstat -LZ
[...]
ZONEID NLWP SWAP RSS MEMORY TIME CPU ZONE
0 248 468M 521M 8.6% 0:14:18 0.0% global
37 108 76M 61M 1.0% 0:00:00 0.0% web
Total: 122 processes, 356 lwps, load averages: 0.00, 0.00, 0.01
[...]
In this example, the Web Container currently has 108 LWPs. This value can and
will change as processes are created or exit. It should be inspected over a period of
time to establish a more reliable baseline and updated when the software, require-
ments, or workload change.
To maximize the benefit of max-lwps , you should also use a CPU control—for
example, FSS or resource pools. Implementation of such a control will slow the
rate of LWP creation. Sufficient CPU power must be available to global zone pro-
cesses so that the platform administrator can fix the problem.
6.2.2.4 Container Dashboard
Because it can be cumbersome to use the set of Solaris commands needed to moni-
tor all resource usage of Containers, one of the authors of this topic (Victor) wrote
an open-source tool that displays current usage and controls for the most com-
monly controlled resources. An example of its use is shown here.
 
Search WWH ::




Custom Search