System Administration Guide: Oracle Solaris Containers-Resource Management and Oracle Solaris Zones

Chapter 13 Creating and Administering Resource Pools (Tasks)

This chapter describes how to set up and administer resource pools on your system.

For background information about resource pools, see Chapter 12, Resource Pools (Overview).

Administering Dynamic Resource Pools (Task Map)

Task 

Description 

For Instructions 

Enable or disable resource pools. 

Activate or disable resource pools on your system. 

Enabling and Disabling the Pools Facility

Enable or disable dynamic resource pools. 

Activate or disable dynamic resource pools facilities on your system. 

Enabling and Disabling the Pools Facility

Create a static resource pools configuration. 

Create a static configuration file that matches the current dynamic configuration. For more information, see Resource Pools Framework.

How to Create a Static Configuration

Modify a resource pools configuration. 

Revise a pools configuration on your system, for example, by creating additional pools. 

How to Modify a Configuration

Associate a resource pool with a scheduling class. 

Associate a pool with a scheduling class so that all processes bound to the pool use the specified scheduler. 

How to Associate a Pool With a Scheduling Class

Set configuration constraints and define configuration objectives. 

Specify objectives for poold to consider when taking corrective action. For more information on configuration objectives, see poold Overview.

How to Set Configuration Constraints and How to Define Configuration Objectives

Set the logging level. 

Specify the level of logging information that poold generates.

How to Set the poold Logging Level

Use a text file with the poolcfg command.

The poolcfg command can take input from a text file.

How to Use Command Files With poolcfg

Transfer resources in the kernel. 

Transfer resources in the kernel. For example, transfer resources with specific IDs to a target set. 

Transferring Resources

Activate a pools configuration. 

Activate the configuration in the default configuration file. 

How to Activate a Pools Configuration

Validate a pools configuration before you commit the configuration. 

Validate a pools configuration to test what will happen when the validation occurs. 

How to Validate a Configuration Before Committing the Configuration

Remove a pools configuration from your system. 

All associated resources, such as processor sets, are returned to their default status. 

How to Remove a Pools Configuration

Bind processes to a pool. 

Manually associate a running process on your system with a resource pool. 

How to Bind Processes to a Pool

Bind tasks or projects to a pool. 

Associate tasks or projects with a resource pool. 

How to Bind Tasks or Projects to a Pool

Bind new processes to a resource pool. 

To automatically bind new processes in a project to a given pool, add an attribute to each entry in the project database.

How to Set the project.pool Attribute for a Project

Use project attributes to bind a process to a different pool.

Modify the pool binding for new processes that are started. 

How to Use project Attributes to Bind a Process to a Different Pool

Use the poolstat utility to produce reports.

Produce multiple reports at specifed intervals. 

Producing Multiple Reports at Specific Intervals

Report resource set statistics. 

Use the poolstat utility to report statistics for a pset resource set.

Reporting Resource Set Statistics

Enabling and Disabling the Pools Facility

Starting with the Solaris 10 11/06 release, you can enable and disable the resource pools and dynamic resource pools services on your system by using the svcadm command described in the svcadm(1M) man page.

You can also use the pooladm command described in the pooladm(1M) man page to perform the following tasks:


Note –

When a system is upgraded, if the resource pools framework is enabled and an /etc/pooladm.conf file exists, the pools service is enabled and the configuration contained in the file is applied to the system.


ProcedureSolaris 10 11/06 and Later: How to Enable the Resource Pools Service Using svcadm

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Enable the resource pools service.


    # svcadm enable system/pools:default
    

ProcedureSolaris 10 11/06 and Later: How to Disable the Resource Pools Service Using svcadm

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Disable the resource pools service.


    # svcadm disable system/pools:default
    

ProcedureSolaris 10 11/06 and Later: How to Enable the Dynamic Resource Pools Service Using svcadm

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

    Roles contain authorizations and privileged commands. For information on how to create the role and assign the role to a user, see Configuring RBAC (Task Map) in System Administration Guide: Security ServicesManaging RBAC (Task Map) in System Administration Guide: Security Services.

  2. Enable the dynamic resource pools service.


    # svcadm enable system/pools/dynamic:default
    

Example 13–1 Dependency of the Dynamic Resource Pools Service on the Resource Pools Service

This example shows that you must first enable resource pools if you want to run DRP.

