'\" 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.