1 / 55

Work Management Basics

Introduction to System i for Computer Professionals. Work Management Basics. Module 7. Module Objectives. After completing this module, you should be able to: Describe the objective of work management Describe job/thread Describe what a subsystem is and its relationship to a job

feinstein
Download Presentation

Work Management Basics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to System i for Computer Professionals Work Management Basics Module 7

  2. Module Objectives After completing this module, you should be able to: • Describe the objective of work management • Describe job/thread • Describe what a subsystem is and its relationship to a job • Describe the difference between memory pools and auxiliary storage pools • Define a subsystem description and the information it contains • Describe CL commands that are used to work with work management

  3. Why? • Objective of System i Work Management • Manage tasks: • Prioritize • Improve response time • Improve system throughput • Allocate resources: • Processor cycles • Memory • Need to know? • Better manage System i system • Manage tasks: • Status • Problem determination • Prerequisite for performance tuning

  4. Why? Understand how the system functions • Who is using the system? • User name • Initial • Current • What are they doing? • Objects in use • Programs • Data files • Type of applications • Host-centric • Client/server applications • How does "work" come into the system? • What "subsystems" are active • May be indicative of application software • Local/remote users • Job characteristics? • Batch job queue execution • Where is the output? • Spooled files • Logging and so forth

  5. Overview • Unit of work • Job/thread • Execution priority • Work environments • Subsystems • Allocation of system resources • Work entries • Online transaction processing • Client • Character-based applications ("5250") • "Host-centric" applications • Batch processing • Output queue • Printed reports • Job states/transitions • Job description • Definition of characteristics • System i caches • Read/write cache • Expert cache

  6. Job-1 Job-2 Job-3 Job-4 Job# Thread#1 Thread#n Job/Thread (1 of 3) • Thread • A unit of work managed by the System i • Allocates system resources • Processor cycles • Execution priority • Job • Single-threaded job • Multi-threaded job • Each thread is an independent task-stream • Parent thread • Child threads • User request • Mouse-click/Enter button • Interacts with application thread • Dispatched or managed separately • Assigned processor cycles

  7. Job/Thread (2 of 3) Right-click

  8. Job/Thread (3 of 3)

  9. Subsystems • Predefined execution environment: • Separation of workload: • Reduces resource contention • System resource allocation • Workflow management • System i system contains several subsystems: • Subsystem description (object type *SBSD) • Defined by IBM: • Controlling subsystem • QBASE • QCTL • QINTER • QBATCH • QSERVER • QSYSWRK • QCMN • QSPL and so forth • User defined: • <any-name>

  10. Machine Pool User Defined Pools *BASE Memory Pools • Logical subdivisions of main storage • Shared pools • Shared by multiple subsystems • MACHINE • Used for system activity • *BASE • *INTERACT • SPOOL • *SHRPOOL1-n • Private pools • Assigned to a specific subsystem • Not shared across subsystems • Up to 64 memory pools • Different from Auxiliary Storage Pools (ASP) • Different from Independent Auxiliary Storage Pools (IASP) • Subdivision of disk space • Grouped by disk drives • Optional

  11. Task-1 Task-2 Task-n Subsystem Pool #1 =*BASE Subsystem Pool #2 =*SHRPOOL1 Subsystem Pool #3 Size=200MB Activity=10 Subsystem Information • Qualified object name • Library name • Subsystem name • Object type *SBSD • Activity level • Controls maximum active tasks • "Throttle" mechanism • Pool allocation • Pool name • Multiple pools • Number within subsystem • Shared pool • Shared pool ID • Private pool • Size • Maximum active tasks

  12. Work Entries (1 of 2) Defines origin of tasks to be processed in a subsystem • Autostart job entries • Started when subsystem is started • Work station name entries • Specifies supported 5250 workstations • Job queue entries • Non-interactive batch jobs • Communications entries • Communications jobs • Prestart job entries • Started prior to requested work • Servers for client requests

  13. auto Work Entries (2 of 2) Job Queue Background Processing (Batch jobs) job-3 job-2 OLTP or "Interactive" (5250 Workstation sessions) job-1 interactive batch Subsystem Comm prestart OLTP or "Interactive" (Client sessions)

  14. *JOBQ QBATCH APPLIC01 APPLIC02 Queued Jobs *SBSD QBATCH Executing Executing Jobs Job Queue Entries Subsystem description: QBATCH Seq Job Max ---------Max by Priority---------- Nbr Queue Library Active 1 2 3 4 5 6 7 8 9 10 QBATCH QGPL 3 * * * * * * * * * 20 APPLIC01 QGPL 1 * * * * * * * * * 50 APPLIC02 QGPL 2 * * * * * * * * *

  15. Routing Data Job Pool#2 Pool#3 Pool#4 Routing Entries • Routing entry specification • Determines execution environment • Memory pool • Execution class (DSPCLS) • Run priority • Time slice • Task Dispatch Queue (TDQ) • Single TDQ • Processor time assigned to task • Based on • Run priority of task • Processor affinity ABCXYZ Opt Seq Nbr Program Library Compare Value 0001 QCMD QSYS XYZ 5 0005 QCMD QSYS ABCXYZ 9999 QCMD QSYS *ANY Pool identifier . . . . . . . . . : 1 Class..................................:QINTER Priority . . . . . . . . . : 20 Timeslice................:2000

  16. Printer File Definition Application Output Queue Spool File CRTOUTQ Printer Writer Report Printer Device Description STRPRTWTR or STRRMTWTR CRTDEVPRT Output Queues • Spooled printed output • Entry in Output Queue per report • Data in system "spool" area • WRKOUTQ • Work with Output Queues • iSeries Navigator • Work Management • Output queues

  17. Job States Three job states • Active: In activity level and in storage pool • Job is active • Not necessarily actively processing • Wait: Voluntarily out of activity level • Waiting for resources to be ready • Ineligible: Ready to process but no activity level • Unable to secure activity level • Had to leave activity level on time slice end

  18. (W-I) Inelig. State Activity Level Activity Level Free? Wait State Job Transition N (A-I) Y Time Slice End ineligible Queue long wait (A-W) Processor Enter key or mouse click Wait Queue (active jobs)

  19. Task-1 1 3 2 Task-2 Task-3 Activity Levels 2 1 Memory Flow of Work } Task Dispatch Queue (systemwide) 5250 Client/Server Batch 1-way processor Requests Work Entries Priority Processor Cycles OUTQ Entries Output Queue Subsystem Subsystem Subsystem

  20. Dynamic Priority Scheduling • QDYNPTYSCD system value • 1= dynamic priority scheduling (default) • 0= fixed priority scheduling • Delay-cost algorithm • Waiting increases "cost" • "Costly" tasks have dispatch priority • Avoids CPU monopolization • Ensures CPU cycles for low priority tasks • Penalizes tasks with high CPU use • Uses priority groups • High priority (0) • Fixed priority (1-9 and 90-99) • Dynamic priority • Band I (10-16) • Band II (17-22) • Band III (23-35) • Band IV (36-46) • Band V (47-51) • Band VI (52-89)

  21. Exceeds CPU& I/O limits.... Task Penalized Dynamic Priority Scheduling high cost pty=10 pty=17 pty=23 pty=16 pty=36 pty=22 pty=35 pty=46 low cost

  22. L1 L2 L3 Memory IOP cache Cache Architecture • Read cache • Disk arm buffers • Multiple records "pre-fetched" • Write cache • "Staged" writes (versus write buffer) • Increases Arm utilization efficiency • Data integrity • Non-volatile write cache • Battery support • Dual copy Processor(s)

  23. OLTP Batch Database Non-Database Expert Cache • Extension of Storage Management architecture • Enhances I/O performance • Reduces disk I/O • Dynamically manages I/O and memory • Provides caching within pools • Usually "like jobs" in a pool • Improves main memory utilization • Automatic adjustment of storage pool page management • Intelligently controls size of data reads • Manages DB pages in memory • "Hot data" retention • "Sweeps" memory pages to disk • Selectable option on the WRKSYSSTS screen • *Fixed = No Expert Cache function • *Calc = Expert Cache selected Pool #2-64

  24. SETOBJACC • Allows selected objects to be "pegged" in memory • Reduces I/O • Easily specified • Define separate pool • Private or shared pools • Clear pool (CLRPOOL) • Run SETOBJACC • Requires knowledge of "hot spots" • Programs, database files, and so forth • Avoid "deleted records" in files • Increases memory requirements • Protects objects from "demand paging" activity

  25. Expert Cache Shrpool-1 Expert Cache Shrpool-2 Expert Cache Shrpool-3 Performance Adjustment • Main Storage Pool Management option • Controlled by system value QPFRADJ • User managed • 0=No Adjustment • System managed • 1=At IPL only • 2=At IPL and automatic • 3=Automatic only • Additional tuning parameters • Used with QPFRADJ=1,2,3 • For shared memory pools • Maximum/minimum sizes • Priority (importance) of pools QPFRADJ

  26. Proc-4 Proc-3 Proc-2 Proc-1 Memory System i I/O Parallelism QQRYDEGREE system value • =*IO • Multiple I/O tasks

  27. Proc-4 Proc-3 Proc-2 Proc-1 Memory System i Parallelism (1 of 2) QQRYDEGREE system value • =*OPTIMIZE • Multiple I/O and SMP tasks • Requires DB/2 SMP feature • #2698 • Shares memory

  28. Proc-4 Proc-3 Proc-2 Proc-1 Memory System i Parallelism (2 of 2) QQRYDEGREE system value • =*MAX • Similar to *OPTIMIZE • Multiple I/O and SMP tasks • Requires DB/2 SMP feature • #2698 • Plus • Uses available memory

  29. Performance Adjustment and Parallelism via GUI

  30. Performance Adjustment via GUI

  31. Parallelism via GUI

  32. Working with Work Management

  33. What is running? • Active jobs by subsystem • Name • Job • User • Job number • Number of threads • Type of job • Interactive or Online Transaction Processing (OLTP) • "5250 datastream" • Server • Responding to client requests • Batch • Non-interactive • No ongoing interactions with job initiator • Runtime information • Memory pool • Execution priority • CPU usage

  34. Active Jobs

  35. Customize View

  36. WRKACTJOB Work with Active Jobs TEAMLPR3 03/18/XX 11:44:46 CPU %: .6 Elapsed time: 00:00:04 Active jobs: 149 Type options, press Enter. 2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message 8=Work with spooled files 13=Disconnect ... --------Elapsed--------- Opt Subsystem/Job Type Pool Pty CPU Int Rsp AuxIO CPU % QBATCH SBS 2 0 .0 0 .0 QCMN SBS 2 0 .4 0 .0 QCTL SBS 2 0 .4 0 .0 QSYSSCD BCH 2 10 .4 0 .0 QINTER SBS 2 0 .3 0 .0 QPADEV0003 INT 3 20 .2 1 .0 12 .4 QSERVER SBS 2 0 .4 0 .0 QPWFSERVSD BCH 2 20 .2 0 .0 QPWFSERVSO PJ 2 20 .3 0 .0 More... Parameters or command ===> F3=Exit F5=Refresh F7=Find F10=Restart statistics F11=Display thread data F12=Cancel F23=More options F24=More keys

  37. Work with Active Jobs TEAMLPR3 03/18/XX 11:44:46 CPU %: .6 Elapsed time: 00:00:04 Active jobs: 149 Type options, press Enter. 2=Change 3=Hold 4=End 5=Work with 6=Release 7=Display message 8=Work with spooled files 13=Disconnect ... Opt Subsystem/Job User Number Type CPU % Threads QBATCH QSYS 001255 SBS .0 1 QCMN QSYS 001258 SBS .0 1 QCTL QSYS 001230 SBS .0 1 QSYSSCD QPGMR 001248 BCH .0 1 QINTER QSYS 001249 SBS .0 1 QPADEV0003 TONI 001993 INT .4 1 QSERVER QSYS 001241 SBS .0 1 QPWFSERVSD QUSER 001283 BCH .0 1 QPWFSERVSO QUSER 001410 PJ .0 1 More... Parameters or command ===> F3=Exit F5=Refresh F7=Find F10=Restart statistics F11=Display status F12=Cancel F17=Top F18=Bottom F23=More options F24=More keys WRKACTJOB

  38. Memory Pools

  39. WRKSYSSTS (1 of 5) • Overall CPU utilization % • Disk information • Total disk capacity for use • Total in system ASP • Space (%) utilized in system ASP • Memory allocation • Size • Activity level • Memory faults/second • Expert cache • Job transitions • Active-Wait • Wait-Ineligible • Active-Ineligible

  40. WRKSYSSTS (2 of 5) Work with System Status TEAMLPR3 03/18/XX 14:27:03 % CPU used . . . . . . . : 13.7 Auxiliary storage: % DB capability . . . . : .0 System ASP . . . . . . : 262.8 G Elapsed time . . . . . . : 00:00:01 % system ASP used . . : 81.7227 Jobs in system . . . . . : 210 Total . . . . . . . . : 262.8 G % perm addresses . . . . : .007 Current unprotect used : 1851 M % temp addresses . . . . : .010 Maximum unprotect . . : 1851 M Type changes (if allowed), press Enter. System Pool Reserved Max -----DB----- ---Non-DB--- Pool Size (M) Size (M) Active Fault Pages Fault Pages 1 655.20 78.80 +++++ .0 .0 1.7 1.7 2 235.42 .92 109 .0 .0 .0 .0 3 101.14 .00 39 .0 .0 4.3 10.4 4 .25 .00 5 .0 .0 .0 .0 Bottom F11=Display transition data F14=Work with subsystems F15=Work with active jobs F16=Work with disk status F24=More keys

  41. WRKSYSSTS (3 of 5) Transition Data Work with System Status TEAMLPR3 03/18/XX 14:41:51 % CPU used . . . . . . . : .5 Auxiliary storage: % DB capability . . . . : .0 System ASP . . . . . . : 262.8 G Elapsed time . . . . . . : 00:14:49 % system ASP used . . : 81.7229 Jobs in system . . . . . : 211 Total . . . . . . . . : 262.8 G % perm addresses . . . . : .007 Current unprotect used : 1851 M % temp addresses . . . . : .010 Maximum unprotect . . : 1860 M Type changes (if allowed), press Enter. System Pool Reserved Max Active-> Wait-> Active-> Pool Size (M) Size (M) Active Wait Inel Inel 1 655.20 78.81 +++++ 8.6 .0 .0 2 235.42 .99 109 469.6 .0 .0 3 101.14 .00 39 .7 .0 .0 4 .25 .00 5 .0 .0 .0 Bottom F11=Display pool data F14=Work with subsystems F15=Work with active jobs F16=Work with disk status F21=Select assistance level F24=More keys

  42. WRKSYSSTS (4 of 5) Work with System Status TEAMLPR3 03/18/XX 14:41:51 % CPU used . . . . . . . : .5 Auxiliary storage: % DB capability . . . . : .0 System ASP . . . . . . : 262.8 G Elapsed time . . . . . . : 00:14:49 % system ASP used . . : 81.7229 Jobs in system . . . . . : 211 Total . . . . . . . . : 262.8 G % perm addresses . . . . : .007 Current unprotect used : 1851 M % temp addresses . . . . : .010 Maximum unprotect . . : 1860 M Type changes (if allowed), press Enter. System Pool Reserved Max Pool Size (M) Size (M) Active Pool Subsystem Library 1 655.20 78.81 +++++ *MACHINE 2 235.42 .99 109 *BASE 3 101.14 .00 39 *INTERACT 4 .25 .00 5 *SPOOL Bottom Command ===> F11=Display paging option F14=Work with subsystems F15=Work with active jobs F16=Work with disk status F24=More keys Pool Data

  43. WRKSYSSTS (5 of 5) Work with System Status TEAMLPR3 03/18/XX 14:41:51 % CPU used . . . . . . . : .5 Auxiliary storage: % DB capability . . . . : .0 System ASP . . . . . . : 262.8 G Elapsed time . . . . . . : 00:14:49 % system ASP used . . : 81.7229 Jobs in system . . . . . : 211 Total . . . . . . . . : 262.8 G % perm addresses . . . . : .007 Current unprotect used : 1851 M % temp addresses . . . . : .010 Maximum unprotect . . : 1860 M Type changes (if allowed), press Enter. System Pool Reserved Max Paging Pool Size (M) Size (M) Active Option 1 655.20 78.81 +++++ *FIXED 2 235.42 .99 109 *FIXED 3 101.14 .00 39 *FIXED 4 .25 .00 5 *FIXED Bottom Command ===> F3=Exit F4=Prompt F5=Refresh F9=Retrieve F10=Restart F12=Cancel F19=Extended system status F24=More keys Paging Option

  44. Shared Pools

  45. WRKSHRPOOL (1 of 2) Work with Shared Pools System: TEAMLPR3 Main storage size (M) . : 992.03 Type changes (if allowed), press Enter. Defined Max Allocated Pool -Paging Option-- Pool Size (M) Active Size (M) ID Defined Current *MACHINE 655.20 +++++ 655.20 1 *FIXED *FIXED *BASE 235.42 109 235.42 2 *FIXED *FIXED *INTERACT 101.14 39 101.14 3 *FIXED *FIXED *SPOOL .25 5 .25 4 *FIXED *FIXED *SHRPOOL1 .00 0 *FIXED *SHRPOOL2 .00 0 *FIXED *SHRPOOL3 .00 0 *FIXED *SHRPOOL4 .00 0 *FIXED *SHRPOOL5 .00 0 *FIXED *SHRPOOL6 .00 0 *FIXED More... Command ===> F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display tuning data F12=Cancel

  46. Work with Shared Pools System: TEAMLPR3 Main storage size (M) . : 992.03 Type changes (if allowed), press Enter. -----Size %----- -----Faults/Second------ Pool Priority Minimum Maximum Minimum Thread Maximum *MACHINE 1 11.69 100 10.00 .00 10.00 *BASE 1 10.16 100 5.00 .50 200 *INTERACT 2 5.00 100 10.00 2.00 100 *SPOOL 2 1.00 100 5.00 1.00 100 *SHRPOOL1 2 1.00 100 10.00 2.00 100 *SHRPOOL2 2 1.00 100 10.00 2.00 100 *SHRPOOL3 2 1.00 100 10.00 2.00 100 *SHRPOOL4 2 1.00 100 10.00 2.00 100 *SHRPOOL5 2 1.00 100 10.00 2.00 100 *SHRPOOL6 2 1.00 100 10.00 2.00 100 More... Command ===> F3=Exit F4=Prompt F5=Refresh F9=Retrieve F11=Display text F12=Cancel WRKSHRPOOL (2 of 2)

  47. Disk Drive Status (1 of 2) Displays current disk status • Hardware information: • Bus • IOP name • Disk drive model: • Capacity per disk drive (user) • Configuration information: • ASP allocation • Device protection • Mirrored/RAID • Disk activity/usage: • Arm utilization % • Percentage used/free space

  48. Disk Drive Status (2 of 2)

  49. WRKDSKSTS (1 of 2) Work with Disk Status TEAMLPR3 03/18/XX 16:03:01 Elapsed time: 00:00:30 Size % I/O Request Read Write Read Write % Unit Type (M) Used Rqs Size (K) Rqs Rqs (K) (K) Busy 1 6718 17548 93.8 .0 4.0 .0 .0 4.0 .0 0 2 6718 17548 92.8 .0 4.0 .0 .0 4.0 .0 0 3 6718 17548 92.8 .0 4.0 .0 .0 4.0 .0 0 4 6718 17548 92.6 .0 4.0 .0 .0 4.0 .0 0 5 6718 17548 92.5 .2 4.0 .0 .1 4.0 4.0 0 6 6718 17548 92.7 .1 15.0 .0 .0 4.0 48.0 0 7 6718 17548 92.7 .1 4.0 .0 .0 4.0 4.0 0 8 6718 17548 93.3 .0 4.0 .0 .0 4.0 .0 0 9 6718 17548 93.6 .0 4.0 .0 .0 4.0 .0 0 10 6718 17548 93.1 .4 5.6 .1 .2 4.0 6.6 0 11 6718 17548 93.5 .0 4.0 .0 .0 4.0 .0 0 12 6718 17548 93.3 .4 4.0 .2 .1 4.0 4.0 0 13 6718 17548 93.5 .4 4.0 .0 .4 4.0 4.0 0 More... F11=Display storage use F16=Work with system status F24=More keys

  50. Work with Disk Status XXXXXXXX 03/18/XX 16:08:26 Elapsed time: 00:00:00 --Protection-- Unit ASP Type Status Compression 1 1 DPY ACTIVE 2 1 DPY ACTIVE 3 1 DPY ACTIVE 4 1 DPY ACTIVE 5 1 DPY ACTIVE 6 1 DPY ACTIVE Bottom Command ===> F11=Display disk statistics F16=Work with system status F24=More keys WRKDSKSTS (2 of 2)

More Related