WLM monitors and regulates the resource utilization, on a per-class basis, of the threads and processes active on the system. You can set minimum or maximum limits per class for each resource type managed by WLM, as well as a target value per class for each resource . This target is representative of the amount of the resource that is optimal for the jobs in the class.
The shares and limits at the superclass level refer to the total amount of each resource available on the system. At the subclass level, shares and limits refer to the amount of each resource made available to the superclass that the subclass is in (superclass target). The hierarchy of classes is a way to divide the system resources between groups of users (superclasses) and delegate the administration of this share of the resources to superclass administrators. Each superclass administrator can then redistribute this amount of resources between the users in the group by creating subclasses and defining resource entitlements for these subclasses.
WLM manages three types of resources:
|CPU utilization of the threads in a class||This is the sum of all the CPU cycles consumed by every thread in the class.|
|Physical memory utilization for the processes in a class||This is the sum of all the memory pages which belong to the processes in the class.|
|Disk I/O bandwidth for the class||This is the bandwidth (in 512-byte blocks per second) of all the I/Os started by threads in the class on each disk device accessed by the class.|
Every second, WLM calculates the per-class utilization for each resource during the last second, as a percentage of the total resource available, as follows:
To get more accurate and reliable percentages of per-class disk utilization, WLM uses the statistics provided by the disk drivers (displayed using the iostat command) giving for each disk device the percentage of time that the device has been busy during the last second. WLM counts the number of total blocks which have been read or written on a device during the last second by all the classes accessing the device, and how many blocks have been read or written by each class and what was the percentage of utilization of the device. WLM then calculates the percentage of the disk throughput consumed by each class
For instance, if the total number of blocks read or written during the last second was 1000 and the device had been 70% busy, this means that a class reading or writing 100 blocks used 7% of the disk bandwidth. Similarly to the CPU time (another renewable resource), the values used by WLM for its disk I/O regulation are also a decayed average over a few seconds of these per second percentages.
For the disk I/O resource, the shares and limits apply to each disk device individually accessed by the class. The regulation is done independently for each device. This means that a class could be over its entitlement on one device, and the I/Os to this device will be regulated while it is under its entitlement on another disk and the I/Os to this other device will not be constrained.
The target for use of different resource types is specified by shares. The shares are specified as relative amounts of usage between different classes. If unspecified, the default share is 1. One way of thinking about shares is as a self-adapting percentage.
For example, a system has three defined classes, A, B, and C, whose targets are 50, 30 and 20, respectively.
In this example, the sum of the shares for the three classes was 100 simply to make the sample calculation easier. Target shares can be any number between 1 and 65535.
The preceding example supposes that:
The relative share numbers of a subclass and a superclass, of two subclasses of different superclasses, or of classes in different tiers do not give any indication of their relative resource entitlements.
The shares are used by WLM to calculate a percentage goal of resource utilization of each resource type in each class. This goal represents a percentage of resources that can vary widely depending on how many classes are active at any given time. However, WLM makes sure that the dynamic value of this percentage goal remains compatible with the minimum and maximum values for the class. If the calculated percentage is below the minimum, WLM uses the minimum as the target. If the percentage is above the maximum range, WLM uses the maximum as the target. If the percentage is between the minimum and maximum, WLM uses the calculated value.
The shares number can be specified as a hyphen ('-') for any resource type to indicate that the class's resource utilization for this resource type is not regulated by WLM. This is the default when no shares value has been specified for a resource type. This default is different from the default value of 1 share in the first version of WLM. Shares numbers can remain at their default value for the System class, but it is safer to set up specific shares values for the Default class.
The shares are specified, per class, for all the resource types. Shares are specified in stanzas of the shares file. For example:
shares classname: CPU = 2 memory = 4 diskIO = 3
The different resources can be limited by the following values:
Resource limit values are specified in the resource limit file by resource type within stanzas for each class. The limits are specified as a minimum to soft maximum range, separated by a hyphen (-) with white space ignored. The hard maximum when specified follows the soft maximum, and is separated by a semi-colon (;). Each limit value is followed by a percent sign (%).
The following are the only constraints that WLM places on resource limit values:
When a class with a hard memory limit has reached this limit and requests more pages, the VMM page replacement algorithm (LRU) is initiated and "steals" pages from the limited class, thereby lowering its number of pages below the hard maximum, before handing out new pages. This behavior is correct, but extra paging activity, which can take place even where there are plenty of free pages available, impacts the general performance of the system. Minimum memory limits for other classes are recommended before imposing a hard memory maximum for any class.
The constraint of the sum of the minimum limits within a tier being less than or equal to 100 means that a class in the highest priority tier is always allowed to get resources up to its minimum limit. WLM does not guarantee that the class will actually reach its minimum limit. This depends on how the processes in the class use their resources and on other limits that are in effect. For example, a class might not reach its minimum CPU entitlement because it cannot get enough memory.
For physical memory, setting a minimum memory limit provides some protection for the memory pages of the class's processes (at least for those in the highest priority tier). A class should not have pages stolen when it is below its minimum limit unless all the active classes are below their minimum limit and one of them requests more pages. A class in the highest tier should never have pages stolen when it is below its minimum. Setting a memory minimum limits for a class of interactive jobs helps make sure that their pages will not all have been stolen between consecutive activations (even when memory is tight) and improves response time.
Limits are specified for all resource types, per class, in stanzas of the limits file. For example:
shares classname: CPU = 0%-50%;80% memory = 10%-30%;50%
In this example, no limits are set for disk I/O. Using the system defaults, this translates to the following:
diskIO = 0%-100%;100%
Before AIX 5.1, the default value for unspecified WLM resource shares was one. Beginning with AIX 5.1, the default value is hyphen (-), which means that the resource consumption of the class for this resource is not regulated by WLM. System administrators should review their existing configurations to ensure that new default is appropriate for their classes, or if the default should be reset to 1 or to a different explicit value for some of the classes. For more information on setting user-defined defaults, see shares in the in AIX 5L Version 5.1 Files Reference.
Earlier versions of WLM only had a maximum limit, which was a "soft" limit for CPU and a "hard" limit for memory. Limits specified with the min%-max% format have the max interpreted as a softmax for CPU and a hardmax for memory. For limits that are set with AIX 5.1 or later, all interfaces except direct file editing either convert all existing data to the new format or create new limits with the new format. Administrators using text editing must manually convert the limits file.
The disk I/O resource is available in AIX 5.1 and later, so when activating WLM with configuration files from an earlier version, the values for the shares and the limits are set to default values. The system defaults are:
For WLM configurations previous to AIX 5.1, the disk I/O resource is not regulated by WLM and the class behaves as it normally does for your earlier version.