Z/OS WLM: The Basics Every Performance Analyst Should Know

Transcription

3/6/2012SHARE in Atlanta, March 2012z/OS WLM: The Basics EveryPerformance Analyst Should KnowSession 10888Glenn Anderson, IBM Technical Training 2011 IBM Corporationz/OS Workload Manager (WLM) A contract between the installation and the z/OSoperating system Installation– Classifies work running on z/OS in distinct Service Classes– Defines goals that express the expectation of how workshould perform WLM– Uses goal definitions to manage work across all systems of asysplex through distribution of resources Copyright IBM Corporation 2012 Copyright IBM Corporation 20121

3/6/2012Service definition hierarchySERVICE DEFINITIONCLASSIFICATIONRULESSERVICE SSSERVICE ERIODGOAL TSOPROD"WORKLOAD"PROD"PERIODGOAL 3PERIODGOAL 4PERIODGOAL 2 Copyright IBM Corporation 2012Parallel Sysplex plus WLMWhat is DXCFWLMXCFWLMWLMCDSWLMCDS111211029843765 Copyright IBM Corporation 2012 Copyright IBM Corporation 20122

3/6/2012Service definition structureService DefinitionService Policy NORMALCLASSIFICATIONRULESSERVICECLASSESService Policy TEST1APPCCICSIMSJESSTCTSOI WEBLDAPCBDB2DDFOMVSSERVICECLASSES Copyright IBM Corporation 2012Service definition workload typesinteractive TSOusersWebSphere AppServer TransCBEWLMSTCDB2WORKLOADIdentify yourworkload(s)and categorizethemOMVSDDFIMSIWEBNETVNetView, systemautomation tasksCICS transactionprogramsCICSComm ServerzIIP enabled TCPIPSecforked andspawned USSprogramsASCHTSOzEnterprisePPM workstartedtaskstasks in DAP ServerworkSysplexparallel DB2requestsDB2 DDFrequestsIMStransactionprogramsHTTP serverrequestsJES2, JES3batch jobs Copyright IBM Corporation 2012 Copyright IBM Corporation 20123

3/6/2012Classification rulesWebSphereFilters or qualifiersIMSCICS SubsystemTSOtype Userid Transactionnamejob class Account Info Source LU Name. CSPRODCICSTSTTSODEVMFG21TSORP5TSOPRD1APPCDB2 Copyright IBM Corporation 2012Example of a service classService Class: TSOPRDDescription: Normal TSO WorkWorkload: TSOService Goal:Performance Period:1Response Time: 80% AT 1.0sImportance: 3Duration: 800Performance Period:2Discretionary Copyright IBM Corporation 2012 Copyright IBM Corporation 20124

3/6/2012The WLM Original ISPF application Copyright IBM Corporation 2012The WLM welcome screenFile -------------------------Command WWWWW W WWW WWWWLLLLLLLLLMMMM MMM M MMMMMLicensed Materials - Property of IBM5647-A01 (C) Copyright IBM Corp. 2001.All rights reserved.ENTER to continue Copyright IBM Corporation 2012 Copyright IBM Corporation 20125

3/6/2012Choose service definitionFile ------------------------Command .Choose Service DefinitionSelect one of the following options.11. Read saved definition2. Extract definition from WLMcouple data set3. Create new definition.ENTER to continue Copyright IBM Corporation 2012Service definition menuFile Utilities Notes Options -----------------------Functionality LEVEL001Definition MenuWLM Appl LEVEL013Command Definition data set. . : SYSADM1.WLMSRVC.DEFPDSDefinition name . . . . . myfirst1 (Required)Description . . . . . . . The very first definitionSelect one of thefollowing options. . . . .F1 HelpF2 SplitF3 Exit1.2.3.4.5.6.7.8.9.10.PoliciesWorkloadsResource GroupsService ClassesClassification GroupsClassification RulesReport ClassesService Coefficients/OptionsApplication EnvironmentsScheduling EnvironmentsF9 SwapF10 Menu BarF12 Cancel Copyright IBM Corporation 2012 Copyright IBM Corporation 20126

