User Tools

Site Tools


aix:workloadmanager

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
aix:workloadmanager [2023/07/24 11:02]
manu
aix:workloadmanager [2024/04/08 18:01] (current)
manu
Line 8: Line 8:
  
 Some classes exists by default, but you can create additional, for example for DB2, Oracle.... Some classes exists by default, but you can create additional, for example for DB2, Oracle....
 +
 +WLM definitions are stored into /etc/wlm/, you can use **smit wlm**
 +
 +{{:​aix:​aix_wlm01.png|}}
 +
 +Before applying a workload, try it in passive mode, and check the load on each class
 +<cli prompt='>'>​
 +root@prod /root> wlmcntrl -p
 +</​cli>​
 +
 +Watch using wlmstat
 +<cli prompt='>'>​
 +root@prod /root> wlmstat
 +         ​CLASS ​   CPU    MEM   DKIO
 +  Unclassified ​  ​0.00 ​  ​0.18 ​  0.00
 +     ​Unmanaged ​  ​0.01 ​ 26.58   0.00
 +       ​Default ​  ​1.18 ​ 50.09   2.13
 +        Shared ​  ​0.00 ​  ​7.18 ​  0.00
 +        System ​  ​0.66 ​ 34.50   3.69
 +         ​TOTAL ​  ​1.84 ​ 91.95   5.82
 +</​cli>​
  
 <cli prompt='>'>​ <cli prompt='>'>​
Line 18: Line 39:
 WLM is running WLM is running
  
-root@prod /root> wlmstat ​-a+root@prod /root> wlmstat
          ​CLASS ​   CPU    MEM   DKIO          ​CLASS ​   CPU    MEM   DKIO
   Unclassified ​  ​0.00 ​ 20.54   0.00   Unclassified ​  ​0.00 ​ 20.54   0.00
Line 26: Line 47:
         System ​  ​1.12 ​  ​2.41 ​  0.35         System ​  ​1.12 ​  ​2.41 ​  0.35
          ​TOTAL ​  ​3.37 ​ 28.09   0.35          ​TOTAL ​  ​3.37 ​ 28.09   0.35
 +</​cli>​
 +
 +<cli prompt='>'>​
 +root@prod /root> lsclass -f
 +System:
 +        memorymin = 1
 +Default:
 +Shared: ​
 +</​cli>​
 +
 +To monitor you can also use:
 +  wlmstat 3 100
 +  nmon (then option W)
 +  topas
 +  ​
 +<cli prompt='>'>​
 +root@prod /root> topas –W
 +Topas Monitor for host: srv-aix-001nterval:​ 2      Fri Apr 17 09:08:56 2015
 +WLM-Class (Passive) ​            ​CPU% ​     Mem%     ​Blk-I/​O%
 +clBP1                        24.70     ​30.67 ​        1.31
 +System ​                         0.59     ​34.76 ​        0.00
 +clPX6                        10.12     ​14.86 ​        0.00
 +Default ​                        ​0.03 ​     4.48         0.00
 +Unmanaged ​                      ​0.01 ​    ​26.58 ​        0.00
 +Shared ​                         0.00      7.18         0.00
 +Unclassified ​                   0.00      0.18         0.00
 </​cli>​ </​cli>​
  
 Check your process class Check your process class
 <cli prompt='>'>​ <cli prompt='>'>​
