Skip Navigation Links
Exit Print View
| Oracle Solaris Cluster System Administration Guide Oracle Solaris Cluster 4.1

Search Scope:

- This Document
- Entire Library

## Configuring CPU Control

This section includes the following procedures:

- How to Control CPU Usage in a Global-Cluster Node

## How to Control CPU Usage in a Global-Cluster Node

Perform this procedure to assign CPU shares to a resource group that will be executed in a global–cluster node.

If a resource group is assigned CPU shares, Oracle Solaris Cluster software performs the following tasks when it starts a resource of the resource group in a global–cluster node:

- Augments the number of CPU shares assigned to the node (`zone.`cpu-shares) with the specified number of CPU shares, if this has not already been done.

- Creates a project named `SCSLM_`resourcegroup_name in the node, if this has not already been done. This project is specific to the resource group, and is assigned the specified number of CPU shares (`project.`cpu-shares).

- Starts the resource in the `SCSLM_`resourcegroup_name project.

For more information about configuring the CPU control facility, see the `rg_properties`(5) man page.

1. Set the default scheduler for the system to be fair share scheduler (FSS).

       # dispadmin -d FSS

   FSS becomes the default scheduler on next reboot. To make this configuration take effect immediately, use the `priocntl` command.

       # priocntl -s -C FSS

   Using the combination of the `priocntl` and `dispadmin` commands ensures that FSS becomes the default scheduler immediately and remains so after reboot. For more information about setting a scheduling class, see the `dispadmin`(1M) and `priocntl`(1) man pages.

   Note - If the FSS is not the default scheduler, your CPU shares assignment will not take effect.

2. On each node to use CPU control, configure the number of shares for the global-cluster nodes and the minimum number of CPUs available in the default processor set.

   If you do not assign a value to the `globalzoneshares` and `defaultpsetmin` properties, these properties take their default values.

       # clnode set [-p globalzoneshares=integer] \
       [-p defaultpsetmin=integer] \
       node

   `-p` `defaultpsetmin=`defaultpsetmininteger

     Sets the minimum number of CPUs available in the default processor set. The default value is 1.

   `-p` `globalzoneshares=`integer

     Sets the number of shares assigned to the node. The default value is 1.

   node

     Specifies nodes on which properties are to be set.

   In setting these properties, you are setting properties for the node.

3. Verify that you correctly set these properties.

       # clnode show node

   For the node you specify, the `clnode` command prints the properties set and the values that are set for these properties. If you do not set the CPU control properties with `clnode`, they take the default value.

4. Configure the CPU control facility.

       # clresourcegroup create -p RG_SLM_TYPE=automated \
        [-p RG_SLM_CPU_SHARES=value] resource_group_name

   `-p` `RG_SLM_TYPE=automated`

     Enables you to control CPU usage and automates some steps to configure the Oracle Solaris OS for system resource management.

   `-p` `RG_SLM_CPU_SHARES=`value

     Specifies the number of CPU shares that are assigned to the resource group-specific project, `project.cpu-shares` and determines the number of CPU shares that are assigned to the node `zone.cpu-shares`.

   resource_group_name

     Specifies the name of the resource group.

   In this procedure, you do not set the `RG_SLM_PSET_TYPE` property. In the node, this property takes the value `default`.

   This step creates a resource group. You could alternatively use the `clresourcegroup set` command to modify an existing resource group.

5. Activate the configuration change.

       # clresourcegroup online -eM resource_group_name

   resource_group_name

     Specifies the name of the resource group.

   Note - Do not remove or modify the `SCSLM_`resource_group_name project. You can add more resource control manually to the project, for example, by configuring the `project.max-lwps` property. For more information, see the `projmod`(1M) man page.

Copyright © 2000, 2012, Oracle and/or its affiliates. All rights reserved. Legal Notices |