User Tools

Site Tools


aix:workloadmanager

This is an old revision of the document!


Worload Manager to limit processes

AIX wokload manager can be used to limit processes usage (CPU, IO, and memory)

processes are classified by user, process name, ….

Then rules are applied to each class

Some classes exists by default, but you can create additional, for example for DB2, Oracle….

root@prod /root> wlmcntrl -q
WLM is stopped

root@prod /root> wlmcntrl -a

root@prod /root> wlmcntrl -q
WLM is running

root@prod /root> wlmstat -a
         CLASS    CPU    MEM   DKIO
  Unclassified   0.00  20.54   0.00
     Unmanaged   0.00   9.04   0.00
       Default   2.25   4.38   0.00
        Shared   0.00   0.76   0.00
        System   1.12   2.41   0.35
         TOTAL   3.37  28.09   0.35

Check your process class

root@prod /root> ps -ae -o pid,user,class,args
     PID     USER CLASS        COMMAND
       1     root Unclassified /etc/init
 2949328     root Unclassified /usr/sbin/syncd 60
 3211498     root Unclassified /usr/ccs/bin/shlap64
 3801296     root Unclassified /usr/lib/errdemon
 4653308     root Unclassified /usr/sbin/portmap
 4849858     root Unclassified /usr/sbin/snmpd
 7209188     root System       /usr/sbin/smbd -D
 7274732   nobody System       /usr/sbin/smbd -D
 7340260     root System       /opt/rsct/bin/rmcd -a IBM.LPCommands -r -S 1500
 7405804     root System       [trspoolm]
 7471338     root System       ./mflm_manager
 7602278      ek  Default      CONS3
 7667888      ew  Default      TH
 7733346      ek  Default      THC
 7798796     root System       /opt/rsct/bin/IBM.MgmtDomainRMd
 7864420     root System       /opt/rsct/bin/IBM.ServiceRMd
 7929868     root System       /opt/rsct/bin/IBM.HostRMd

Switch in WLM in to active mode. Active means monitor and possibly controlling class resource (if you assign shares):

wlmctrl -a Alternatively, start in passive mode (monitor only and no possibility of changing the behavior):

wlmctrl -p Create four new classes for RDBMS, Batch, Backup and remote user connection application: A simple edit to the test file as the root user: /etc/wlm/current/classes Name the class and specify how AIX can decide which processes are in which class. A simple way is to name the AIX user that starts the workload programs. Alternatives, are using user groups or the directories that contain the binary program files. Once a process is in a class, the default setting is for all processes it creates are in the same class.

Tell AIX WLM to reevaluate (“u” for update) the classes file: wlmcntrl -u

  1. a

Starts WLM in active mode or switches from passive to active mode. This is the default when no flag other than -d, -g, or -T is specified.

  1. c

Starts WLM in processor-only mode or switches from any mode to processor-only mode. In this mode, the WLM accounts for all resources, but only processor resource is regulated.

  1. d Config_dir

Uses /etc/wlm/Config_dir as an alternate directory for the WLM configuration (containing the classes, limits, shares and rules files) or configuration set (containing the list of configurations

          and the time tanges when they apply). This makes /etc/wlm/Config_dir the current configuration. This flag is effective when starting the WLM in active, processor-only or passive mode, or when
          updating the WLM. This flag cannot be used in conjunction with the -o and -q flags or when switching from a mode (among active, processor-only and passive) to another.
     -g
          Instructs WLM to ignore any potential resource set bindings. This means that all classes have access to the whole resource set of the system, regardless of whether or not they use a restricted
          resource set.
  1. o

Stops Workload Manager.

  1. p

Start WLM in passive mode or switches from any mode to passive mode. In this mode, the WLM accounts for all resources, but no resource is regulated.

  1. q
aix/workloadmanager.1690189348.txt.gz · Last modified: 2023/07/24 11:02 by manu