Sun Cluster System Administration Guide for Solaris OS

ProcedureSPARC: How to Control CPU Usage on the Solaris 9 OS

Perform this procedure to assign CPU shares to a resource group on a cluster running the Solaris 9 OS.

If a resource group is assigned CPU shares, Sun Cluster software performs the following tasks when it starts a resource of the resource group:

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

  1. Set the scheduler for the system to be the 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. 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 Solaris OS for system resource management.

    -p RG_SLM_CPU-SHARES=value

    Specifies the number of CPU shares assigned to the resource group-specific project , project.cpu-shares.


    Specifies the name of the resource group.

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

  3. Activate the configuration change.

    # clresourcegroup online -M 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.