I made a dashboard I started it with 30 seconds update interval. The problem is that It's a big CPU consumer (SYSVUSER STC). Is there a way to analyze it to see how can I improve it ? (I used ACTSUM instead of ACTIVITY ,SELECTNEXT instead of SELECT, LINELIMIT Etc')
Environment
Release: Component: SYSVW
Resolution
The LISTLOG CPU time accounting does not factor in the fact that the DASHBOARD actually instantiates another SYSVIEW session under the covers. The CPU time displayed in LISTLOG is basically only for the re-display of data. The CPU time consumed in the other instantiated SYSVIEW session is not accounted for in that message.
Each time you run a DASHBOARD you can see AUDITLOG records created for session logon and session logoff. Those records would give you better idea of how much CPU is being consumed by that dashboard. Further, the session logoff records breakout the CPU time by command. You can see which commands are the most CPU intensive in this report. For example:
Section: Command Execution
Command SubCmd Count Pct% CPUTime EnclTime ePct% zSwitch Comp ASADMIN 2 3% 0.062469 0.004752 7.61% 436 BASE END 1 1% 0.000021 0.000005 23.81% 2 BASE FEATURES 1 1% 0.001656 0.000401 24.21% 28 BASE FIELDS 4 5% 0.002324 0.001168 50.26% 10 BASE FLUSH 4 5% 0.000591 0.000020 3.38% 10 BASE LIBVIEW 1 1% 0.177892 0.003561 2.00% 157 BASE LISTNPC 1 1% 0.001344 0.000641 47.69% 8 BASE RETURN 4 5% 0.000079 0.000019 24.05% 8 BASE RXDISP 1 1% 0.004980 0.000801 16.08% 46 BASE SELECT 1 1% 0.000169 0.000147 86.98% 2 BASE SORT 1 1% 0.000054 0.000006 11.11% 2 BASE TERMINAT 1 1% BASE XVEXTRAC 56 72% 0.036638 0.002078 5.67% 338 BASE
Reviewing you dashboard member I see this command:
COMMAND JOBSUM &VLMC,,,,,0.50
The above command will return you all jobs on spool using more than 0.5% of spool. If you have several jobs (thousands, for example) on spool, this command could be causing you a great deal of CPU.
This command as well could be causing high CPU if there is a large number of jobs on spool:
COMMAND RXDISP UNIQFLDS OUTCLASS 'JJOBQUE &VLMC
Those two commands are the most obvious ones.
Also, another tool you can use. You can issue SET SHOWCPU ON in SYSVIEW, and SYSVIEW will overlay the date field on the screen with the amount of CPU the last command consumed. You can use this as a tool to see how much CPU a command is taking interactively to better determine if the command is costing you too much CPU.