Limiting The Physical Main Memory Consumption Of A Project; Implementing Memory Resource Management For Zones - 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.10. Limiting the physical main memory consumption of a project

[dd] To limit the physical main memory of a project, the resource capping daemon r ca pd ( 1M ) can
be used. If the resident set size (RSS) of a project exceeds the capping target (rc ap . ma x- r ss in
bytes), rc ap d reduces the RSS and swaps used memory pages to the paging device. r ca p d is
configured by r c a p a d m ( 1 M ) and monitored with r c ap st a t( 1) . The rcapd can be used in
zones in connection with projects and can limit the physical main memory consumption of a project
within a zone.
It is recommended to limit virtual memory (called swap) first and then considering a limit for physical
main memory, since this limit is a hard limit and is noticed more quickly in case of a misconfiguration
(f.e. 20 GB cache for the database instead of 2 GB). In such a case, the sole limitation of physical
memory consumption would have an extreme effect on the performance of this zone and potentially
affect other zones as well.

5.5.11. Implementing memory resource management for zones

[dd] According to
4.6.3 Limiting memory resources
zone can be limited starting with Solaris 10 8/07. The configuration for this takes place in the zone
configuration.
global # zonecfg -z zone1
zonecfg:zone1> add capped-memory
zonecfg:zone1:capped-memory> set physical=50m
zonecfg:zone1:capped-memory> set swap=200m
zonecfg:zone1:capped-memory> set locked=20m
zonecfg:zone1:capped-memory> end
zonecfg:zone1> commit
zonecfg:zone1> exit
The configuration of capping parameters for a zone and restart of a zone leads to the automatic start-
up of the rc ap d daemon in the global zone, which undertakes resource management. The activity
of r ca pd can be observed with r c a p s t a t -z.
global # rcapstat -z
id zone
21 zone1
21 zone1
21 zone1
21 zone1
id zone
21 zone1
21 zone1
id zone
22 zone1
22 zone1
22 zone1
Memory capping settings with z o n e c f g are static. If changes to the settings during the zone's
runtime are required, they can be carried out using the command rc ap a dm without rebooting the
zone.
rcapadm -z zone1 -m 40m
, the virtual, physical and locked main memory of a
nproc
vm
rss
29
42M
57M
29
42M
57M
-
26M
29M
-
26M
29M
nproc
vm
rss
-
18M
22M
-
17M
18M
nproc
vm
rss
29
42M
57M
29
42M
57M
-
42M
43M
Effective: 30/11/2009
cap
at avgat
50M
12M
0K 8584K
50M 6752K
0K 6712K
50M
0K
0K
50M
0K
0K
cap
at avgat
50M
0K
0K
50M
0K
0K
cap
at avgat
50M
12M
0K 8672K
50M
10M
0K 7776K
50M
0K
0K
pg avgpg
0K
0K
0K
0K
0K
0K
pg avgpg
0K
0K
0K
0K
pg avgpg
0K
0K
0K
0K
110

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?

Table of Contents