Home > Education > DB2 Design for High Availability and Scalability

DB2 Design for High Availability and Scalability

Date post: 27-Jan-2015
Author: surekha-parekh
View: 127 times
Download: 2 times
Share this document with a friend
Are you overwhelmed by the growing amount of data in your environment? Are you maximizing application availability? As the number of tables with billions of rows continues to grow, so do the management challenges. In this session, we will discuss the challenges and solutions for optimum availability and performance, with techniques to efficiently and effectively manage very large amounts of data.
Embed Size (px)
Popular Tags:
of 26 /26
IBM Software Group DB2 10 for z/OS;Breaking Barriers and Beyond Designing for Advanced Availability © 2010 IBM Corporation Advanced Availability and Scalablity
  • 1. IBM Software GroupDB2 10 for z/OS;BreakingBarriers and BeyondDesigning forAdvanced Availabilityand Scalablity 2010 IBM Corporation

2. Migration Planning WorkshopDisclaimer and TrademarksInformation contained in this material has not been submitted to any formal IBM review and is distributed on "as is" basiswithout any warranty either expressed or implied. Measurements data have been obtained in laboratory environment.Information in this presentation about IBMs future plans reflect current thinking and is subject to change at IBMsbusiness discretion. You should not rely on such information to make business plans. The use of this information is acustomer responsibility.IBM MAY HAVE PATENTS OR PENDING PATENT APPLICATIONS COVERING SUBJECT MATTER IN THISDOCUMENT. THE FURNISHING OF THIS DOCUMENT DOES NOT IMPLY GIVING LICENSE TO THESE PATENTS.TRADEMARKS: THE FOLLOWING TERMS ARE TRADEMARKS OR REGISTERED TRADEMARKS OF THE IBMCORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES: AIX, AS/400, DATABASE 2, DB2, e-business logo, Enterprise Storage Server, ESCON, FICON, OS/390, OS/400, ES/9000, MVS/ESA, Netfinity, RISC, RISCSYSTEM/6000, System i, System p, System x, System z, IBM, Lotus, NOTES, WebSphere, z/Architecture, z/OS, zSeriesThe FOLLOWING TERMS ARE TRADEMARKS OR REGISTERED TRADEMARKS OF THE MICROSOFTCORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES: MICROSOFT, WINDOWS, WINDOWS NT,ODBC, WINDOWS 95For additional information see ibm.com/legal/copytrade.phtmlDISCLAIMER: Information regarding potential future products is intended to outline our general product direction and itshould not be relied on in making a purchasing decision. The information mentioned regarding potential future products isnot a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potentialfuture products may not be incorporated into any contract. The development, release, and timing of any future features orfunctionality described for our products remains at our sole discretion. 2 2010 IBM Corporation 3. Migration Planning Workshop Focus on avoiding outages and show stoppersAvailabilityScalabilityTo be able to make changes to the To avoid outages caused either bysubsystem or member without system or object size limitscausing an system outageTS physical limits(Segmented CDB updates(add another DB2 server) TS 64g limit;Partition DSSIZE limit(PM42175) ) DDF/TCPIP member subsetting Workfile sort record cannot Log RBA/LRSN limitspan pages(32k) limit-sort reached(DB2 11) key limit(16k) Add active log RID pool failures causing TSTo be able to make changes to DB2scansobjects without causing an objectTo avoid DB2 outages caused byoutage(read or read write)Virtual Storage Constraint Rename or drop(DB2 11) a 64 bit addressing column Migrate to UTS from PTS or Increase number of active segmented threads by a factor of 10 Alter Limit Key(DB2 11)New Storage zparms to avoid Online-Reorg therunaway DB2/LPAR shutdown Catalog/Directory3 2010 IBM Corporation 4. Migration Planning WorkshopDB2 10 Virtual Storage Constraint Relief-ScalabilityDB2 10 DBM1 below 2GB Global DSCCT/PT 75-90% less usage in DB2 10 compared to DB2 9 DBD Some of working storage (stack,Local DSC xproc storage) stays below 2GB SKCTThread / StackSKPT Larger number of threads Possible data sharing member consolidationThread / Stack/ working storage Improve CPU with storage75-90% less usage More release deallocateDBM1 below bar Larger MAXKEEPD values forafter REBIND KEEPDYNAMIC=YES 4 2010 IBM Corporation 5. Migration Planning WorkshopAvailability:Managing DB2 Storage and avoiding DB2outageReal storage Need to carefully plan, provision and monitor real storage consumption even in DB2 10 Prior to V10 a hidden zparm SPRMRSMX (real storage kill switch) existed SPRMRSMX prevents a runaway DB2 subsystem from taking theLPAR down Should be used when there is more than one DB2 subsystem running on the same LPAR Aim is to prevent multiple outages being caused by a single DB2 subsystem outage Should to set to 2x normal DB2 subsystem usage Kills the DB2 subsystem when SPRMRSMX value reached5 525/02/2013 2010 IBM Corporation 6. Migration Planning WorkshopAvailability:Managing DB2 Storage and avoiding a DB2outage cont.. SPRMRSMX hidden zparm now becomes an opaque parameterREALSTORAGE_MAX Will also introduce DISCARD mode to contract storage usage to protect against excessivepaging and use of AUX New zparm REALSTORAGE_MANAGEMENT controls when DB2 freesstorage frames back to z/OS > ON -> Discard unused frames all the time - discard stack, thread storage, keepfootprint small > OFF -> Do not discard unused frames unless things are getting out of hand > AUTO (default) -> Detect whether paging is imminent and try to reduce the framecounts to avoid system paging With AUTO, DB2 monitors paging rates, switches between ON/OFF and decides when to discard frames based on > 80% of SPRMRSMX reached > 50% of AUX (ENF55 condition) used > Hitting AVQLOW (available real storage frame) New messages (DSNV516I, 517I) for when paging rate thresholds cause DB2 to free real frames Strong recommendation to apply PTF for APAR PM24723 before going into businessproduction and to run with REALSTORAGE_MANAGEMENT=AUTO6 2010 IBM Corporation 7. Migration Planning WorkshopOther Availability & Scalability ImprovementsReduced latch and lock contention Improved efficiency for latch suspend/resume UTSERIAL lock eliminationNew access currently committed option for readers to avoidwaiting for inserters or deletersUse 64-bit common storage to avoid ECSA constraintsDB2 10 NFM catalog restructure improves BIND / PrepareconcurrencyRemove SPT01 64Gb constraint (inline LOBs andCompression)Improved accounting rollup, compress SMF option Reduced SMF data volumeLower overhead for very large buffer poolsGroup Bufferpool write-around protocol enablement forheavy group buffer pool write pageset(DB2 11)7 2010 IBM Corporation 8. 8 Migration Planning WorkshopMajor changes in DB2 10 catalog & directory Improve availability and productivity Increase maximum size substantially Reduce contention: BIND, Prepare, Utilities DDL concurrency also improved from removal of DBD01 hash anchor locks Catalog changes: Remove links, hashes Many more table spaces, partition by growth Row level locking, reordered row format CLOB and BLOB columns for long strings o Inline for performance Online reorganization and check More automatic: DB2-managed SMS-controlled 8 2010 IBM Corporation 9. Migration Planning WorkshopRecent System APARs DDF Availability Enhancements Change DDF location alias names onlineo New MODIFY DDF ALIAS commando New dynamic alias concept in addition toexisting 8 static aliases Online DDF CDB changeso LOCATIONS, IPNAMES, IPLIST PM26480 (V10) Ability to SELECT from SYSLGRNX PM35190 & PM42331 (V10) ISO(UR) enforced 9 2010 IBM Corporation 10. Migration Planning WorkshopBusiness value of Advanced Design-Pending Alters Availability REORG with share level reference or change to move your simple table spaces to new universal table spaces Move a segmented table space at the 64GB limit seamlessly into a partition by growth table space without an outage (aside from the rebinds) Productivity Have DB2 materialize online ALTERs at DBAs discretion at a future date No need to CREATE new table spaces, UNLOAD/LOAD, GRANT, DROP, REBIND10 2010 IBM Corporation 11. Migration Planning WorkshopUniversal Table SpacesWhat kind of Table Space will be created? (* optional)CREATESEGSIZENUMPARTS MAXPARTITIONS CommentsTABLESPACE...*SEGSIZE is optional.Segmented* Default for explicitlycreated TS & implicitlycreated TS for CM8.SEGSIZE defaults to 4.Default for DB2 9 NFMUTS PBG with implicitly created* TS.Single table TS.*SEGSIZE will default to32.Single table TSUTS PBR *SEGSIZE will default to* 32.Partitioning TS prior toClassic * V9*SEGSIZE 0 will createclassic partitioned andPartitioned TSCM8 behavior is same asv8 NFM 11 2010 IBM CorporationDSN 12. Migration Planning WorkshopImproved availability ALTERClassic Partitioned Table Space Range-PartitionedSee APARUTS PBRPM25648 Single-Table Segmented Table Space HashSingle-Table SimplePartition-By-GrowthTable Space UTS PBG12 DSN 2010 IBM Corporation 13. Migration Planning WorkshopPossible online schema changes for TS and IX 13 2010 IBM Corporation 14. Migration Planning WorkshopImproved ALTERPending changes materialized with an online REORG apply to UTS SEGSIZE no other pending ALTERs can be done before this is materialized DSSIZE no other pending ALTERs can be done before this is materialized(IMPDSSIZE ZParm for default) MEMBER CLUSTER new for UTS MAXPARTITIONS If other pending changes are involved, or changing table space type: it is pending Otherwise it is immediate Page Size (BUFFERPOOL) Can be done with REORG TABLESPACE (for indexes and tables) or REORG INDEX for only indexchangesOther ALTERs are immediateMAXPARTITIONS The above statements if TS or IX not defined MAXPARTITIONS (unless changing TS) BUFFERPOOL PGSTEAL NONE LOB INLINE LENGTH LOB 14DSN 2010 IBM Corporation 15. Migration Planning WorkshopOnline Schema Details on Execute ALTER Statement Statement is validated Semantic checking against effective catalog definition Assuming all checks out ok: Statement is put on pending list Table space is placed in Advisory-REORG pending :AREOR (non-restrictive) Not to be confused with REORG-pending advisory (AREO*) which says access pathcould be degraded Statement completes with SQLCODE +610 to advertise the advisory state Drop changes ALTER TABLESPACE DROP PENDING CHANGES still in AREOR all changes for that table space will be dropped SYSIBM.SYSPENDINGDDL: DBNAMETSNAME DBID PSID OBJSCHEMA OBJNAME OPTION_ OPTION_STATE KEYWORD VALUEMENT_ TEXT 15DSN 2010 IBM Corporation 16. Migration Planning WorkshopOnline Schema Details on Online REORGPending DDL is materialized - DSNU1163I Catalog is updated with the new attributes OBD is updated with the new attributes Data sets are updated with the new attributes Materialized SYSPENDINGDDL entries are removedStats are collected Default is TABLE ALL INDEX ALL UPDATE ALL HISTORY ALL unlessoverridden Warning message is issued to indicate that some partition statistics may nolonger be accurate - DSNU1166I (COLGROUP, KEYCARD, HISTOGRAM )SYSCOPY entries show inability to recover object prior to changesAREOR state is reset16 DSN 2010 IBM Corporation 17. Migration Planning WorkshopOnline SchemaRestrict RECOVER across materializing REORGs(someavailability in DB2 11)AlterMEMBERDML activitiesCLUSTEROnREORG converts to MemberRECOVER toCluster structure with In-line copy Currency Image copy + log recordsPlans and packages are invalidated if When changing the MAXPARTITIONS attribute of a simpleor segmented table space to convert it to a partition-by-growth universal table space The SEGSIZE attribute of a partitioned table space ischanged to convert the table space to a range-partitioneduniversal table space 17DSN 2010 IBM Corporation 18. Migration Planning WorkshopMember ClusterspeedClusteringMEMBER CLUSTER added to UTS Avoid hotspots, P-lock, and page latch contentionUsually only applicable for data sharing, concurrent accessEach member is assigned a set of space map pagesIgnores clustering index on insert, REORG to get clustering backSpace map covered 199 data pages in DB2 9Space map covers 10 segments in DB2 10 New column SYSTABLESPACE.MEMBER_CLUSTER LOCKSIZE row and larger page size may work better Very important for APPEND tables (DB2 9)18DSN 2010 IBM Corporation 19. Migration Planning WorkshopDB2 10 Range Defined Table Spaces ---------------------------------- Random Inserts -------------------------------- Throughput CPU TimePLL RLLPLL RLL 250001.21Msec / Commit 20000 Rows/Sec0.8 150000.6 100000.4 5000 0.2 00PTSPTS/MC PBRPBR/MCPTS PTS/MCPBRPBR/MC-------------------------------- Sequential Inserts --------------------------------ThroughputCPU TimePLLRLL PLL RLL 120000 20 100000Msec / Commit15Rows/Sec8000060000 10400005200000 0 PTSPTS/MC PBR PBR/MCPTS PTS/MC PBRPBR/MC19 19 25/02/2013 2010 IBM Corporation 20. Migration Planning WorkshopDB2 10 Non-range Defined Table Spaces---------------------------------- Random Inserts --------------------------------ThroughputCPU Time PLLRLL PLLRLL250001.2 Msec / Commit 120000 Rows/Sec 0.815000 0.610000 0.4 50000.200SEGPBG PBG/MCSEGPBG PBG/MC-------------------------------- Sequential Inserts -------------------------------- ThroughputCPU TimePLLRLL PLL RLL 120000 25 100000 Msec / Commit20Rows/Sec800001560000104000020000500SEGPBGPBG/MC SEG PBG PBG/MC2020 25/02/2013 2010 IBM Corporation 21. Migration Planning WorkshopCompress on INSERTData compression occurs when a dictionary existsPrior to DB2 10 Dictionary not built on a table space with COMPRESS YES attributeuntil: REORG or LOAD utility was executed For some customers, REORG or LOAD are not executed frequently LOAD COPYDICTIONARY offered in DB2 9DB2 10 NFM allows for build of compression dictionary on: INSERT MERGE LOAD utility with REPLACE, RESUME NO, or RESUME YES SHRLEVELCHANGE, and without KEEPDICTIONARYEliminate need for REORG or LOAD needed to build compression dictionary21DSN 2010 IBM Corporation 22. Migration Planning WorkshopHow Compress on INSERT worksINSERT, MERGE and LOAD trigger the creation of a compressiondirectory if: The table space or partition is defined with COMPRESS YES The table space or partition has no compression dictionary built Inserted data reaches a threshold that allows the build of thecompression dictionaryIf threshold is reached, dictionary build is done asynchronously Data continues to be inserted uncompressed until dictionary is readyNo way to turn off Compress on insert Use COMPRESS NO if unwanted DSNU235I dictionary not built22 DSN 2010 IBM Corporation 23. Migration Planning WorkshopLocation of compression dictionary pagesIf the dictionary pages are scattered throughout table a DSNU1232I -REORG or COPY SYSTEMPAGES(YES) is needed to COMPRESSEDUNLOAD rowsROW IS IGNOREDBECAUSE THEH SM D D..DICTIONARY IS COPY TS... .. H SMD D..D DD DNOT AVAILABLE SYSTEMPAGES.. NOFOR TABLE DDD DD DI D DI table-nameD DI D DI COPY TS... SYSTEMPAGES ..Dictionary pages YES .. (option makesH SM DIDInot necessarilyafter space map page!DB2 copy theD DD D dictionary pages-Could use inline after space mapDD DCOPY during REORG page)To ensure dictionarypages up front23DSN 2010 IBM Corporation 24. Migration Planning WorkshopExtended Address Volumes Continue the direction started with the 3390-54 of defining larger volumes by increasing the number of cylinders beyond 65520 in z/OS V1R10 and higher to support 262,668 cylinders New track address format(CCCCHHHH-CCCCcccH) Continue relief provided by PAV, HyperPAV Benefit: 54 GB Increased z/OS addressable disk storage-supports SMS and non_SMSMax cyls: 65,520 Easier to manage flash enabled devices for recover 3390-54 Caution small data sets may grow faster due to larger allocation in chunks of 21 cyls Extended Addressing is needed for any DB2 dataset larger than 4GB Catalog and directory must belong to EA SMS Size limited to STOGROUP223 GB(262,668 Max Previously LARGE datasets limited to 4GB, DSSIZE iscylinders) now preferred method of defining size in z/OS V1R10 Still have 64GB limit on dataset(DSSIZE)3390-A EAV Up to 225 TB 24DSN 2010 IBM Corporation 25. Migration Planning WorkshopEAV DB2 Enablement 25 2010 IBM Corporation 26. Migration Planning Workshop26 2010 IBM Corporation