There is a dependency between resource pools and dynamic resource pools. DRP is now a dependent service of resource pools. DRP can be independently enabled and disabled apart from resource pools.

The following display shows that both resource pools and dynamic resource pools are currently disabled:


# svcs *pool*
STATE          STIME    FMRI
disabled       10:32:26 svc:/system/pools/dynamic:default
disabled       10:32:26 svc:/system/pools:default

Enable dynamic resource pools :


# svcadm enable svc:/system/pools/dynamic:default
# svcs -a | grep pool
disabled       10:39:00 svc:/system/pools:default
offline        10:39:12 svc:/system/pools/dynamic:default

Note that the DRP service is still offline.

Use the -x option of the svcs command to determine why the DRP service is offline:


# svcs -x *pool*
svc:/system/pools:default (resource pools framework)
 State: disabled since Wed 25 Jan 2006 10:39:00 AM GMT
Reason: Disabled by an administrator.
   See: http://sun.com/msg/SMF-8000-05
   See: libpool(3LIB)
   See: pooladm(1M)
   See: poolbind(1M)
   See: poolcfg(1M)
   See: poolstat(1M)
   See: /var/svc/log/system-pools:default.log
Impact: 1 dependent service is not running.  (Use -v for list.)

svc:/system/pools/dynamic:default (dynamic resource pools)
 State: offline since Wed 25 Jan 2006 10:39:12 AM GMT
Reason: Service svc:/system/pools:default is disabled.
   See: http://sun.com/msg/SMF-8000-GE
   See: poold(1M)
   See: /var/svc/log/system-pools-dynamic:default.log
Impact: This service is not running.

Enable the resource pools service so that the DRP service can run:


# svcadm enable svc:/system/pools:default

When the svcs *pool* command is used, the system displays:


# svcs *pool*
STATE          STIME    FMRI
online         10:40:27 svc:/system/pools:default
online         10:40:27 svc:/system/pools/dynamic:default


Example 13–2 Effect on Dynamic Resource Pools When the Resource Pools Service Is Disabled

If both services are online and you disable the resource pools service:


# svcadm disable svc:/system/pools:default 

When the svcs *pool* command is used, the system displays:


# svcs *pool*
STATE          STIME    FMRI
disabled       10:41:05 svc:/system/pools:default
online         10:40:27 svc:/system/pools/dynamic:default
# svcs *pool*
STATE          STIME    FMRI
disabled       10:41:05 svc:/system/pools:default
online         10:40:27 svc:/system/pools/dynamic:default

But eventually, the DRP service moves to offline because the resource pools service has been disabled:


# svcs *pool*
STATE          STIME    FMRI
disabled       10:41:05 svc:/system/pools:default
offline        10:41:12 svc:/system/pools/dynamic:default

Determine why the DRP service is offline:


# svcs -x *pool*
svc:/system/pools:default (resource pools framework)
 State: disabled since Wed 25 Jan 2006 10:41:05 AM GMT
Reason: Disabled by an administrator.
   See: http://sun.com/msg/SMF-8000-05
   See: libpool(3LIB)
   See: pooladm(1M)
   See: poolbind(1M)
   See: poolcfg(1M)
   See: poolstat(1M)
   See: /var/svc/log/system-pools:default.log
Impact: 1 dependent service is not running.  (Use -v for list.)

svc:/system/pools/dynamic:default (dynamic resource pools)
 State: offline since Wed 25 Jan 2006 10:41:12 AM GMT
Reason: Service svc:/system/pools:default is disabled.
   See: http://sun.com/msg/SMF-8000-GE
   See: poold(1M)
   See: /var/svc/log/system-pools-dynamic:default.log
Impact: This service is not running.

Resource pools must be started for DRP to work. For example, resource pools could be started by using the pooladm command with the -e option:


# pooladm -e

Then the svcs *pool* command displays:


# svcs *pool*
STATE          STIME    FMRI
online         10:42:23 svc:/system/pools:default
online         10:42:24 svc:/system/pools/dynamic:default

ProcedureSolaris 10 11/06 and Later: How to Disable the Dynamic Resource Pools Service Using svcadm

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Disable the dynamic resource pools service.


    # svcadm disable system/pools/dynamic:default
    

ProcedureHow to Enable Resource Pools Using pooladm

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Enable the pools facility.


    # pooladm -e
    