-root@prod /root> ps -ae -o pid,​user,​class,​args +root@prod /root> ps -ae -o pid,​user,​class,​args,pcpu,vsz 
-     ​PID ​    USER CLASS        COMMAND +     ​PID ​    USER CLASS        COMMAND ​                          %CPU   ​VSZ ​                                                                                     ​ 
-       ​1 ​    ​root ​Unclassified ​/etc/init +       ​1 ​    ​root ​System ​      /​etc/​init ​                        0.0   ​804 ​                                                                                                                 
- 2949328 ​    root Unclassified ​/​usr/​sbin/​syncd 60 +  ​590300 ​    root System ​      /​usr/​sbin/​syncd 60                ​0.0 ​  ​596 ​                                                                                                                 
- 3211498 ​    root Unclassified ​/​usr/​ccs/​bin/​shlap64 + 2621880 ​    root System ​      /​usr/​ccs/​bin/​shlap64 ​             ​0.0 ​  ​392 ​                                                                                                                 
- 3801296 ​    root Unclassified ​/​usr/​lib/​errdemon + 3867110 ​    root System ​      /​usr/​lib/​errdemon ​                0.0   ​928 ​                                                                                                                 
- 4653308 ​    root Unclassified ​/usr/sbin/portmap + 4325632 ​    root System ​      /usr/sbin/srcmstr ​                ​0.0 ​  ​816 ​                                                                                                                 
- 4849858 ​    root Unclassified ​/usr/sbin/snmpd + 5570884 ​    root Default ​     iostat -Dsal 60 1                 ​0.0 ​  ​844 ​                                                                                                                 
- 7209188 ​    root System ​      /​usr/​sbin/​smbd -+ ​5636536 ​    root System ​      /usr/sbin/xntpd                   ​0.0 ​  ​388 ​                                                                                                                 
- ​7274732 ​  ​nobody ​System ​      /​usr/​sbin/​smbd -D + 5833142 ​    root System ​      /​usr/​sbin/​syslogd ​-r -n           ​0.0 ​  ​820                                                                                                                  
- 7340260 ​    root System ​      /opt/rsct/bin/rmcd -a IBM.LPCommands -r -S 1500 + ​5898680 ​    ​root ​System ​      /​usr/​sbin/​portmap ​                ​2.0 ​ 1004                                                                                                                  
- 7405804 ​    root System ​      [trspoolm] + 5964220 ​    root System ​      /usr/sbin/aso                     ​0.0 ​ 1396                                                                                                                  
- 7471338 ​    root System ​      ./​mflm_manager + ​6029626 ​     mqm Default ​     sshd: mqm@pts/1                   0.1  1188                                                                                                                  
- ​7602278 ​     ek  Default ​     CONS3 + 6095302 ​    root System ​      /​usr/​sbin/​biod 6                  0.0   ​120 ​                                                                                                                 
- ​7667888 ​     ew  Default ​     TH + 6423002 ​    root System ​      /​usr/​sbin/​pfcdaemon ​              0. 1172                                                                                                                  
- ​7733346 ​     ek  Default ​     THC + 6488524 ​    root System ​      /usr/sbin/nfsrgyd ​                3.0  1352                                                                                                                  
- 7798796 ​    root System ​      /opt/rsct/bin/IBM.MgmtDomainRMd + 6816036 ​    root System ​      /​opt/​rsct/​bin/​IBM.DRMd            0.0  1696                                                                                                                  
- 7864420 ​    root System ​      /​opt/​rsct/​bin/​IBM.ServiceRMd + 6881784 ​    root System ​      /usr/sbin/sshd                    0.0  1196                                                                                                                 
- 7929868 ​    root System ​      /opt/rsct/bin/IBM.HostRMd+
 </​cli>​ </​cli>​
  
 +Print memory in MB
 +<cli prompt='>'>​
 +root@prod /root> ps -ae -o pid,​user,​class,​pcpu,​vsz,​args | awk '​{$5=int(100 * $5/​1024)/​100"​MB";​}{ print;​}'​
 +PID USER CLASS %CPU 0MB COMMAND
 +1 root System 0.0 0.8MB /etc/init
 +2884068 root System 0.0 0.58MB /​usr/​sbin/​syncd 60
 +3342724 root System 0.0 0.38MB /​usr/​ccs/​bin/​shlap64
 +3604962 root System 0.0 0.9MB /​usr/​lib/​errdemon
 +</​cli>​
 +
 +<​code>​
 Switch in WLM in to active mode. Active means monitor and possibly controlling class resource (if you assign shares): Switch in WLM in to active mode. Active means monitor and possibly controlling class resource (if you assign shares):
  