3/6/2012IBM z/OSMF Management Facilityz/OS application, browser accessz/OSBrowserHTTP(s) z/OSManagementFacilityapplicationz/OS Management Facility is a Web 2.0 application on z/OS Manages z/OS from z/OSBrowser communicates with z/OSMF via secure connection,anywhere, anytimeWorkload Management Task Overview Manage ServiceDefinitions: Create,modify, import, export,print, install servicedefinitionsManage Service Policiesfor Sysplex: Activate orview the service policies inthe service definition thatis currently installed in theWLM couple data setManage Settings:Specify history length,codepage, userpreferencesView Status for Sysplex:Displays information aboutthe service definitioninstalled in the WLMcouple data set and theservice policy active in thesysplex. Copyright IBM Corporation 20127

3/6/2012Editing Service Definitions Simplified creation,modification and review ofservice definitions Policy elements arepresented in tables Tables can befiltered and sorted Direct editing ofpolicy elementswithin tables Best-practice hintsare displayedautomatically whilespecifying policyelements Several servicedefinitions can beopenedsimultaneously Cut, Copy, Paste ofpolicy elementsbetween servicedefinitionsBest-practice hints help tooptimize service definitionsClick to copy elementon clipboard forinsertion into anotherservice definitionClick to checkwhere theelement is usedWLM Component EnvironmentOverviewz/OSMFWLMpluginCIM wnloadUpload,BackupImportExportMVSConsoleBatch InstallReadWriteInstallExtractBatch InstallReadWriteWLMWLMISPFISPFTablesTablesWLM Administrative ApplicationUser‘sworkstationz/OS system in Sysplexrunning z/OSMF Copyright IBM Corporation 2012Sysplex8