ProcedureHow to Disable Resource Pools Using pooladm

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Disable the pools facility.


    # pooladm -d
    

Configuring Pools

ProcedureHow to Create a Static Configuration

Use the -s option to /usr/sbin/pooladm to create a static configuration file that matches the current dynamic configuration. Unless a different file name is specified, the default location /etc/pooladm.conf is used.

Commit your configuration using the pooladm command with the -c option. Then, use the pooladm command with the -s option to update the static configuration to match the state of the dynamic configuration.


Note –

The new functionality pooladm -s is preferred over the previous functionality poolcfg -c discover for creating a new configuration that matches the dynamic configuration.


Before You Begin

Enable pools 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 more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Update the static configuration file to match the current dynamic configuration.


    # pooladm -s
    
  3. View the contents of the configuration file in readable form.

    Note that the configuration contains default elements created by the system.


    # poolcfg -c info
    system tester
            string  system.comment
            int     system.version 1
            boolean system.bind-default true
            int     system.poold.pid 177916
    
            pool pool_default
                    int     pool.sys_id 0
                    boolean pool.active true
                    boolean pool.default true
                    int     pool.importance 1
                    string  pool.comment 
                    pset    pset_default
    
            pset pset_default
                    int     pset.sys_id -1
                    boolean pset.default true
                    uint    pset.min 1
                    uint    pset.max 65536
                    string  pset.units population
                    uint    pset.load 10
                    uint    pset.size 4
                    string  pset.comment 
                    boolean testnullchanged true
    
                    cpu
                            int     cpu.sys_id 3
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 2
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 1
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 0
                            string  cpu.comment 
                            string  cpu.status on-line
  4. Commit the configuration at /etc/pooladm.conf.


    # pooladm -c
    
  5. (Optional) To copy the dynamic configuration to a static configuration file called /tmp/backup, type the following:


    # pooladm -s /tmp/backup
    

ProcedureHow to Modify a Configuration

To enhance your configuration, create a processor set named pset_batch and a pool named pool_batch. Then join the pool and the processor set with an association.

Note that you must quote subcommand arguments that contain white space.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Create processor set pset_batch.


    # poolcfg -c 'create pset pset_batch (uint pset.min = 2; uint pset.max = 10)'
    
  3. Create pool pool_batch.


    # poolcfg -c 'create pool pool_batch'
    
  4. Join the pool and the processor set with an association.


    # poolcfg -c 'associate pool pool_batch (pset pset_batch)'
    
  5. Display the edited configuration.


    # poolcfg -c info
    system tester
            string  system.comment kernel state
            int     system.version 1
            boolean system.bind-default true
            int     system.poold.pid 177916
    
            pool pool_default
                    int     pool.sys_id 0
                    boolean pool.active true
                    boolean pool.default true
                    int     pool.importance 1
                    string  pool.comment 
                    pset    pset_default
    
            pset pset_default
                    int     pset.sys_id -1
                    boolean pset.default true
                    uint    pset.min 1
                    uint    pset.max 65536
                    string  pset.units population
                    uint    pset.load 10
                    uint    pset.size 4
                    string  pset.comment 
                    boolean testnullchanged true
    
                    cpu
                            int     cpu.sys_id 3
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 2
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 1
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 0
                            string  cpu.comment 
                            string  cpu.status on-line
    
            pool pool_batch
                    boolean pool.default false
                    boolean pool.active true
                    int pool.importance 1
                    string pool.comment
                    pset pset_batch
    
            pset pset_batch
                    int pset.sys_id -2
                    string pset.units population
                    boolean pset.default true
                    uint pset.max 10
                    uint pset.min 2
                    string pset.comment
                    boolean pset.escapable false
                    uint pset.load 0
                    uint pset.size 0
    
                    cpu
                            int     cpu.sys_id 5
                            string  cpu.comment
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 4
                            string  cpu.comment
                            string  cpu.status on-line
  6. Commit the configuration at /etc/pooladm.conf.


    # pooladm -c
    
  7. (Optional) To copy the dynamic configuration to a static configuration file named /tmp/backup, type the following:


    # pooladm -s /tmp/backup
    

ProcedureHow to Associate a Pool With a Scheduling Class

