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.
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.