Solaris Resource Manager 1.3 System Administration Guide

Chapter 1 Overview

The Solaris Resource Manager software ensures resource availability for users, groups, and applications. It provides the ability to allocate and control major system resources such as CPU, virtual memory, physical memory (available on Solaris Resource Manager 1.3 on Solaris 8 only), and number of processes. It also implements administrative policies that govern which resources different users can access, and more specifically, how much of a particular resource each user is permitted to use. The Solaris Resource Manager product is a key enabler for server consolidation and increased resource utilization.

Introduction to Solaris Resource Manager

Organizational Goals It Addresses

IT organizations are often required to control costs and guarantee service levels for enterprise applications. Resource management can make it possible to lower overall total cost of ownership, have more accurate control over who uses the system and how they use it, and sometimes serve both goals.

By using Solaris Resource Manager software to categorize and prioritize usage, administrators can effectively utilize reserve capacity during off-peak periods, often eliminating the need for additional processing power.

By segregating workloads within the system, Solaris Resource Manager enables the system administrator to run and manage dissimilar applications on a single system, rather than dedicating an entire system-complete with peak capacity-to each application. Traditionally, the most common approach to ensuring predictable service and response time is to host one function per system. This method works, but the proliferation of systems in the data center is expensive and difficult to manage.

Solaris Resource Manager allows consolidation of several applications on a single UNIX® server, thus fully utilizing all available resources. At the same time, all users can receive resources commensurate with their service levels and the relative importance of their work.

Key Solaris Resource Manager Features

The following table identifies and briefly describes key system resource control features discussed in this manual.

System ResourceSolaris Resource Manager ParameterDescription
 CPU sharescpu.shares The amount of CPU time allocated to an lnode, specified in the limits database file as a number of shares. Solaris Resource Manager allocates all available system resources; that is, an lnode can receive more than its allocation when the resources are available.
 CPU accrualcpu.accrue The accrued CPU usages for all lnodes within the group as well as that of the current lnode.
 Memory limitmemory.limit The maximum virtual memory usage allowed for all processes attached to an lnode. This limit is a fixed value specified in the limits database file. A value of zero indicates that no limit is set.
 Process memory limitmemory.plimit The maximum per-process virtual memory limit. This is a fixed value specified in the limits database file. A value of zero indicates that no limit is set.
 Physical memory limitrss.limit (Solaris 8 only) The physical memory cap, in specified units, that is applied to collections of processes attached to an lnode. The cap must be a positive number.
 Memory accrualmemory.accrue The overall memory resources used over a period of time. Value is measured in byte-seconds.
 Number of processesprocess.limit Limits the number of processes that a user can run simultaneously, according to fixed limits specified in the limits database file.
 Number of logins per userflag.onelogin flag.nologinProhibits login or limits the number of simultaneous login sessions per user and/or scheduling group in accordance with fixed limits specified in the limits database file. Solaris Resource Manager tracks login count using PAM authentication records and utmp(4) entries. The counter is incremented and decremented dynamically.
 Connect-timeterminal.limit terminal.usage terminal.accrue Solaris Resource Manager dynamically tracks a user's connect-time and compares it to the fixed limit specified in the limits database file by the system administrator or group header. As a user approaches the connect-time limit, Solaris Resource Manager sends warning messages to the user's terminal. When the limit is reached, the user is notified and then logged out forcibly after a short grace period.

When to Use Solaris Resource Manager

Solaris Resource Manager can provide effective resource control in a variety of situations including server consolidation, Internet Service Provider (ISP) web hosting, batch processing, administering sites with large or varied user populations, and establishing policies to ensure that critical applications get the response time they require.

Server Consolidation

Solaris Resource Manager is ideal for environments that are consolidating multiple applications on a single server. The cost and complexity of managing numerous machines encourages system managers to consolidate applications on larger, more scalable systems. With Solaris Resource Manager, it's easy to achieve these economies of scale.

As an example, a single Sun server could provide application, file, and print services for heterogeneous clients, messaging/mail service, web service, and mission-critical database applications. Since Sun EnterpriseTM servers scale from 1 to 64 processors, one server could be configured for several departments to share or for an entire enterprise to use. In other server consolidation efforts, the development, prototype, and production environments are combined on a single large machine such as the Sun Enterprise 10000 or Sun Enterprise 6500, rather than being hosted on three separate servers. Still other consolidation projects combine database and application servers within a single machine, or multiple data marts. Regardless of the application type or configuration, Solaris Resource Manager helps ensure that the system's resources are allocated among all users, applications, and groups according to the defined policy. Critical applications are protected because they are guaranteed the share of the available system resources they need.

Web Hosting

In the past, ISPs have had to assign dedicated machines to each client, at significant cost and complexity. With Solaris Resource Manager, an ISP can confidently host many (perhaps thousands) of web servers on a single machine. Solaris Resource Manager allows administrators to control the resource consumption associated with each web site, protecting each from the potential excesses of the others. It also prevents a faulty common gateway interface (CGI) script from exhausting CPU resources, or a user application from leaking all available virtual memory.

Batch Processing

Solaris Resource Manager can be used to prevent batch workloads from impacting ongoing business activities as well as other batch jobs running concurrently.

Large or Varied User Population