You can associate a pool with a scheduling class so that all processes bound to the pool use this scheduler. To do this, set the pool.scheduler property to the name of the scheduler. This example associates the pool pool_batch with the fair share scheduler (FSS).

  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. Modify pool pool_batch to be associated with the FSS.


    # poolcfg -c 'modify pool pool_batch (string pool.scheduler="FSS")'
    
  3. Display the edited configuration.


    # poolcfg -c info
    system tester
            string  system.comment
            int     system.version 1
            boolean system.bind-default true
            int     system.poold.pid 177916
    
            pool pool_default
                    int     pool.sys_id 0
                    boolean pool.active true
                    boolean pool.default true
                    int     pool.importance 1
                    string  pool.comment 
                    pset    pset_default
    
            pset pset_default
                    int     pset.sys_id -1
                    boolean pset.default true
                    uint    pset.min 1
                    uint    pset.max 65536
                    string  pset.units population
                    uint    pset.load 10
                    uint    pset.size 4
                    string  pset.comment 
                    boolean testnullchanged true
    
                    cpu
                            int     cpu.sys_id 3
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 2
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 1
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 0
                            string  cpu.comment 
                            string  cpu.status on-line
    
            pool pool_batch
                    boolean pool.default false
                    boolean pool.active true
                    int pool.importance 1
                    string pool.comment
                    string pool.scheduler FSS
                    pset batch
    
            pset pset_batch
                    int pset.sys_id -2
                    string pset.units population
                    boolean pset.default true
                    uint pset.max 10
                    uint pset.min 2
                    string pset.comment
                    boolean pset.escapable false
                    uint pset.load 0
                    uint pset.size 0
    
                    cpu
                            int     cpu.sys_id 5
                            string  cpu.comment
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 4
                            string  cpu.comment
                            string  cpu.status on-line
  4. Commit the configuration at /etc/pooladm.conf:


    # pooladm -c
    
  5. (Optional) To copy the dynamic configuration to a static configuration file called /tmp/backup, type the following:


    # pooladm -s /tmp/backup
    

ProcedureHow to Set Configuration Constraints

Constraints affect the range of possible configurations by eliminating some of the potential changes that could be made to a configuration. This procedure shows how to set the cpu.pinned property.

In the following examples, cpuid is an integer.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Modify the cpu.pinned property in the static or dynamic configuration:

    • Modify the boot-time (static) configuration:


      # poolcfg -c 'modify cpu <cpuid> (boolean cpu.pinned = true)'
      
    • Modify the running (dynamic) configuration without modifying the boot-time configuration:


      # poolcfg -dc 'modify cpu <cpuid> (boolean cpu.pinned = true)'
      

ProcedureHow to Define Configuration Objectives

You can specify objectives for poold to consider when taking corrective action.

In the following procedure, the wt-load objective is being set so that poold tries to match resource allocation to resource utilization. The locality objective is disabled to assist in achieving this configuration goal.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Modify system tester to favor the wt-load objective.


    # poolcfg -c 'modify system tester (string system.poold.objectives="wt-load")'
    
  3. Disable the locality objective for the default processor set.


    # poolcfg -c 'modify pset pset_default (string pset.poold.objectives="locality none")'
    
  4. Disable the locality objective for the pset_batch processor set.


    # poolcfg -c 'modify pset pset_batch (string pset.poold.objectives="locality none")'
    
  5. Display the edited configuration.


    # poolcfg -c info
    system tester
            string  system.comment
            int     system.version 1
            boolean system.bind-default true
            int     system.poold.pid 177916
            string  system.poold.objectives wt-load
    
            pool pool_default
                    int     pool.sys_id 0
                    boolean pool.active true
                    boolean pool.default true
                    int     pool.importance 1
                    string  pool.comment 
                    pset    pset_default
    
            pset pset_default
                    int     pset.sys_id -1
                    boolean pset.default true
                    uint    pset.min 1
                    uint    pset.max 65536
                    string  pset.units population
                    uint    pset.load 10
                    uint    pset.size 4
                    string  pset.comment 
                    boolean testnullchanged true
                    string  pset.poold.objectives locality none
    
                    cpu
                            int     cpu.sys_id 3
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 2
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 1
                            string  cpu.comment 
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 0
                            string  cpu.comment 
                            string  cpu.status on-line
    
            pool pool_batch
                    boolean pool.default false
                    boolean pool.active true
                    int pool.importance 1
                    string pool.comment
                    string pool.scheduler FSS
                    pset batch
    
            pset pset_batch
                    int pset.sys_id -2
                    string pset.units population
                    boolean pset.default true
                    uint pset.max 10
                    uint pset.min 2
                    string pset.comment
                    boolean pset.escapable false
                    uint pset.load 0
                    uint pset.size 0
                    string  pset.poold.objectives locality none
    
                    cpu
                            int     cpu.sys_id 5
                            string  cpu.comment
                            string  cpu.status on-line
    
                    cpu
                            int     cpu.sys_id 4
                            string  cpu.comment
                            string  cpu.status on-line
  6. Commit the configuration at /etc/pooladm.conf.


    # pooladm -c
    
  7. (Optional) To copy the dynamic configuration to a static configuration file called /tmp/backup, type the following:


    # pooladm -s /tmp/backup
    

