sun.com docs.sun.com My Sun Worldwide Sites

Previous Previous     Contents     Index     Next Next

Chapter 11

Administering the Resource Capping Daemon (Tasks)

This chapter contains procedures for configuring and using the resource capping daemon rcapd.

For an overview of rcapd, see Chapter 10, Physical Memory Control Using the Resource Capping Daemon (Overview).

Setting the Resident Set Size Cap

Define a physical memory resource resident set size (RSS) cap for a project by adding an rcap.max-rss attribute to the project database entry.

ProcedureHow to Add an rcap.max-rss Attribute for a Project

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Add this attribute to the /etc/project file:

    rcap.max-rss=value

Example 11-1   RSS Project Cap

The following line in the /etc/project file sets an RSS cap of 10 gigabytes for a project named db.

db:100::db,root::rcap.max-rss=10737418240

Note that the system might round the specified cap value to a page size.

ProcedureHow to Use the projmod Command to Add an rcap.max-rss Attribute for a Project

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Set an rcap.max-rss attribute of 10 gigabytes in the /etc/project file, in this case for a project named db.

    # projmod -a -K rcap.max-rss=10GB db

    The /etc/project file then contains the line:

    db:100::db,root::rcap.max-rss=10737418240

Configuring and Using the Resource Capping Daemon (Task Map)

Task

Description

For Instructions

Set the memory cap enforcement threshold.

Configure a cap that will be enforced when the physical memory available to processes is low.

How to Set the Memory Cap Enforcement Threshold 

Set the operation interval.

The interval is applied to the periodic operations performed by the resource capping daemon.

How to Set Operation Intervals 

Enable resource capping.

Activate resource capping on your system.

How to Enable Resource Capping 

Disable resource capping.

Deactivate resource capping on your system.

How to Disable Resource Capping 

Report cap and project information.

View example commands for producing reports.

Reporting Cap and Project Information 

Monitor a project's resident set size.

Produce a report on the resident set size of a project.

Monitoring the RSS of a Project 

Determine a project's working set size.

Produce a report on the working set size of a project.

Determining the Working Set Size of a Project 

Report on memory utilization and memory caps.

Print a memory utilization and cap enforcement line at the end of the report for each interval.

Reporting Memory Utilization and the Memory Cap Enforcement Threshold 

Administering the Resource Capping Daemon With rcapadm

This section contains procedures for configuring the resource capping daemon with rcapadm. See rcapd Configuration and the rcapadm(1M) man page for more information.

If used without arguments, rcapadm displays the current status of the resource capping daemon if it has been configured.

ProcedureHow to Set the Memory Cap Enforcement Threshold

Caps can be configured so that they will not be enforced until the physical memory available to processes is low. See Memory Cap Enforcement Threshold for more information.

The minimum (and default) value is 0, which means that memory caps are always enforced. To set a different minimum, follow this procedure.

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Use the -c option of rcapadm to set a different physical memory utilization value for memory cap enforcement.

    # rcapadm -c percent

    percent is in the range 0 to 100. Higher values are less restrictive. A higher value means capped project workloads can execute without having caps enforced until the system's memory utilization exceeds this threshold.

See Also

To display the current physical memory utilization and the cap enforcement threshold, see Reporting Memory Utilization and the Memory Cap Enforcement Threshold.

ProcedureHow to Set Operation Intervals

rcapd Operation Intervals contains information about the intervals for the periodic operations performed by rcapd. To set operation intervals using rcapadm, follow this procedure.

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Use the -i option to set interval values.

    # rcapadm -i interval=value,...,interval=value 


    Note - All interval values are specified in seconds.


ProcedureHow to Enable Resource Capping

There are three ways to enable resource capping on your system. Enabling resource capping also sets the /etc/rcap.conf file with default values.

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Enable the resource capping daemon in one of the following ways:

    • Turn on resource capping using the svcadm command.

      # svcadm enable rcap

    • Enable the resource capping daemon so that it will be started now and also be started each time the system is booted:

      # rcapadm -E

    • Enable the resource capping daemon at boot without starting it now by also specifying the -n option:

      # rcapadm -n -E

ProcedureHow to Disable Resource Capping

There are three ways to disable resource capping on your system.

  1. Become superuser, or assume a role that includes the Process Management profile.

    The System Administrator role includes the Process Management profile. For information on how to create the role and assign the role to a user, see Managing RBAC (Task Map) in System Administration Guide: Security Services.

  2. Disable the resource capping daemon in one of the following ways:

    • Turn off resource capping using the svcadm command.

      # svcadm disable rcap

    • To disable the resource capping daemon so that it will be stopped now and not be started when the system is booted, type:

      # rcapadm -D

    • To disable the resource capping daemon without stopping it, also specify the -n option:

      # rcapadm -n -D


    Tip - Disabling the Resource Capping Daemon Safely


    Use rcapadm -D to safely disable rcapd. If the daemon is killed (see the kill(1) man page), processes might be left in a stopped state and need to be manually restarted. To resume a process running, use the prun command. See the prun(1) man page for more information.

Previous Previous     Contents     Index     Next Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.