1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
|
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH RCAPD 1M "Dec 19, 2006"
.SH NAME
rcapd \- resource cap enforcement daemon
.SH SYNOPSIS
.LP
.nf
\fBrcapd\fR [\fB-d\fR]
.fi
.SH DESCRIPTION
.sp
.LP
The \fBrcapd\fR daemon enforces resource caps on collections of processes.
Per-project and per-zone physical memory caps are supported. For information
about projects, see \fBproject\fR(4). For zones information, see \fBzones\fR(5)
.sp
.LP
When the resident set size (RSS) of a collection of processes exceeds its cap,
\fBrcapd\fR takes action and reduces the RSS of the collection.
.sp
.LP
The virtual memory system divides physical memory into segments known as pages.
To read data from a file into memory, the virtual memory system reads in
individual pages. To reduce resource consumption, the daemon can page out, or
relocate, infrequently used pages to an area outside of physical memory.
.sp
.LP
In the \fBproject\fR file, caps are defined for projects that have positive
values for the following project attribute:
.sp
.ne 2
.na
\fB\fBrcap.max-rss\fR\fR
.ad
.RS 16n
The total amount of physical memory, in bytes, that is available to the
project's member processes
.RE
.sp
.LP
See \fBproject\fR(4) for a description of project attributes.
.sp
.LP
For a system with one or more zones, you can dynamically set the
\fBrcap.max-rss\fR value for a zone with \fBrcapadm\fR(1M). To set a persistent
cap on memory usage within a zone, you use \fBzonecfg\fR(1M).
.sp
.LP
You configure \fBrcapd\fR through the use of \fBrcapadm\fR(1M). The daemon can
be monitored with \fBrcapstat\fR(1). Configuration changes are incorporated
into \fBrcapd\fR by sending it \fBSIGHUP\fR (see \fBkill\fR(1)), or according
to the configuration interval (see \fBrcapadm\fR(1M)).
.SH OPTIONS
.sp
.LP
The following option is supported:
.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.RS 6n
Enable debug mode. Messages are displayed on the invoking user's terminal.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fRSetting Resident Set Size Cap Attribute
.sp
.LP
The following line in the \fB/etc/project\fR database sets an RSS cap of
1073741824 bytes for a project named \fBfoo\fR.
.sp
.in +2
.nf
foo:100::foo,root::rcap.max-rss=10737418240
.fi
.in -2
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB0\fR
.ad
.RS 5n
Successful completion.
.RE
.sp
.ne 2
.na
\fB1\fR
.ad
.RS 5n
An error occurred.
.RE
.sp
.ne 2
.na
\fB2\fR
.ad
.RS 5n
Invalid command-line options were specified.
.RE
.SH FILES
.sp
.ne 2
.na
\fB\fB/etc/project\fR\fR
.ad
.RS 16n
Project database.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Evolving
.TE
.SH SEE ALSO
.sp
.LP
\fBrcapstat\fR(1), \fBsvcs\fR(1), \fBrcapadm\fR(1M), \fBzonecfg\fR(1M),
\fBsvcadm\fR(1M), \fBproject\fR(4), \fBattributes\fR(5), \fBsmf\fR(5),
\fBzones\fR(5)
.sp
.LP
"Physical Memory Control Using the Resource Capping Daemon" in \fISystem
Administration Guide: Solaris Containers-Resource Management, and Solaris
Zones\fR
.SH NOTES
.sp
.LP
If killed with \fBSIGKILL\fR, \fBrcapd\fR can leave processes in a stopped
state. Use \fBSIGTERM\fR to cause \fBrcapd\fR to terminate properly.
.sp
.LP
A collection's RSS can exceed its cap for some time before the cap is enforced,
even if sufficient pageable memory is available. This period of time can be
reduced by shortening the RSS sampling interval with \fBrcapadm\fR.
.sp
.LP
The \fBrcapd\fR service is managed by the service management facility,
\fBsmf\fR(5), under the service identifier:
.sp
.in +2
.nf
svc:/system/rcap:default
.fi
.in -2
.sp
.sp
.LP
Administrative actions on this service, such as enabling, disabling, or
requesting restart, can be performed using \fBsvcadm\fR(1M). The service's
status can be queried using the \fBsvcs\fR(1) command.
|