Solaris Resource Manager 1.3 System Administration Guide

Workload Configuration

The key to effective resource management using Solaris Resource Manager is a well-designed resource hierarchy. Solaris Resource Manager uses the lnode tree to implement the resource hierarchy.

Mapping the Workload to the Lnode Hierarchy

Each node in the lnode tree maps to a UID in the password map, which means that workloads must be mapped to align with entries in the password map. In some cases, additional users may need to be created to cater to the leaf nodes in the hierarchy. These special users do not actually run processes or jobs, but act as an administration point for the leaf node.

A Simple Flat Hierarchy

This simple hierarchy was constructed to control the processing resources of two users, Chuck and Mark. Both of these users consume large amounts of CPU resources at various points, and thus affect one other at different times during the day.

To resolve this, a single-level hierarchy is constructed, and equal shares of CPU are allocated to each user.

Figure 2-1 A Simple Flat Solaris Resource Manager Hierarchy

Diagram shows an example flat hierarchy where each user gets 50 CPU shares out of 100 shares.

This simple hierarchy is established using the limadm command to make Chuck and Mark children of the root share group:

# limadm set sgroup=root chuck
# limadm set sgroup=root mark

To allocate 50 percent of the resources to each user, give each user the same number of CPU shares. (For simplicity, in this example 50 shares have been allocated to each user, but allocating 1 share to each would achieve the same result.) The limadm command is used to allocate the shares:

# limadm set cpu.shares=50 chuck
# limadm set cpu.shares=50 mark

Use the liminfo command to view the changes to the lnode associated with Chuck:

# liminfo -c chuck
Login name:                  chuck       Uid (Real,Eff):         2001 (-,-)     
Sgroup (uid):             root (0)       Gid (Real,Eff):          200 (-,-)     

Shares:                         50       Myshares:                        1     
Share:                          41 %     E-share:                         0 %   
Usage:                           0       Accrued usage:                   0     

Mem usage:                       0 B     Term usage:                     0s     
Mem limit:                       0 B     Term accrue:                    0s     
Proc mem limit:                  0 B     Term limit:                     0s     
Mem accrue:                      0 B.s 

Processes:                       0       Current logins:                  0     
Process limit:                   0     

Last used: Tue Oct 4 15:04:20 1998
Directory: /users/chuck
Name:       Hungry user     
Shell:      /bin/csh     

Flags:

The fields displayed by the liminfo command are explained in A Typical Application Server. Also refer to the liminfo(1SRM) man page for more information on liminfo fields.