How To
Summary
The AIX Workload Manager ((WLM) feature groups running processes into classes to monitor workloads and optionally control them.
WLM is a powerful tool for the system administrator and is simple to set up.
Objective
👁 Nigels Banner
Environment
- Workload Manager (WLM) covered here and a core part of AIX
- Workload Partition Manager (WPAR Manager) an entirely different tool that is no longer available.
Steps
- Published in June 2001
- 350 pages
- Chapters: The need for WLM, functions, administration, performance tools, manual assignment, application programming interface, sizing with WLM, practical experience, and then a series of appendix.
- Many famous AIX technical people are named in the writers and contributors list. Amazingly, not my name but I covered WLM in technical conferences shortly after the book was released.
- Download: https://www.redbooks.ibm.com/redbooks/pdfs/sg245977.pdf
- From the AIX development team
- Lots of chapters and details. See the picture or go to the website
- There appear the are no differences between the manual pages for AIX version 7.1, 7.2, and 7.3.
- Download: https://www.ibm.com/docs/en/aix/7.3?topic=management-workload-manager
- You can also fine the manual pages for the WLM commands: wlmcntrl, wlmassign, wlmcheck, and wlmstat
- YouTube Video based on some of this article
- https://www.youtube.com/watch?v=YSZTeMzZ50Y
- The database itself,
- Incoming data transfer tools,
- Data transformation tacks,
- Batch processing at night,
- User tasks logging in remotely,
- Backup,
- And many more.
wlmctrl -a
wlmctrl -p
A simple edit to the test file as the root user: /etc/wlm/current/classes
wlmcntrl -u
$ wlmstat
CLASS CPU MEM DKIO
Unclassified 0.00 22.14 0.00
Unmanaged 0.00 11.49 0.00
Default 0.00 0.81 0.00
Shared 0.00 0.79 0.00
System 0.01 4.57 0.00
RDBMS 0.00 0.00 0.00
Batch 0.00 0.00 0.00
Backup 0.00 0.00 0.00
Users 0.00 0.00 0.00
TOTAL 0.01 28.31 0.00
wlmstat 3 100
nmon -f -s 60 -1440 -W
applications:
inheritance = "yes"
localshm = "yes"
adminuser = "nag"
- "application" is the name of the class
- inheritance = "yes"
Means any process that creates a subprocess has the new process added to the same class. - localshm = "yes"
Means process shared memory is counted as part of the class. - adminuser ="nag"
Means the user "nag" (that is my username) can add processes to this class. This option stops other users placing their processes in other peoples classes to avoid detection.
wlmassign applications 12345
wlmassign applications 67890
- or -
wlmassign applications 12345,67890
# Start 3 am batch
/usr/lbin/batchrunner mode6 all phase8
# batch process id = $$
wlmassign batch8 $$
In the graphs there are:
- CPU Consumed
- Showing the CPU utilisation percentages for each class.
- CPU Physical Consumed
- Showing the number of actual CPU cores being used.
- Memory Consumed
- Showing the memory-used percentages.
- Block I/O (BIO)
- It is disk I/O. Shows a percentage of the disk device throughput being used.
- Shares per class
- Used to limit the resources (CPU, memory, and BIO). A value of -1 means the resource control is off.
- Desired per class
- The WLM calculated target for resource control.
- Processes by class
- The number of processes in the class. A useful check that the class definitions are correct.
- State by class
- Shows the status, like Active or not.
Notes on Classes
There are two WLM standard useful special classes:
System classes:
- Operating system kernel internal processes get automatically added to the System class.
- Allows managing system resource usage but it is not recommended to actively manage this class.
- The UNIX CPU utilisation statistics are: User, System, Idle, and Wait for I/O. The System class matches the System Utilisation statistics.
- Note there are a few system classes - see the Redbooks: WLM for the full details.
Default:
- All user processes that not classified get add to Default.
- Allows managing unclassified jobs>
- Use Default for small bits & pieces.
- If this number becomes large, it is recommended that you investigate why? Create a class for these unexpected processes. For example, some shell program pointlessly spinning in a loop.
Shared, Unclassified, and Unmanaged Classes
- Shared covers shared memory pages that are not assigned to other classes.
- Unclassified and Unmanaged - see the AIX Workload Manager Redbook section 2.2 for details.
System administrators can create up to 270 more classes.
- The user ID that started the process
- The user group ID of the user that started the process
- The program name in the file system used to start the process
- The class is set to the class of the process, which started a subprocess that uses fork and exec system calls - this setting is called inheritance
- A user forcing a process into a class by that uses the AIX wlmassign command
Legend:
- "*" wildcard can be used for example /usr/local/bin/*
- "-" = all
- "!" = exclusion
After the classes are defined, start WLM or tell it to reapply the settings with: wlmcntrl -a
The following diagram shows for each class the CPU, memory, and disk I/O in monitored. The WLM tool does not consume many CPU cycles. But is useful for understanding the workloads.
Shares Example: Adding a Class
👁 WLM Shared are simpler than percentages
Example of share calculations:
- There are threes classes but a fourth class (blue) is required.
- With percentages, all other shares must be adjusted.
Note:
- Before a share is 1/14th = 7.14 %
- After a share is 1/17th = 5.88%
- Let the computer do that maths.
- WLM is quick and simple yielding a massive boost in understanding of the workloads = "non-brainer".
- WLM does not affect the performance or behavior of workloads.
- Aim for five to ten of classes for helpful clear graphs.
- WLM will quickly identify changes in workload over time and rogue processes that will need urgent investigation.
- Many system administrators monitor with WLM and stop there.
- To start proactive controlling with shares, require a clear objective:
- Ensure that high-priority classes get everything they need. For example, boosting the RDBMS.
- Ensure that low-priority classes get resources after the high-priority class have everything they want. For example, running the data load class, when nothing else needs the CPU.
- Use soft limits only.
- Reserve hard limits only for classes where soft limits do not work.
- Add shares to one class at a time. Changing shares is live and immediate: edit the configuration file and then run: wlmcntrl -a
- Many system administrators stop at just using WLM control for CPU resources.
- Do not control memory until controlling CPU with shares is working well.
- Warning: if you force a class with a low number of memory shares into paging, it can be a disaster. This paging and poor performance can happen even with unused memory in the server (virtual machine).
- Controlling Disk I/O is rare - the only way that it can achieve the wanted results is by postponing disk I/O for classes with low numbers of shares
Additional Information
Other places to find Nigel Griffiths IBM (retired)
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
08 June 2023
UID
ibm16587951
