munich 2016 - z011599 martin packer - more fun with ddf

38
Technical University/Symposia materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.0 © Copyright IBM Corporation 2015 More Fun With DDF Session z011599 Martin Packer IBM

Upload: martin-packer

Post on 07-Feb-2017

161 views

Category:

Technology


0 download

TRANSCRIPT

Technical University/Symposia materials may not be reproduced in whole or in part without the prior written permission of IBM. 9.0

© Copyright IBM Corporation 2015

More Fun With DDF Session z011599

Martin Packer IBM

Abstract Theideaof"alien"DB2workcomingintoyoursystemthroughDDFstrikesfearintoeventhemostseasonedPerformanceSpecialist...

HowwillIclassifyit?

Whatwillstopitfromtakingovermymachine?

ThispresentaDondescribeshowtouseperformancedatatoaddressbothofthosequesDons,basedontheauthor'srecentexperienceswithnumerouscustomers.

ItalsoenablesyoutounderstandwhatapplicaDonsandmachinesareissuingtheDDFrequests,improvingyourknowledgeoftheapplicaDonlandscape.

Agenda

• WhatIsDDF?• WhyDoICareAboutDDF?•  Tutorial• ClientN• ClientS• ClientP• Conclusion

What Is DDF?

• Oneofthemajorgatewaysintoz/OS•  SpecifictoDB2astheserver

• AroundsinceDB2Version2•  RefinedmanyDmessince

• Broadlyclientsare:•  JDBC–'JCC'•  z/OS–'DSN'•  OS/400–'QSQ'•  Other–'SQL'

• Higherriskof"feralSQL"

Why Do I Care About DDF?

• ManymodernapplicaDonsuseDDFtogettoDB2•  You'dlikethemtoperformwell•  You'dlikethemnottotakeoveryourmachine•  You'dliketoknowwhattheyevenare

•  Don'tyoujusthateitwhenworkshowsupandnobodytellsyou?

•  You'dliketoensurezIIPexploitaDonisopDmal

Tutorial

We'reInterestedIn

StarDngRightAtTheTop

DrillingDownIntoAServiceClass

Roughly60%

But What Is A DDF Transac<on?

• ConversaDonsbetweenrequestorsandDB2areofvariablecomplexity

•  Somedofewcommits•  Somedomany

•  Eachcommit/abortendsatransacDon•  InfrequentcommitscanleadtolongtransacDons•  Frequentcommitstoshortones

•  SoatransacDonisgenerallynotawholeconversaDon

• ADDFtransacDonisaWLMtransacDon•  Andwe'vealreadyseenthose

Mul<period Transac<ons

• AswithmanytransacDontypesWLMcanworkwith"periodaging"

•  IfatransacDonaccumulatesenoughserviceit'llfallintosecondandsubsequentperiods

•  Generallywe'retalkingaboutCPU

CPU And The DBM1 And DIST Address Spaces

MostlyIndependentEnclave Roughly60%ofIndependentEnclave

SMF 30 Contains Transac<on Rate

•  SMF30ETCisIndependentEnclaveTransacDonRateCount•  ProcessforDISTaddressspace•  CountstransacDonsforallDDFserviceclassesservedbythesubsystem

•  Likewisedoesn'tdisDnguishbetweenperiodendings•  ManycustomershavemulDpleDB2subsystemsperLPAR

•  Unnecessarytohaveseparateserviceclassesforeach•  SMF30ETCletsyouseehowbusy,transacDonwise,eachsubsystemis

•  CouldusefullydivideEnclaveCPUbytransacDonrate

DDF And The DB2 Accoun<ng Trace (SMF 101) Record

•  Everythingyou'dexpectfroma101record•  e.g.Timings•  e.g.SQLCounts

•  Plusmore:•  DDFIdenDfiers(QMDAsecDon)•  DDFCounters(QLACsecDon)•  WLMServiceClass(QWACWLME)

•  Recordsforrequesterandforserver•  DB2onz/OStoDB2onz/OSappearstwice

•  Oneineachsubsystem

•  Recordscanberolledup•  ACCUMACC=10isdefault

•  10thCommit/Rollback•  Orsomeotherobscurecases

•  ACCUMACC=NO•  1perCommit/Rollback

•  CancalculateACCUMACCvaluefromSMF101

QMDA and QLAC Sec<ons

•  QMDA–idenDfiers•  Differentforz/OSandotherplahorms•  UsefulfordesigningDDFWLMclassificaDonrules•  AccounDngInformaDon•  IPAddress/NetName•  EndUserID•  z/OSDB2CorrelaDon/PlaninformaDon•  …

•  QLAC–counters•  Commonacrossallplahorms•  Sent&Received•  SQLStatements•  Bytes•  Rows•  Blocks•  Commits/Aborts•  …

QWHS and QWACWLME

•  QWHSCommontoSMF101recordsfromdifferenttypesofconnecDons.

•  StandardHeaderinProductSecDon•  QWHSLWID–24-byteLogicalUnitOfWorkID

•  QWHSNID–8-byteNetworkName•  QWHSLUNM–8-byteLUName•  QWHSLUUV–6-byteUniquenessValue•  QWHSLUCC–2-byteCommitCount

•  QWHSLWID(minusQWHSLUCC)allowsyoutoDeaconversaDontogether.

•  QWACWLMEuniquetoDDF•  WLMServiceClass•  Binaryzeroesforotheramachments

Batch And DDF – Strange Bedfellows?

•  SAPBatchisnotJESBatch•  Abunchof"transacDons"ieSMF101records•  UniquecorrelatorinQWHSsecDon•  Plonngcommit(orrecord)ratebyminuteDmesthejob•  GivesbemergranularitythanJESBatch

•  EgVaryingeffectofCPUqueuing–NotAccountedForDme

•  Conversely,someJESBatchusesDDF•  JobJamachestoSubsystemA•  SubsystemAtalksDDFtoSubsystemB•  FieldQTXAOTSEforAdocumentsDmespentinBandcommunicaDng

•  CollectSMF101frombothsubsystems•  CorrelatorsinQWHSsecDonsmatch

Client 1 -

Some Basic Sta<s<cs

Client 2 -

A CPU Spike

Client 3 -

Sloshing Or Not?

Sloshing Or Not? You Decide

A Nice Response Time Distribu<on

So What Have We Learnt?

Maybe you learnt something like this

• DDFIsImportantToManage• DDFManagementneedstohappenwithWLMandbyapplicaDonexaminaDon/tuning

• AccounDngTraceSMF101iskeyinstrumentaDon•  MarDnhassomesuperDFSORTcodetosummariseit

•  DowntoarbitrarilyshortDmeintervals

•  YoucanhavemorefunwithDDF(thanyoumight'vesupposed)