Solaris Resource Manager can help manage resources in any system that has a large and diverse user base, such as an educational institution. (In fact, Solaris Resource Manager has its roots in an early CPU resource scheduler developed at the Universities of Sydney and New South Wales.) Where there is a mix of workloads, the Solaris Resource Manager software can be configured to favor certain users. For example, in large brokerage firms, traders intermittently require fast access to execute a query or perform a calculation. Other system users, however, have more consistent workloads. If the traders are granted a proportionately larger amount of processing power, Solaris Resource Manager ensures that they will have the responsiveness they need.

Main Capabilities

Solaris Resource Manager provides the ability to administer the consumption of various important resources in the system, such as processor time, virtual memory, process count, login control, and connect-time. The Solaris Resource Manager administrative model adds flexibility by permitting the delegation of administrative rights within a hierarchy, relieving the data center staff from the need to be involved in intra-group administrative transactions. In addition, Solaris Resource Manager provides mechanisms for collecting resource usage data that can be applied to capacity planning or chargeback purposes.

Processing Resources

One of the fundamental jobs of the operating system is to arbitrate which processes get access to the system's resources. The default Solaris timeshare (TS) scheduler tries to give every process relatively equal access to the system's resources. Limitations on access are applied to processes without physical memory resources, which are not permitted to run, and processes with pending I/O requests, which are blocked.

This scheme is the basis for most modern operating systems; it works well as long as "equal access for all" is a suitable policy for the organization. However, more sophisticated mechanisms are needed to implement different policies. For example, a manufacturing department might own a large system that is usually used lightly because of fluctuating seasonal demand. At the same time, the engineering department almost always needs more computational cycles. Although it is wasteful to underuse a large machine's resources, sharing the manufacturing system with engineering has traditionally been problematic. With simple scheduling policies, there is no way to express to the operating system that the manufacturing department's users are more important than the engineering users on the same system. If manufacturing has a critical job running that consumes 75 percent of the system's resources, the job will make suitable progress if all other jobs request 25 percent of the system or less. However, if an engineering job arrives that demands 50 percent of the system, that critical manufacturing job will likely not get what it needs to maintain adequate headway because the system will try to accommodate both jobs on an equal basis.

Now assume that the administrator determines that manufacturing's normal processing requirements can be met with 80 percent of the machine's capabilities. Using Solaris Resource Manager, the system administrator can specify that the manufacturing department's users can have up to 85 percent of the system's processing capability if they request it, and the scheduler will apportion the remainder to any other user. A more extreme but equally valid configuration might specify that manufacturing users can have up to 100 percent of the system if necessary, effectively preventing any other group's processes from running in the event that manufacturing really needs the entire system.

Allocating Resources

Solaris Resource Manager has a CPU scheduling class that replaces the standard timesharing scheduler. Called the SHR scheduler, this module implements what is called a fair share scheduler. The term is something of a misnomer, because it is the system administrator who specifies what "fair" means. In the example above, "fair" meant that manufacturing could get 100 percent of the system. The SHR scheduler is responsible for allocating resources according to the plan laid out in the administrative profile.

Restricting Resources

Solaris Resource Manager maintains a database of resource usage and associated limits.

The SHR scheduler takes into account the administrative specification for resource guarantees. It is capable of managing resources that are renewable (such as CPU time) or fixed (such as number of processes).

Other Solaris Resource Manager modules implement restrictions on the consumption of various resources. For example, connect-time and user logins are managed by a Pluggable Authentication Module (PAM). The PAM module consults the Solaris Resource Manager database each time a user attempts to log in. Once the system authenticates the user (generally through password matching), the user's connect-time and number of current logins are checked against the limits. The login is rejected if either limit is exceeded.

Relationship to Other Solaris Resource Control Features

The Solaris operating environment includes several other features that provide control over certain kinds of resources. Some features, such as real-time scheduling, nice(1), quotas, and processor sets, are part of the basic Solaris system.

Solaris Bandwidth Manager is a co-packaged software package, dynamic system domains are features of the Sun Enterprise 10000 system platform, and dynamic reconfiguration is a feature of the Sun Enterprise system platform.

All of these components offer types of resource management, but each differs from Solaris Resource Manager capabilities in some way.

Differences Between Solaris Resource Manager and Similar Products

The Solaris Resource Manager product is related to many other software components that might be present in the system, but it does not replace any of them.

Solaris Resource Manager on Sun Cluster 3.0 Update Environments

The Sun Cluster software environment provides high availability (HA) support for data services and parallel database access on a cluster of servers. Sun Cluster prevents loss of service in the event of a single-point failure through hardware redundancy, hardware and software failure detection, failover of applications, and automatic restart of data services. Sun Cluster software includes a cluster framework and support for a set of HA agents. Sun Cluster also includes an application programming interface (API) that can be used to create HA applications and to integrate them with the Sun Cluster framework.

All Solaris Resource Manager features for controlling system resources are supported in the Sun Cluster environment. You can install Solaris Resource Manager on any valid Sun Cluster topology, on two-node or greater-than-two-node clusters. See Configuring Solaris Resource Manager in Sun Cluster 3.0 Update Environments for configuration information.

For tips on installing Solaris Resource Manager in Sun Cluster 3.0 Update Environments, see the Solaris Resource Manager 1.3 System Installation Guide.