Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  Resource Pools Creating Pools Configurations How to Use Command Files With poolcfg  Previous   Contents   Next 
   
 

Activating and Deactivating Pools Configurations

Use pooladm(1M) to make a particular pool configuration active or to remove an active pools configuration.

How to Activate a Pools Configuration

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

  1. Become superuser.

  2. Type the following:

    # /usr/sbin/pooladm -c

How to Deactivate a Pools Configuration

To remove the running configuration and all associated resources, such as processor sets, use the -x option for "remove configuration."

  1. Become superuser.

  2. Type the following:

    # /usr/sbin/pooladm -x

The -x option to pooladm removes the dynamic private configuration file as well as all resource configurations that are associated with the dynamic configuration. Thus, the -x option provides a mechanism for recovering from a poorly designed pools configuration. All processes share all of the resources on the machine.


Note - Mixing scheduling classes within one processor set can lead to unpredictable results. If you use pooladm -x to recover from a bad configuration, you should then use priocntl(1) to move running processes into a different scheduling class.


Binding to a Pool

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

  • You can use the poolbind(1M) command to bind a specific process to a named resource pool.

  • You can use the project.pool attribute in the project(4) database to identify the pool binding for a new login session or a task that is launched through newtask(1).

How to Bind Processes to a Pool

The following procedure manually binds a process (for example, the current shell) to a pool that is named ohare.

  1. Become superuser.

  2. Type the following:

    # poolbind -p ohare $$

How to Bind Tasks or Projects to a Pool

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

  1. Become superuser.

  2. Type the following:

    # poolbind -i project -p laguardia airmiles

How to Use project Attributes to Bind New Processes to a Pool

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

For example, 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.

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

Using the previous configuration, user paul can modify the pool binding for processes he starts. He 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. Verify the pool binding for the process.

    $ poolbind -q $$
    process id 6384 : pool 'backstage'
 
 
 
  Previous   Contents   Next