Line 82: Line 139:
             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.             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.
        -q        -q
 +</​code>​
 +
 +List classes and limits class
 +<cli prompt='>'>​
 +root@prod /root> lsclass -C
 +#​name:​description:​tier:​inheritance:​authuser:​authgroup:​adminuser:​admingroup:​rset:​CPUshares:​CPUmin:​CPUsoftmax:​CPUhardmax:​memoryshares:​memorymin:​memorysoftmax:​memoryhardmax:​diskIOshares:​diskIOmin:​diskIOsoftmax:​diskIOhardmax:​totalCPUhardmax:​totalCPUunit:​totalDiskIOhardmax:​totalDiskIOunit:​totalConnecttimehardmax:​totalConnecttimeunit:​totalProcesseshardmax:​totalThreadshardmax:​totalLoginshardmax:​classRealMem:​classRealMemunit:​classVirtMem:​classVirtMemunit:​classLargePages:​classLargePagesunit:​procVirtMem:​procVirtMemunit:​localshm:​vmenforce:​delshm:​iopriority
 +System::​0:​no::::::​-:​0:​100:​100:​-:​1:​100:​100:​-:​0:​100:​100:​-:​s:​-:​KB:​-:​s:​-:​-:​-:​-:​MB:​-:​MB:​-:​MB:​-:​MB:​no:​proc:​no:​0
 +Default::​0:​no::::::​-:​0:​100:​100:​-:​0:​100:​100:​-:​0:​100:​100:​-:​s:​-:​KB:​-:​s:​-:​-:​-:​-:​MB:​-:​MB:​-:​MB:​-:​MB:​no:​proc:​no:​0
 +Shared::​0:​no::::::​-:​0:​100:​100:​-:​0:​100:​100:​-:​0:​100:​100:​-:​s:​-:​KB:​-:​s:​-:​-:​-:​-:​MB:​-:​MB:​-:​MB:​-:​MB:​no:​proc:​no:​0
 +</​cli>​
 +
 +Commands to manage classes: mkclass, chclass, rmclass ...
 +
 +^Command^ Description^ Usage^
 +|mkclass |Creates a WLM class|mkclass <class name> ; mkclass -a inheritance=yes -a localshm =yes <class name>|
 +|wlmassign |Assigns a process to a WLM class |wlmassign <class name> <process id>|
 +|lsclass |Returns the list of superclasses |lsclass|
 +|wlmcheck |Checks WLM settings |wlmcheck|
 +|rmclass |Removes a WLM class |rmclass <class name>|
 +|wlmcntrl -p |Starts WLM in passive mode|wlmcntrl -p|
 +|wlmcntrl -a |Starts WLM in active mode |wlmcntrl -a|
 +|wlmcntrl -o |Stops WLM |wlmcntr -o|
 +|wlmcntrl -u |Update WLM (refresh after modifications) |wlmcntr -u|
 +
 +===== Monitoring =====
 +
 +Multiple tools to monitor WLM
 +
 +Here example of the class **app1**
 +<cli prompt='>'>​
 +[p630n02][/​work]>​ acctcom -w | grep app1
 +prog1 user1 app1.Default pts/2 12:02:48 12:05:22 154.12 144.55 10008.00
 +prog1 user1 app1.Default pts/2 12:05:42 12:07:19 97.16 111.80 7705.00
 +prog1 user1 app1.Default pts/2 12:09:27 12:10:04 37.20 32.22 4370.00
 +prog1 user1 app1.Default pts/2 12:10:14 12:14:42 268.50 233.17 10256.00
 +prog1 user1 app1.Default pts/2 12:17:51 12:20:45 174.62 250.88 13296.00
 +</​cli>​
 +
 +<cli prompt='>'>​
 +[p630n02][/​work]>​ acctcom -c app1
 +COMMAND START END REAL CPU MEAN
 +NAME USER TTYNAME TIME TIME (SECS) (SECS) SIZE(K)
 +prog1 user1 pts/2 12:02:48 12:05:22 154.12 144.55 10008.00
 +prog1 user1 pts/2 12:05:42 12:07:19 97.16 111.80 7705.00
 +prog1 user1 pts/2 12:09:27 12:10:04 37.20 32.22 4370.00
 +prog1 user1 pts/2 12:10:14 12:14:42 268.50 233.17 10256.00
 +</​cli>​
 +
 +Topas
 +<cli prompt='>'>​
 +[p630n02][/​work]>​ topas -W
 +Topas Monitor for host: p630n02 Interval: 2 Mon Oct 25 15:13:04
 +2004
 +WLM-Class (Passive) CPU% Mem% Disk-I/O%
 +app1                  47    1         0
 +app2                  23    0         0
 +app3                  12   ​55 ​        0
 +System ​                ​0 ​   7         0
 +Shared ​                ​0 ​   1         0
 +Default ​               0    0         0
 +Unmanaged ​             0   ​14 ​        0
 +Unclassified ​          ​0 ​   0         0
 +</​cli>​
 +
 +wlmstat
 +<cli prompt='>'>​
 +p630n02][/​etc/​wlm/​current]>​ wlmstat
 +CLASS       CPU MEM DKIO
 +Unmanaged ​    ​0 ​ 14    0
 +Default ​      ​0 ​  ​0 ​   0
 +Shared ​       0   ​1 ​   0
 +System ​       0   ​7 ​   0
 +app1         ​44 ​  ​1 ​   0
 +app2         ​22 ​  ​0 ​   0
 +app3          8  55    0
 +TOTAL        74  64    0
 +</​cli>​
 +
 +<cli prompt='>'>​
 +[p630n02][/​etc/​wlm/​current]>​ wlmstat -Svc
 +CLASS tr i #pr CPU sha min smx hmx des rap urap pri
 +Unmanaged 0 0 0 0 -1 0 100 100 100 100 0 10
 +Default 0 0 0 0 -1 0 100 100 100 100 0 0
 +Shared 0 0 0 0 -1 0 100 100 100 100 0 0
 +System 0 0 80 0 -1 0 100 100 100 100 0 0
 +app1 0 1 2 43 -1 0 100 100 100 100 0 0
 +app2 0 1 2 19 -1 0 100 100 100 100 0 0
 +app3 0 1 1 06 -1 0 100 100 100 100 0 0
 +</​cli>​
 +
 +===== Example of config =====
 +
 +<cli prompt='>'>​
 +root@aixtest /​etc/​wlm/​current>​ cat /​etc/​wlm/​current/​classes
 +System:
 +
 +Default:
 +
 +splunk:
 +        inheritance = "​yes"​
 +        authuser = "​splunk"​
 +
 +root@aixtest /​etc/​wlm/​current>​ cat /​etc/​wlm/​current/​limits
 +System:
 +        memory = 1%-100%;​100%
 +splunk:
 +        CPU    = 0%-10%;10%
 +
 +root@aixtest /​etc/​wlm/​current>​ cat /​etc/​wlm/​current/​rules
 +* class resvd user group application type tag
 +splunk ​  ​- ​   splunk -    -           ​- ​  -
 +System ​  ​- ​   root   ​- ​   -           ​- ​  -
 +Default ​ -    -      -    -           ​- ​  -
 +
 +root@aixtest /​etc/​wlm/​current>​ cat /​etc/​wlm/​current/​shares
 +* IBM_PROLOG_BEGIN_TAG
 +</​cli>​
  
aix/workloadmanager.1690189348.txt.gz · Last modified: 2023/07/24 11:02 by manu