ProcedureHow to Set the poold Logging Level

To specify the level of logging information that poold generates, set the system.poold.log-level property in the poold configuration. The poold configuration is held in the libpool configuration. For information, see poold Logging Information and the poolcfg(1M) and libpool(3LIB) man pages.

You can also use the poold command at the command line to specify the level of logging information that poold generates.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Set the logging level by using the poold command with the -l option and a parameter, for example, INFO.


    # /usr/lib/pool/poold -l INFO
    

    For information about available parameters, see poold Logging Information. The default logging level is NOTICE.

ProcedureHow to Use Command Files With poolcfg

The poolcfg command with the -f option can take input from a text file that contains poolcfg subcommand arguments to the -c option. This method is appropriate when you want a set of operations to be performed. When processing multiple commands, the configuration is only updated if all of the commands succeed. For large or complex configurations, this technique can be more useful than per-subcommand invocations.

Note that in command files, the # character acts as a comment mark for the rest of the line.

  1. Create the input file poolcmds.txt.


    $ cat > poolcmds.txt
    create system tester
    create pset pset_batch (uint pset.min = 2; uint pset.max = 10)
    create pool pool_batch
    associate pool pool_batch (pset pset_batch)
    
  2. 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” in System Administration Guide: Security Services.

  3. Execute the command:


    # /usr/sbin/poolcfg -f poolcmds.txt
    

Transferring Resources

Use the transfer subcommand argument to the -c option of poolcfg with the -d option to transfer resources in the kernel. The -d option specifies that the command operate directly on the kernel and not take input from a file.

The following procedure moves two CPUs from processor set pset1 to processor set pset2 in the kernel.

ProcedureHow to Move CPUs Between Processor Sets

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Move two CPUs from pset1 to pset2.

    The from and to subclauses can be used in any order. Only one to and from subclause is supported per command.


    # poolcfg -dc 'transfer 2 from pset pset1 to pset2'
    

Example 13–3 Alternative Method to Move CPUs Between Procesor Sets

If specific known IDs of a resource type are to be transferred, an alternative syntax is provided. For example, the following command assigns two CPUs with IDs 0 and 2 to the pset_large processor set:


# poolcfg -dc "transfer to pset pset_large (cpu 0; cpu 2)"

Troubleshooting

If a transfer fails because there are not enough resources to match the request or because the specified IDs cannot be located, the system displays an error message.

Activating and Removing Pool Configurations

Use the pooladm command to make a particular pool configuration active or to remove the currently active pool configuration. See the pooladm(1M) man page for more information about this command.

ProcedureHow to Activate a Pools Configuration

To activate the configuration in the default configuration file, /etc/pooladm.conf, invoke pooladm with the -c option, “commit configuration.”

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Commit the configuration at /etc/pooladm.conf.


    # pooladm -c
    
  3. (Optional) Copy the dynamic configuration to a static configuration file, for example, /tmp/backup.


    # pooladm -s /tmp/backup
    

ProcedureHow to Validate a Configuration Before Committing the Configuration

You can use the -n option with the -c option to test what will happen when the validation occurs. The configuration will not actually be committed.

The following command attempts to validate the configuration contained at /home/admin/newconfig. Any error conditions encountered are displayed, but the configuration itself is not modified.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Test the validity of the configuration before committing it.


    # pooladm -n -c /home/admin/newconfig
    

ProcedureHow to Remove a Pools Configuration

To remove the current active configuration and return all associated resources, such as processor sets, to their default status, use the -x option for “remove configuration.”

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Remove the current active configuration.


    # pooladm -x
    

    The -x option to pooladm removes all user-defined elements from the dynamic configuration. All resources revert to their default states, and all pool bindings are replaced with a binding to the default pool.

