Your SlideShare is downloading. ×
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Managing Your DB2 for z/OS Workloads Using WLM
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Managing Your DB2 for z/OS Workloads Using WLM

2,953

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,953
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
212
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 02/24/10 Systems & Technology Group Managing Your DB2 for z/OS Workloads Using WLM v Glenn Anderson IBM Technical Training grander@us.ibm.com © 2010 IBM Corporation z/OS Workload Manager (WLM) • A contract between the installation and the z/OS operating system • Installation – Classifies work running on z/OS in distinct Service Classes – Defines goals that express the expectation of how work should perform • WLM – Uses goal definitions to manage work across all systems of a sysplex (c) Copyright IBM Corporation 2010 1
  • 2. 02/24/10 Service definition structure Service Definition Service Policy NORMAL CLASSIFICATION SERVICE RULES CLASSES Service Policy TEST1 APPC I WEB SERVICE CICS LDAP IMS CB CLASSES JES DB2 STC DDF TSO OMVS Service definition workload types tasks in APPC interactive TSO initiators WebSphere App users Server Trans ASCH Linux in TSO CB CICS transaction LPARs programs SYSH CICS started Sysplex tasks parallel DB2 STC WORKLOAD DB2 requests Comm Server work Identify your DB2 DDF TCP DDF requests workload(s) and categorize IMS forked and OMVS them IMS transaction spawned USS programs programs NETV IWEB HTTP server NetView, system requests automation tasks MQ JES MQSeries LDAP JES2, JES3 Workflow batch jobs LDAP Server operations work (c) Copyright IBM Corporation 2010 2
  • 3. 02/24/10 Classification rules WebSphere Filters or qualifiers IMS CICS Subsystem type SERVICE REPORT TSO CLASS CLASS Userid Transaction name TSOPRID TSORPT Unix JES job class Account Info CICSPROD MFG21 Source LU Name CICSTST Batch ......... TSODEV TSORP5 TSOPRD1 APPC DB2 Example of a service class Service Class: TSOPRD Description: Normal TSO Work Workload: TSO Service Goal: Performance Period:1 Response Time: 80% AT 1.0s Importance: 3 Duration: 800 Performance Period:2 Discretionary (c) Copyright IBM Corporation 2010 3
  • 4. 02/24/10 Service definition hierarchy SERVICE DEFINITION CLASSIFICATION RULES SERVICE POLICY SERVICE POLICY "NORMAL" "WKND" WORKLOAD WORKLOAD WORKLOAD WORKLOAD WORKLOAD WORKLOAD "PROD" "WKND" SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE SERVICE CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS CLASS "TSOPROD" "TSOPROD" PERIOD PERIOD GOAL 1 GOAL 3 PERIOD PERIOD GOAL 2 GOAL 4 Goal types Service Class Name ________________ Service Class Name _______________ Description _______________________ Description ______________________ DUR IMP DESCRIPTION DUR IMP DESCRIPTION 1 500 2 AVG Response .5 sec 1 500K 2 VELOCITY 45 2 3 AVG Response 2.0 sec 2 3 VELOCITY 25 Average Response Type Velocity Service Class Name ________________ Service Class Name _______________ Description _______________________ Description ______________________ DUR IMP DESCRIPTION DUR IMP DESCRIPTION 1 500 2 95% complete within 1 sec 1 5000 2 AVG Response 4 sec 2 3 50% complete within 10 sec 2 Discretionary Percentile Response Time Discretionary (c) Copyright IBM Corporation 2010 4
  • 5. 02/24/10 What is a WLM transaction? • A WLM transaction represents a WLM "unit of work" – Basic workload entity for which WLM collects a resource usage value – Foundation for statistics presented in workload activity report – Represents a single subsystem "work request" • Subsystems can implement one of three transaction types – Address Space: • WLM transaction measures all resource used by a subsystem request in a single address space • Used by JES (a batch job), TSO (a TSO command), OMVS (a process), STC (a started task) and ASCH (single APPC program) – Enclave: • Enclave created and destroyed by subsystem for each work request • WLM transaction measures resources used by a single subsystem request across multiple address spaces and systems • Exploited by "new workload" subsystems - Component Broker (WebSphere), DB2, DDF, IWEB, MQSeries, LDAP, NETV, TCP – CICS/IMS Transactions • Neither address space or enclave oriented - special type • WLM transaction measures resource used by a single CICS/IMS transaction program request Response time goals • Average Response Time Goal – Defines the average transaction response time for all ended transactions – Example: Average response time = 1 second Average Sum of elapsed time for ended transactions* Response Number of ended transactions* Time • Percentile Response Time Goal – Defines the number of transactions ending with a response time lower than or equal to the time value – Example: Goal = 80% < 2 sec Percentile No. of transactions ended with time<= goal* Response Number of ended transactions* Time *Measured in a given interval (c) Copyright IBM Corporation 2010 5
  • 6. 02/24/10 Velocity goals • I/O management option is selected, via the ISPF Service Coefficients Options menu Transaction Flow • Delayed I/O requests CPU I/O DELAY CPU IDLE I/O queued by goal 3 4 4 2 5 2 achievement, not DP • I/O Using – Includes non-paging Sampling times DASD I/O only – Device connect Measurement interval • I/O Delay – IOS queue (CPU Using + I/O Using) x 100 – Subchannel pending Velocity – CU queue CPU Using + I/O Using + WLM Delay* 11 x 100 = ------------- = 73% 11 + 4 *Delay = CPU Delay + I/O Delay + Paging Delay + Swapping Delay + MPL Delay Goal type: Discretionary WLM-defined Goal Type to run the work and apply resources only when there are resources left over. • Discretionary Workload receives resources from: – Higher importance work – Overachieving its goal if giving resources will not cause goals to be missed • Runs in lowest MTTW dispatching priority • Always last period in a service class (c) Copyright IBM Corporation 2010 6
  • 7. 02/24/10 Service Class with Multiple Periods Response time and Velocity measures PERIOD 1 DP TRX 70% in 3 sec Working Set IMP=2 WLM I/O Qing DUR=2000 MPL PERIOD 2 10 sec avg The DURation value defines IMP=3 period length in service units DUR=5000 Each period can use different goals, goal types, and importance PERIOD 3 Not supported for CICS and VEL=10 IMS transactions IMP=4 Importance • Importance is relevant when system SYSTEM is overloaded SYSSTC • WLM uses it to decide which 1 - HIGHEST workload goals are most important to 2 – HIGH satisfy • Generally importance decreases 3 - MED across multiple periods 4 - LOW PERIOD 1 PERIOD 2 PERIOD 3 5 - LOWEST DUR=800 DUR=3K Discretionary DISCRETIONARY R/T=0.5 sec R/T=4 sec SYSOTHER IMP=1 IMP=3 Workload Importance (c) Copyright IBM Corporation 2010 7
  • 8. 02/24/10 System goals and dispatching priority WLM-defined Goal Types that are 'FF' 255 SYSTEM automatically assigned to certain types of workload recognized by 'FE' 254 SYSSTC WLM. • SYSTEM 'FD' 253 SYSSTC – z/OS system address spaces created at IPL. 'FC' 252 – Highest dispatching priority. used for Policy • SYSSTC importance Adjustment 1 to 5 Range – You assign important STCs 'D0' 208 – Second highest dispatching priority. 'CF' 207 • SYSOTHER Unused – Catcher for forgotten subsystem 'CA' 202 definitions. 'C9' 201 – Same as discretionary. Lowest Discretionary dispatching priority. 'C0' 192 'BF' 191 Quiesce The WLM View Address Spaces, and the transactions inside Enclave SRB CICS/IMS tran transactions transactions Enclave SRB CICS/IMS tran Enclave SRB CICS/IMS tran Enclave SRB CICS/IMS tran transactions transactions STCHI STCHI STC STC Vel = 50% rules Vel = 50% rules Imp=1 Imp=1 (c) Copyright IBM Corporation 2010 8
  • 9. 02/24/10 Classify DB2 Address Spaces Step 1: SYSTEM SYSSTC Classify the DB2 Address Spaces 1 - HIGHEST as Started Tasks Default 2 - HIGH Service 3 - MED Assign to an STC Classes Service Class with 4 - LOW appropriate Velocity 5 - LOWEST Goal and Importance DISCRETIONARY SYSOTHER WLM: Four Types of DB2 Work DB2 work that originates in another local subsystem DDF work requests Queries that DB2 creates by splitting a single, larger query and distributing it to other systems in a Parallel Sysplex DB2 Stored Procedure request (c) Copyright IBM Corporation 2010 9
  • 10. 02/24/10 #1 – Local Attach PC TOR AOR DB2 IMS Q PC CTL MPR DB2 Q DB2 SQL activity runs under dispatchable unit of invoker IMS,CICS, TSO, Batch, etc. Inherited classification class of invoker Priority and management of home unit Service attributed back to invoker #2 - Enclaves for DDF Work Represents a business unit of work Is managed separately from the address space Can include preemptible SRBs and TCBs Can span multiple address spaces Can have many enclaves in a single address space DB2 exploits the WLM Enclave interfaces (c) Copyright IBM Corporation 2010 10
  • 11. 02/24/10 Enclave Services: A Dispatching Unit Standard dispatching dispatchable units (DUs) are the TCB and the SRB TCB runs at dispatching priority of address space and is pre-emptible SRB runs at supervisory priority and is non-pre-emptible Advanced dispatching units Enclave Anchor for an address space-independent transaction managed by WLM Can comprise multiple DUs (TCBs and Enclave SRBs) executing across multiple address spaces Client SRB Created and executed like an ordinary SRB but runs with client (scheduler) dispatching priority and is pre-emptible Enclave SRB Created and executed like an ordinary SRB but runs with Enclave dispatching priority and is pre-emptible Enclave Services enable a workload manager to create and control enclaves DDF and Enclave SRBs ssnmDIST (DDF) Enclave SRB DDF production requests PC-call to DBM1 Create Enclave Schedule SRB DDFPROD DDF PC-call to DBM1 rules RT=85%, DDF default 2s requests Enclave SRB Imp=1 SMF 72 non-swappable DDFDEF STCHI RT=5s avg STC Vel = 50% Imp=3 rules SMF 72 Imp=1 SMF 30 SMF 72 (c) Copyright IBM Corporation 2010 11
  • 12. 02/24/10 DDF Work Classification Attributes Attribute Type Description Accounting Information AI Can be passed from a DB2 Client via Client Information APIs DB2 Connect assigns application program name by default but application can set via Correlation Information CI Client Information APIs Collection name of the first SQL package accessed by the DRDA requester in the unit of Collection Name CN work Connection Type CT Always 'DIST ' for DDF server threads Package Name PK Name of the first DB2 package accessed by the DRDA requester in the unit of work Plan Name PN Always 'DISTSERV' for DDF server threads accessed via DRDA requesters Procedure Name PR Name of the procedure called as the first request in the unit of work Process Name PC Client application name by default but can be set via Client Information APIs Subsystem Collection Name SSC Usually the DB2 data sharing group name Subsystem Instance SI DB2 server's MVS subsystem name Sysplex Name PX Name assigned to sysplex at IPL Userid UI DDF server thread's primary AUTHID #3 - Sysplex Query Parallelism Host 1 Host 2 Host 3 DU DU DU DU DU DU DU DU DU DU DU DU IO IO IO IO IO IO IO IO IO IO IO IO Classification of originator doesn’t change Classification of participants is under “DB2” rules (c) Copyright IBM Corporation 2010 12
  • 13. 02/24/10 Sysplex Query Parallelism Supports BI applications and complex queries DB2 query can be split across parallel sysplex Requires DB2 data sharing Classification of originator doesn't change Classification of participants is under 'DB2' rules Classification attributes inherited from originator Accounting is done on the system where enclave runs Each remote piece starts in 1st period #4 - DB2 Stored Procedures and WLM Application Environments DB2 Subsystem WLM Work Queue Application XYZ SQL work DB2 Stored Procedures Enclave Process "CALL" Application ABC DB2 Stored Procedures Stored proc TCB joins enclave of the caller (c) Copyright IBM Corporation 2010 13
  • 14. 02/24/10 WLM managed DB2 stored procedures Application Environment • Stored Procedures run in WLM managed server SQL regions in an application Distributed environment • Distributed requests (DDF) – DBM1 processes SQL request under existing Enclave DDF • Local requests (CICS, Stored Procedure A/S's batch) – DBM1 creates a Application Environment dependent Enclave Local SQL • DBM1 inserts work request into WLM work queue • Available task in server region selects the request and processes it under the Enclave ssnmDBM1 Stored Procedures and Enclaves Task Creates dependent enclave Continuation of transaction CHARLIE DB2DIST DB2DBM1 SPAS CHARLIE Enclave C query Enclave A query result result Enclave B enclave SRB Task Listens for requests coming from outside of the system Creates independent enclave Schedules enclave SRB (c) Copyright IBM Corporation 2010 14
  • 15. 02/24/10 Application environment example 1 Transactions 2 Work manager creates or re-uses enclave 4 Work manager builds a work reach work request and inserts it with manager 3 WLM uses classification rules to assign a the enclave information into service class to a newly created enclave. a WLM work queue Work Manager Subsystem AE1 (= queueing manager) Server address spaces x x y = SCFAST y z = SCSLOW SC = SCFAST z x AE1 y AE1 Server address spaces 5 WLM manages z AE1 one queue per SC per AE SC = SCSLOW WLM PROCLIB AE1 PROCS1 6 WLM starts server WLM CDS PROCS1 AE2 PROCS2 PROCS2 address spaces to meet Definition service class goal Application environment definition • Specification of the server address space's procedure name and its parameters – Blank procedure name implies that server address spaces are manually managed • Limits for server address spaces by subsystem instance – Do not confuse this with application environment limits that the subsystem might allow you to specify Create an Application Environment Application Environment . . . WLMENV2_________________________ Required Description . . . . . . . . . Large Stored Proc Env. Subsystem Type . . . . . . . . DB2 Procedure Name . . . . . . . . DSN1WLM Start Parameters . . . . . . . DB2SSN=DB2A,NUMTCB=2,APPLENV=WLMENV2 ________________________________________ ___________________________________ Limit on starting server address spaces for a subsystem instance: Select one of the following options. 1 1. Multiple server address spaces are allowed. 2. Only 1 server address space per MVS system is allowed. (c) Copyright IBM Corporation 2010 15
  • 16. 02/24/10 SYSIBM.SYSROUTINES and WLM Appl Env’s HTTP / Servlet / EJB / DB2 Flow CICS/IMS client DP does not flow; CICS / J2EE application server IMS Service Class set-up WEB EJB takes over HTTP CONTAINER CONTAINER TCP/IP Transport WebApp P xxx Handler (Servlet) EJB JDBC DB2 transaction classified enclave into (DP) service class (c) Copyright IBM Corporation 2010 16
  • 17. 02/24/10 WLM: Four Types of DB2 Work DB2 work that originates in another local subsystem DDF work requests Queries that DB2 creates by splitting a single, larger query and distributing it to other systems in a Parallel Sysplex DB2 Stored Procedure request (c) Copyright IBM Corporation 2010 17

×