Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 10

Resource Pools

This chapter discusses resource pools, which are used for partitioning machine resources. Resource pools enable you to separate workloads so that workload consumption of certain resources does not overlap. This resource reservation helps to achieve predictable performance on systems with mixed workloads.

Overview

Resource pools provide a persistent configuration mechanism for processor set configuration and, optionally, scheduling class assignment.

Figure 10-1 Resource Pool Framework

By grouping multiple partitions, pools provide a handle to associate with labeled workloads. Each project entry in the /etc/project database can have a pool associated with it. New work begun on a project is bound to the appropriate pool.

The pools mechanism is primarily for use on large machines of more than four CPUs. However, small machines can still benefit from this functionality. On small machines, pools can share noncritical resource partitions, and can be separated only on the basis of critical resources.

When to Use Pools

Resource pools offer a versatile mechanism that can be applied to many administrative scenarios, as described in the following sections.

Batch Compute Server

Use pools functionality to split a server into two pools.

One pool is used for login sessions and interactive work by timesharing users. The other pool is used for jobs that are submitted through the batch system.

Application or Database Server

Partition the resources for interactive applications in accordance with the applications' requirements.

Turning on Applications in Phases

Set user expectations.

You might initially deploy a machine by running only a fraction of the services that the machine is ultimately expected to deliver. User difficulties can occur if reservation-based resource management mechanisms are not established when the machine comes online.

For example, the fair share scheduler optimizes CPU utilization. The response times for a machine that run only one application can be misleadingly fast when compared to the response times users see with multiple applications loaded. By using separate pools for each application, you can ensure that a ceiling on the number of CPUs available to each application is in place before all applications are deployed.

Complex Timesharing Server

Partition a server that supports large user populations.

Server partitioning provides an isolation mechanism that leads to a more predictable per-user response.

By dividing users into groups that bind to separate pools, and using the fair share scheduling (FSS) facility, you can tune CPU allocations to facilitate sets of users that have priority. This assignment can be based on user role, accounting chargeback, and so forth.

Workloads That Change Seasonally

Use resource pools to adjust to changing demand.

If your site experiences predictable shifts in workload demand over long periods of time, such as a monthly, quarterly, or annual cycles, you can alternate between multiple pools configurations by invoking pooladm from a cron(1M) job.

Real-Time Applications

Create a real-time pool by using the RT scheduler and designated processor resources.

Administering Pools

The commands that are shown in the following table provide the primary administrative interface to the pools facility.

Command

Description

pooladm(1M)

Activates a particular configuration or deactivates the current configuration. If run without options, pooladm prints out the current running pools configuration.

poolbind(1M)

Enables the manual binding of projects, tasks, and processes to a pool.

poolcfg(1M)

Creates and modifies pools configuration files. If run with the info subcommand argument to the -c option, poolcfg displays the current configuration.

A library API is provided by libpool(3LIB). The library can be used by programs to manipulate pool configurations.

Pools Framework

The resource pools framework stores its view of the machine in a private configuration file. (The location of the file is private to the implementation of the pools framework.) This configuration file represents the pools framework's view of the machine. The file also contains information about configured pools and the organization of partitionable resources. Each pool can contain the following:

  • A reference to a processor set or a CPU resource partition

  • A property that specifies the pool's default scheduling class

Implementing Pools on a System

Pools can be implemented on a system by using one of these methods.

  1. When the Solaris software boots, an init script checks if the /etc/pooladm.conf file exists. If this file is found, then pooladm is invoked to make this configuration the active pools configuration. The system creates a private configuration file to reflect the organization that is requested in /etc/pooladm.conf, and the machine's resources are partitioned accordingly.

  2. When the Solaris environment is up and running, a pools configuration can either be activated (if it is not already present) or modified by using the pooladm command. By default, pooladm operates on /etc/pooladm.conf. However, you can optionally specify an alternate location and file name, and use this file to update the pools configuration.

Dynamic Reconfiguration Operations and Resource Pools

Dynamic reconfiguration (DR) enables you to reconfigure hardware while the system is running. Because DR affects available resource amounts, the pools facility must be included in these operations. When a DR operation is initiated, the pools framework acts to validate the configuration.

If the DR operation can proceed without causing the current pools configuration to become invalid, then the private configuration file is updated. An invalid configuration is one that cannot be supported by the available resources.

If the DR operation would cause the pools configuration to be invalid, then the operation fails and you are notified by a message to the message log. If you want to force the configuration to complete the process, you must use the DR force option. The pools configuration is then modified to comply with the new resource configuration.

Creating Pools Configurations

The configuration file contains a description of the pools to be created on the system. The file describes the entities and resource types that can be manipulated.

Type

Description

pset

A processor set resource

pool

Named collection of resource associations

system

The machine-level entity

See poolcfg(1M) for more information on elements that be manipulated.

You can create a structured /etc/pooladm.conf file in two ways.

  • You can use poolcfg to discover the resources on the current system and place the results in a configuration file.

    This method simplifies file construction. All active resources and components on the system that are capable of being manipulated by the pools facility are recorded. The resources include existing processor set configurations. You can then modify the configuration to rename the processor sets or to create additional pools if necessary.

  • You can use poolcfg to create a new pools configuration.

    Use this method when you develop configurations for other machines or when you create configurations that you want to apply to the current machine at a later time.

Use poolcfg or libpool to modify the /etc/pooladm.conf file. Do not directly edit this file.

 
 
 
  Previous   Contents   Next