Mixing Scheduling Classes Within a Processor Set

You can safely mix processes in the TS and IA classes in the same processor set. Mixing other scheduling classes within one processor set can lead to unpredictable results. If the use of pooladm -x results in mixed scheduling classes within one processor set, use the priocntl command to move running processes into a different scheduling class. See How to Manually Move Processes From the TS Class Into the FSS Class. Also see the priocntl(1) man page.

Setting Pool Attributes and Binding to a Pool

You can set a project.pool attribute to associate a resource pool with a project.

You can bind a running process to a pool in two ways:

ProcedureHow to Bind Processes to a Pool

The following procedure uses poolbind with the -p option to manually bind a process (in this case, the current shell) to a pool named ohare.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Manually bind a process to a pool:


    # poolbind -p ohare $$
    
  3. Verify the pool binding for the process by using poolbind with the -q option.


    $ poolbind -q $$
    155509 ohare

    The system displays the process ID and the pool binding.

ProcedureHow to Bind Tasks or Projects to a Pool

To bind tasks or projects to a pool, use the poolbind command with the -i option. The following example binds all processes in the airmiles project to the laguardia pool.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Bind all processes in the airmiles project to the laguardia pool.


    # poolbind -i project -p laguardia airmiles
    

ProcedureHow to Set the project.pool Attribute for a Project

You can set the project.pool attribute to bind a project's processes to a resource pool.

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

    The System Administrator role includes the Process Management profile. For more information about roles, see Using the Solaris Management Tools With RBAC (Task Map) in System Administration Guide: Basic Administration.

  2. Add a project.pool attribute to each entry in the project database.


    # projmod -a -K project.pool=poolname project
    

ProcedureHow to Use project Attributes to Bind a Process to a Different Pool

Assume you have a configuration with two pools that are named studio and backstage. The /etc/project file has the following contents:


user.paul:1024::::project.pool=studio
user.george:1024::::project.pool=studio
user.ringo:1024::::project.pool=backstage
passes:1027::paul::project.pool=backstage

With this configuration, processes that are started by user paul are bound by default to the studio pool.

User paul can modify the pool binding for processes he starts. paul can use newtask to bind work to the backstage pool as well, by launching in the passes project.

  1. Launch a process in the passes project.


    $ newtask -l -p passes
    
  2. Use the poolbind command with the -q option to verify the pool binding for the process. Also use a double dollar sign ($$) to pass the process number of the parent shell to the command.


    $ poolbind -q $$
    6384  pool backstage

    The system displays the process ID and the pool binding.

Using poolstat to Report Statistics for Pool-Related Resources

The poolstat command is used to display statistics for pool-related resources. See Using poolstat to Monitor the Pools Facility and Resource Utilization and the poolstat(1M) man page for more information.

The following subsections use examples to illustrate how to produce reports for specific purposes.

Displaying Default poolstat Output

Typing poolstat without arguments outputs a header line and a line of information for each pool. The information line shows the pool ID, the name of the pool, and resource statistics for the processor set attached to the pool.


machine% poolstat
                              pset
       id pool           size used load
        0 pool_default      4  3.6  6.2
        1 pool_sales        4  3.3  8.4

Producing Multiple Reports at Specific Intervals

The following command produces three reports at 5-second sampling intervals.


machine% poolstat 5 3
                               pset
 id pool                 size used load
 46 pool_sales              2  1.2  8.3
  0 pool_default            2  0.4  5.2
                              pset
 id pool                 size used load
 46 pool_sales              2  1.4  8.4
  0 pool_default            2  1.9  2.0
                              pset
 id pool                 size used load
 46 pool_sales              2  1.1  8.0
  0 pool_default            2  0.3  5.0  

Reporting Resource Set Statistics

The following example uses the poolstat command with the -r option to report statistics for the processor set resource set. Note that the resource set pset_default is attached to more than one pool, so this processor set is listed once for each pool membership.


machine% poolstat -r pset
      id pool          type rid rset          min  max size used load
       0 pool_default  pset  -1 pset_default    1  65K    2  1.2  8.3
       6 pool_sales    pset   1 pset_sales      1  65K    2  1.2  8.3
       2 pool_other    pset  -1 pset_default    1  10K    2  0.4  5.2