3/6/2012The structure of a service classA service class is build from the following characteristics: Performance Period Duration Goal Type and Setting––––Average Response TimeResponse Time and PercentileVelocityDiscretionary Importance Copyright IBM Corporation 2012What 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 singleaddress space Used by JES (a batch job), TSO (a TSO command), OMVS (a process), STC (astarted 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 acrossmultiple address spaces and systems Exploited by "new workload" subsystems - Component Broker (WebSphere), DB2,DDF, IWEB, MQ (Workflow), 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 programrequest Copyright IBM Corporation 2012 Copyright IBM Corporation 20129

3/6/2012Response time goals Average Response Time Goal– Defines the average transaction response time for all endedtransactions– Example: Average response time 1 secondAverageResponseTimeSum of elapsed time for ended transactions*Number of ended transactions* Percentile Response Time Goal– Defines the number of transactions ending with a response time lowerthan or equal to the time value– Example: Goal 90% 1 secPercentileResponseTimeNo. of transactions ended with time goal*Number of ended transactions**Measured in a given interval Copyright IBM Corporation 2012Velocity goalsTransaction FlowCPUI/ODELAYCPUIDLEI/O344252Sampling timesMeasurement interval(CPU Using I/O Using) x 100Velocity Delayed I/O requestsqueued by goalachievement, not DP I/O Using– Includes non-pagingDASD I/O only– Device connect I/O Delay– IOS queue– Subchannel pending– CU queueCPU Using I/O Using WLM Delay*11 x 100 ------------- 73%11 4*Delay CPU Delay I/O Delay Paging Delay MPL Delay A/S Delay Copyright IBM Corporation 2012 Copyright IBM Corporation 201210

3/6/2012Goal type: DiscretionaryWLM-defined Goal Type to run the work and apply resourcesonly 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 bemissed Runs in lowest MTTW dispatching priority Always last period in a service class Copyright IBM Corporation 2012Multiple periods and velocity goalsResponse time andVelocity measuresTRXPERIOD 170% in 1 secIMP 2WLMDUR 700PERIOD 25 sec avgIMP 3DUR 1500PERIOD 3VEL 10IMP 4DPWorking SetI/O QingMPL The DURation valuedefines period length inservice units Each period can usedifferent goals, goal types,and importance Not supported for CICSand IMS transactions Copyright IBM Corporation 2012 Copyright IBM Corporation 201211

3/6/2012ImportanceSYSTEMSYSSTC1 - HIGHEST2 – HIGH3 - MED4 - LOW5 - LOWESTDISCRETIONARYSYSOTHER Importance is relevant when systemis overloaded WLM uses it to decide whichworkload goals are most importantto satisfy Generally importance decreasesacross multiple periodsPERIOD 1PERIOD 2DUR 800DUR 3KR/T 0.5 secIMP 1R/T 4 secIMP 3PERIOD 3DiscretionaryWorkloadImportance Copyright IBM Corporation 2012System goals and dispatching priorityWLM-defined Goal Types that areautomatically assigned to certaintypes of workload recognized byWLM. SYSTEM– z/OS system address spacescreated at IPL.– Highest dispatching priority. SYSSTC– You assign important STCs– Second highest dispatchingpriority.used forimportance1 to 5 SYSOTHER– Catcher for forgotten subsystemdefinitions.– Same as discretionary. Lowestdispatching priority.'FF' 255 SYSTEM'FE' 254 SYSSTC'FD' 253 SYSSTC'FC' 252PolicyAdjustmentRange'D0' 208'CF' 207Unused'CA' 202'C9' 201Discretionary'C0' 192'BF' 191 Quiesce Copyright IBM Corporation 2012 Copyright IBM Corporation 201212

3/6/2012Goals: System-wide viewBATCHPRDLONGBATIMSDEVTSODEVVEL 25IMP 3AVG R/T:5 MINIMP 3JUNQUEVEL 50IMP 3TSOPROD90% in 1 secIMP 290% in 1 secIMP 170% in 4 secIMP 370% in 4 secIMP 2VEL 35IMP 4VEL 35IMP 3DISCRNRYIMP CICSNORCICSPROAVG R/T 0.150 sIMP 1VEL 50IMP 1SYSTEMGOALIMP CICSBIGSYSSTCAVG R/T 5 sIMP 1GOALIMP Copyright IBM Corporation 2012Typical goals (1 of 3)Typical Goals (1 of rtance80% within 1 second1500 280% within 10 seconds210000 2VEL 53380% within 1 second1400 2VEL 20210000 2VEL 2034BATPVEL 1513BATDEVVEL 1014/DBATNORAVG 1 min1200K 3VEL 1025TSODEVBATCHGoal Copyright IBM Corporation 2012 Copyright IBM Corporation 201213

3/6/2012Typical goals (2 of 3)Typical Goals (2 of 3)WorkloadCICSIMSDDFAPPCServiceClassCICSNOR90% within 0.2 second11CICSSPCL70% within 0.1 second11CICSLOWAverage 5 seconds11IMSNOR90% within 0.4 second11IMSHOT80% within 0.2 secs11IMSLOWAverage 5 seconds15DB1A70% within 0.5 second12000 3VEL 1023DB1BVEL 1013APP170% within 0.5 second11000 2VEL 2023GoalPeriodDurationImportance Copyright IBM Corporation 2012Typical goals (3 of 3)Typical Goals (3 of mportance80% within 0.5 second1500 2VEL 2023TRNMGRVEL50I1VEL 5011STCSTCHIVEL 4012STCMEDVEL 1513STCLOWVEL 515/D Copyright IBM Corporation 2012 Copyright IBM Corporation 201214

3/6/2012The classification LOGONMQrequestSubsystemTypesJ2EEapplicationDB2 systemSubsystemSubsystemService ClassWLMTransactionSubsystem33.26Report Class Copyright IBM Corporation 2012Getting to the classification rulesFileUtilitiesNotes ----------------------Definitions MenuDefinition data set . . :'SYSADM1.WLMSRVC.DEFPDS'Definition name . . . . .myfirst1Required)Description . . . . . . . . My first service definitionSelect one of thefollowing options . . .1. Policies2. Workloads3. Resource Groups4. Service Classes5. Classification Rules6. Classification Groups7. Report Classes8. Service Coefficients9. Application Environments10. Scheduling EnvironmentsCommand F1 Help F2 Split F3 Exit F9 Swap F10 Menu BarF12 Cancel Copyright IBM Corporation 2012 Copyright IBM Corporation 201215

3/6/2012Subsystem types used by classificationASCH1TSOEWLM 2 Subsystems follow oneof three transactiontype models Need to understandhow this affects thevalue of figures shownin workload activityreport3 CICS2 DB21STCTCPCB2122 DDFOMVS 132NETV22MQTransaction TypeAddress space1orientedEnclave 2CICS/IMS 31JES2LDAPIMSIWEBAllowable #PeriodsAllowable Goal TypesResponse TimeExecution VelocityDiscretionaryResponse TimeExecution VelocityDiscretionaryResponse TimeMultipleMultiple1 Copyright IBM Corporation 2012Workload qualifiers supported by WLM (1 of 2)ASCHAccountingInformation (AI)CB*DDFIIJWMEESSB* **DB2Connection Type (CT)* ** *CorrelationInformation (CI)* *Collection Name (CN)LU Name (LU)Netid (NET)Package Name (PK)Perform (PF)Plan Name (PN)Priority (PRI)Procedure Name (PR)Process Name (PC)*CICS* ********LS MF QMNETVOSMOVMSSTC** *TSOSYSH** ** ***** ****** ** Copyright IBM Corporation 2012 Copyright IBM Corporation 201216

3/6/2012Workload qualifiers supported by WLM (2 of 2)ASCHScheduling Environment Name (SE)Subsystem CollectionName (SSC)Subsystem Instance(SI)Subsystem Parameter(SPM)Sysplex Name (PX)System Name (SY)CBCICSDB2DDFIIWMESBJES*** **LS MF QMNETVOSMOVMSSTCTSOSYSH* * * * * * * * * ***** * * * * * * * * **Transaction Class/JobClass (TC)Transaction Name/JobName (TN)* *Userid (UI)* * * * * * * *** * * ** * ** ** * * * *** * ** ** * * * * * *** * * * * * Copyright IBM Corporation 2012Example of batch classification rulesIdentify workqualifier typesSubsystem typeSubsystemdefaultsSubsystem Type . : JESDescription . . . Batch classification Control AULTS: HABATCHDPAYROLLPAYROLLOptional reportclasses Copyright IBM Corporation 2012 Copyright IBM Corporation 201217

3/6/2012When Do the "OMVS" Classification Rules Apply?A"dub"TAny A/SCTSO/STC/BatchT pthreadPNotHereUNIXkernelsyscallPcreateNotHereT TTBBBP PROCESST TCBBAny A/SWLM A/S (BPXAS)PTforkspawnDJES InitiatorPTPTBPXBATCBexecHere*PTB*NotHereB Copyright IBM Corporation 2012Enclave Services: A Dispatching UnitStandard dispatchingdispatchable units (DUs) are the TCB and the SRBTCB runs at dispatching priority of address space and is pre-emptibleSRB runs at supervisory priority and is non-pre-emptibleAdvanced dispatching unitsEnclaveAnchor for an address space-independent transaction managed byWLMCan comprise multiple DUs (TCBs and Enclave SRBs) executingacross multiple address spacesEnclave SRBCreated and executed like an ordinary SRB but runs with Enclavedispatching priority and is pre-emptibleEnclave Services enable a workload manager to create andcontrol enclaves Copyright IBM Corporation 2012 Copyright IBM Corporation 201218

3/6/2012Enclave CharacteristicsCreated by an address space (the"owner")SYS1AS2AS1One address space can own manyenclavesOne enclave can include multipledispatchable units (SRBs/tasks)executing concurrently in multipleaddress spaces (the "participants")AS3EnclaveEnclaveEnclave SRBs are preemptible, like tasksAll its dispatchable units are managed as agroupT72Many enclaves can havedispatchable units running in oneparticipant address LAVE SRBRMF produces separate T72 SMFrecords for independent enclaves Copyright IBM Corporation 2012DDF and Enclave SRBsssnmDIST (DDF)Enclave SRBDDF productionrequestsPC-call to DBM1Create EnclaveSchedule SRBDDFPRODPC-call to DBM1DDF defaultrequestsDDFrulesRT 85%, 2sImp 1SMF 72Enclave SRBDDFDEFSTCrulesRT 5s avgImp 3STCHIVel 50%Imp 1SMF 72SMF 30SMF 72 Copyright IBM Corporation 2012 Copyright IBM Corporation 201219

3/6/2012WebSphere App Server Use of EnclavesWAS on z/OS transactions, arriving at the Control Region,each run in an enclave that is classified under the "CB" rules.The controlregion queueswork to WLM.JCL StartProcedureJCLz/OS systemconsoleControllerRegionWLMJCL Start JCLProcedureWLM starts servant regionaddress spaces based onWLM ApplEnvJ J2EEprogramApplicationEnvironmentServant Region #1JJJJava Virtual MachineServant Region #nJJJJava Virtual Machine Copyright IBM Corporation 2012WLM Managed DB2 Stored ProceduresApplication EnvironmentSQLDistributedStored Procedures run inWLM managed serverregions in an applicationenvironmentDistributed requests (DDF)DBM1 processes SQLrequest under existingEnclaveDDFStored ProcedureA/S'sApplication EnvironmentSQLLocalLocal requests (CICS,batch)DBM1 creates a dependentEnclaveDBM1 inserts workrequest into WLM workqueuessnmDBM1Available task in serverregion selects the requestand processes it under theEnclave Copyright IBM Corporation 2012 Copyright IBM Corporation 201220

3/6/2012Execution Delay Monitoring ServicesAllows you to assigns goals to the transaction andlet the system determine which work managersneed the resources to meet these goalsInfrastructure that allows WLM to assign resources for addressspaces based on the behavior of the transactions beingserviced by themExploited by complex work managers, that do not allow WLM toindividually manage resource consumption of the transactionsWork managers can report their own view of transaction statesExploiting subsystemsCICSIMS Copyright IBM Corporation 2012CICS / IMS Transactional Goal ManagementCICS/IMS RegiontransactionCICS productionrequeststransactionUse of CICS orIMS classificationrules is optionaltransactionCICS defaultrequestsCICS rulestransactionHOTTRANRT 95%, .1sImp 1SMF 72MEDTRANSTCrulesRT 3s avgImp 3STCHIVel 50%Imp 1SMF 72SMF 30SMF 72 Copyright IBM Corporation 2012 Copyright IBM Corporation 201221

3/6/2012Manage Region Using Goals Of.STC ClassificationRulesManage RegionUsing Goals Of- REGION- TRANSACTION Copyright IBM Corporation 2012Performance indexService Classmisses its Goal!Meeting GoalService Classmisses its Goal!1Exceeding GoalNot Meeting Goal0100PerformanceIndex (PI)Ratio of goal performanceto actual performance Separate PI is calculated for each service class period, across all sysplex hosts Different calculations produce a comparable value from different goal types Copyright IBM Corporation 2012 Copyright IBM Corporation 201222

3/6/2012Policy adjustment cycleReceiver Service classperiod not meeting goalby: Importance andHighest PIStopStart the Loop againCPU Capping ofdiscretionary donor.Give Resource todiscretionary.Find Resource delayDonor Service Classperiod meeting goalby: Lowest PIFix Routines:Give Resource fromDonor to ReceiverLook for discretionarydonor by:PI 0.7, Goal: vel lessor 30% or Resp 1 MinReceiver was selected.Go ahead fordiscretionary goal. Adjustment is made on the basis of selected service class periods Copyright IBM Corporation 2012Blocked Workload Support: IEAOPTxxBLWLTRPCTPercentage of the CPU capacity of the LPAR tobe used for promotion Specified in units of 0.1% Default is 5 ( 0.5%) Maximum is 200 ( 20%) Would only be spent when enough units ofwork exist which need promotionBLWLINTHDSpecifies threshold time interval for which ablocked address space or enclave must waitbefore being considered for promotion. Minimum is 5 seconds. Maximum is 65535seconds. Default is 20 seconds. Copyright IBM Corporation 2012 Copyright IBM Corporation 201223

3/6/2012RMF Workload Activity Report – BatchREPORT BY: POLICY /S0.00#SWAPS0EXCTD0AVG ENC0.00REM ENC0.00MS ENC0.00WORKLOAD BATCHTRANS-TIME HHH.MM.SS.TTTACTUAL0EXECUTION0QUEUED0R/S AFFIN0INELIGIBLE0CONVERSION0STD DEV0*ALLJA0JB0

IBM z/OSMF Management Facility HTTP(s) z/OS Management Facility application z/OS Management Facility is a Web 2.0 application on z/OS Manages z/OS from z/OS Browser communicates with z/OSMF via secure connection, anywhere, anytime z/OS z/OS application, browser access Brows