+ All Categories
Home > Education > DB2 Design for High Availability and Scalability

DB2 Design for High Availability and Scalability

Date post: 27-Jan-2015
Category:
Upload: surekha-parekh
View: 133 times
Download: 2 times
Share this document with a friend
Description:
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.
Popular Tags:
26
IBM Software Group DB2 10 for z/OS;Breaking Barriers and Beyond Designing for Advanced Availability © 2010 IBM Corporation Advanced Availability and Scalablity
Transcript
Page 1: DB2 Design for High Availability and Scalability

IBM Software Group

DB2 10 for z/OS;Breaking Barriers and Beyond

Designing for Advanced Availability

© 2010 IBM Corporation

Advanced Availabilityand Scalablity

Page 2: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Information contained in this material has not been submitted to any formal IBM review and is distributed on "as is" basis without any warranty either expressed or implied. Measurements data have been obtained in laboratory environment. Information in this presentation about IBM's future plans reflect current thinking and is subject to change at IBM's business discretion. You should not rely on such information to make business plans. The use of this information is a customer responsibility.

IBM MAY HAVE PATENTS OR PENDING PATENT APPLICATIONS COVERING SUBJECT MATTER IN THIS DOCUMENT. THE FURNISHING OF THIS DOCUMENT DOES NOT IMPLY GIVING LICENSE TO THESE PATENTS.

TRADEMARKS: THE FOLLOWING TERMS ARE TRADEMARKS OR ® REGISTERED TRADEMARKS OF THE IBM CORPORATION 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, RISC SYSTEM/6000, System i, System p, System x, System z, IBM, Lotus, NOTES, WebSphere, z/Architecture, z/OS, zSeries

The FOLLOWING TERMS ARE TRADEMARKS OR REGISTERED TRADEMARKS OF THE MICROSOFT

CORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES: MICROSOFT, WINDOWS, WINDOWS NT,

Disclaimer and Trademarks

© 2010 IBM Corporation2

CORPORATION IN THE UNITED STATES AND/OR OTHER COUNTRIES: MICROSOFT, WINDOWS, WINDOWS NT, ODBC, WINDOWS 95

For additional information see ibm.com/legal/copytrade.phtml

DISCLAIMER: Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision. The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.

Page 3: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Focus on avoiding outages and “show stoppers”

� Availability

To be able to make changes to the subsystem or member without causing an system outage

– CDB updates(add another DB2 server)

– DDF/TCPIP member subsetting

– Log RBA/LRSN limit reached(DB2 11)

� Scalability

To avoid outages caused either by system or object size limits

– TS physical limits(Segmented TS 64g limit;Partition DSSIZE limit(PM42175) )

– Workfile sort record cannot span pages(32k) limit-sort key limit(16k)

© 2010 IBM Corporation3

reached(DB2 11)– Add active log

To be able to make changes to DB2 objects without causing an object outage(read or read write)

– Rename or drop(DB2 11) a column

– Migrate to UTS from PTS or segmented

– Alter Limit Key(DB2 11)– Online-Reorg the

Catalog/Directory

key limit(16k)

– RID pool failures causing TS scans

To avoid DB2 outages caused by Virtual Storage Constraint

– 64 bit addressing

– Increase number of active threads by a factor of 10

– New Storage zparms to avoid runaway DB2/LPAR shutdown

Page 4: DB2 Design for High Availability and Scalability

Migration Planning Workshop

� DBM1 below 2GB

– 75-90% less usage in DB2 10 compared to DB2 9

– Some of working storage (stack, xproc storage) stays below 2GB

� Larger number of threads

DB2 10 Virtual Storage Constraint Relief-ScalabilityDB2 10

SKCT

SKPT

Global DSC

DBD

CT/PT

Local DSC

Thread / Stack

© 2010 IBM Corporation4

� Larger number of threads

– Possible data sharing member consolidation

� Improve CPU with storage

– More release deallocate

– Larger MAXKEEPD values for KEEPDYNAMIC=YES

75-90% less usageDBM1 below bar

after REBIND

Thread / Stack/ working storage

Page 5: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Availability:Managing DB2 Storage and avoiding DB2 outage

� Real 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 the LPAR down

– Should be used when there is more than one DB2 subsystem

© 2010 IBM Corporation55 25/02/2013

– 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 reached

Page 6: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Availability:Managing DB2 Storage and avoiding a DB2 outage cont..

• SPRMRSMX hidden zparm now becomes an opaque parameter REALSTORAGE_MAX

• Will also introduce DISCARD mode to contract storage usage to protect against excessive paging and use of AUX

– New zparm REALSTORAGE_MANAGEMENT controls when DB2 frees storage frames back to z/OS> ON -> Discard unused frames all the time - discard stack, thread storage, keep

footprint 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 frame

counts to avoid system paging

© 2010 IBM Corporation6

counts 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 business production and to run with REALSTORAGE_MANAGEMENT=AUTO

Page 7: DB2 Design for High Availability and Scalability

Migration Planning Workshop

� Reduced latch and lock contention

– Improved efficiency for latch suspend/resume

– UTSERIAL lock elimination

� New access currently committed option for readers to avoid waiting for inserters or deleters

� Use 64-bit common storage to avoid ECSA constraints

� DB2 10 NFM catalog restructure improves BIND / Prepare concurrency

Other Availability & Scalability Improvements

© 2010 IBM Corporation7

concurrency

� Remove SPT01 64Gb constraint (inline LOB’s and Compression)

� Improved accounting rollup, compress SMF option

– Reduced SMF data volume

� Lower overhead for very large buffer pools

� Group Bufferpool write-around protocol enablement for heavy group buffer pool write pageset(DB2 11)

Page 8: DB2 Design for High Availability and Scalability

Migration Planning Workshop88

Major 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 ofDBD01 hash anchor locks

� Catalog changes: Remove links, hashes

© 2010 IBM Corporation8

� 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

Page 9: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Recent System APARs

� DDF Availability Enhancements

– Change DDF location alias names online

oNew MODIFY DDF ALIAS command

oNew “dynamic alias” concept in addition to existing 8 static aliases

© 2010 IBM Corporation9

– Online DDF CDB changes

oLOCATIONS, IPNAMES, IPLIST

– PM26480 (V10)

� Ability to SELECT from SYSLGRNX

– PM35190 & PM42331 (V10)

– ISO(UR) enforced

Page 10: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Business 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)

© 2010 IBM Corporation10

(aside from the rebinds)

� Productivity

– Have DB2 materialize online ALTERs at DBA’s discretion at

a future date

– No need to CREATE new table spaces, UNLOAD/LOAD,

GRANT, DROP, REBIND

Page 11: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Universal Table Spaces� What kind of Table Space will be created? (* optional)

CREATE TABLESPACE...

SEGSIZE NUMPARTS MAXPARTITIONS Comments

Segmented*SEGSIZE is optional.Default for explicitly created TS & implicitly created TS for CM8.SEGSIZE defaults to 4.

UTS PBGDefault for DB2 9 NFM with implicitly created

*

*

© 2010 IBM Corporation11 DSN

UTS PBG with implicitly created TS.Single table TS.*SEGSIZE will default to 32.

UTS PBRSingle table TS*SEGSIZE will default to 32.

Classic

Partitioned TS

Partitioning TS prior to V9*SEGSIZE 0 will create classic partitioned and CM8 behavior is same as v8 NFM

*

*

*

Page 12: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Single-Table

Segmented

Classic Partitioned

Table Space

See APAR

PM25648

Range-Partitioned

UTS PBR

Improved availability ALTER…

© 2010 IBM Corporation12

Single-Table

Simple

Table Space

Table Space

Partition-By-Growth

UTS PBG

Hash

DSN

Page 13: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Possible online schema changes for TS and IX

© 2010 IBM Corporation13

Page 14: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Improved ALTER…

� Pending 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

© 2010 IBM Corporation14

• Otherwise it is immediate

– Page Size (BUFFERPOOL)

• Can be done with REORG TABLESPACE (for indexes and tables) or REORG INDEX for only index changes

� Other ALTERs are immediate

– The above statements if TS or IX not defined

– MAXPARTITIONS (unless changing TS)

– BUFFERPOOL PGSTEAL NONE

– LOB INLINE LENGTH LOB

MAXPARTITIONS

DSN

Page 15: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Online 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 path could be degraded

– Statement completes with SQLCODE +610 to advertise the advisory state

� Drop changes

© 2010 IBM Corporation15

� Drop changes

– ALTER TABLESPACE… DROP PENDING CHANGES

• still in AREOR

• all changes for that table space will be dropped

DBNAME TSNAME DBID PSID OBJSCHEMA OBJNAME … OPTION_KEYWORD

OPTION_VALUE

… STATEMENT_TEXT

SYSIBM.SYSPENDINGDDL:

DSN

Page 16: DB2 Design for High Availability and Scalability

Migration Planning Workshop

� Pending 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 removed

� Stats are collected

Online Schema – Details on Online REORG

© 2010 IBM Corporation16

� Stats are collected

– Default is TABLE ALL INDEX ALL UPDATE ALL HISTORY ALL unless overridden

– Warning message is issued to indicate that some partition statistics may no longer be accurate - DSNU1166I

• (COLGROUP, KEYCARD, HISTOGRAM …)

� SYSCOPY entries show inability to recover object prior to changes

� AREOR state is reset

DSN

Page 17: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Online Schema…� Restrict RECOVER across materializing REORGs(some

availability in DB2 11)

RECOVER to Currency

Alter MEMBER CLUSTER On REORG converts to Member

Cluster structure with In-line copy

DML activities

+ log recordsImage copy

© 2010 IBM Corporation17

� Plans and packages are invalidated if

– When changing the MAXPARTITIONS attribute of a simple or segmented table space to convert it to a partition-by-growth universal table space

– The SEGSIZE attribute of a partitioned table space is changed to convert the table space to a range-partitioned universal table space

DSN

Page 18: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Member Cluster

� MEMBER CLUSTER added to UTS

– Avoid hotspots, P-lock, and page latch contention

• Usually only applicable for data sharing, concurrent access

• Each member is assigned a set of space map pages

• Ignores clustering index on insert, REORG to get clustering back

• Space map covered 199 data pages in DB2 9

• Space map covers 10 segments in DB2 10

speedClustering

© 2010 IBM Corporation18

• Space 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)

DSN

Page 19: DB2 Design for High Availability and Scalability

Migration Planning Workshop

DB2 10 Range Defined Table Spaces

Throughput

0

5000

10000

15000

20000

25000

Ro

ws/S

ec

PLL RLL

CPU Time

0

0.2

0.4

0.6

0.8

1

1.2

Msec / C

om

mit

PLL RLL

---------------------------------- Random Inserts --------------------------------

© 2010 IBM Corporation1919 25/02/2013

0

PTS PTS/MC PBR PBR/MC

0

PTS PTS/MC PBR PBR/MC

Throughput

0

20000

40000

60000

80000

100000

120000

PTS PTS/MC PBR PBR/MC

Ro

ws/S

ec

PLL RLL

CPU Time

0

5

10

15

20

PTS PTS/MC PBR PBR/MC

Msec / C

om

mit

PLL RLL

-------------------------------- Sequential Inserts --------------------------------

Page 20: DB2 Design for High Availability and Scalability

Migration Planning Workshop

DB2 10 Non-range Defined Table Spaces

Throughput

0

5000

10000

15000

20000

25000

Ro

ws/S

ec

PLL RLL

CPU Time

0

0.2

0.4

0.6

0.8

1

1.2

Msec / C

om

mit

PLL RLL

Throughput

0

5000

10000

15000

20000

25000

Ro

ws/S

ec

PLL RLL

---------------------------------- Random Inserts --------------------------------

© 2010 IBM Corporation2020 25/02/2013

0

SEG PBG PBG/MC

0

SEG PBG PBG/MC

Throughput

0

20000

40000

60000

80000

100000

120000

SEG PBG PBG/MC

Ro

ws/S

ec

PLL RLL

CPU Time

0

5

10

15

20

25

SEG PBG PBG/MC

Msec / C

om

mit

PLL RLL

0

SEG PBG PBG/MC

-------------------------------- Sequential Inserts --------------------------------

Page 21: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Compress on INSERT

� Data compression occurs when a dictionary exists

� Prior to DB2 10

– Dictionary not built on a table space with COMPRESS YES attribute until:

• REORG or

• LOAD utility was executed

– For some customers, REORG or LOAD are not executed frequently

© 2010 IBM Corporation21

– LOAD COPYDICTIONARY offered in DB2 9

� DB2 10 NFM allows for build of compression dictionary on:

– INSERT

– MERGE

– LOAD utility with REPLACE, RESUME NO, or RESUME YES SHRLEVEL CHANGE, and without KEEPDICTIONARY

� Eliminate need for REORG or LOAD needed to build compression dictionary

DSN

Page 22: DB2 Design for High Availability and Scalability

Migration Planning Workshop

How Compress on INSERT works

� INSERT, MERGE and LOAD trigger the creation of a compression directory 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 the compression dictionary

© 2010 IBM Corporation22

� If threshold is reached, dictionary build is done asynchronously

– Data continues to be inserted uncompressed until dictionary is ready

� No way to turn off Compress on insert

– Use COMPRESS NO if unwanted

– DSNU235I – dictionary not built

DSN

Page 23: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Location of compression dictionary pagesDSNU1232I -

COMPRESSED ROW

IS IGNORED

BECAUSE THE

DICTIONARY IS

NOT AVAILABLE

FOR TABLE

table-name

COPY TS... SYSTEMPAGES NO

H SM D D ..

D D D D

D DI D DI

.

.

H SM D D ..

D D D D

D DI D DI

.

.

� If the dictionary pages are scattered throughout table a REORG or COPY SYSTEMPAGES(YES) is needed to UNLOAD rows

© 2010 IBM Corporation23

COPY TS... SYSTEMPAGES YES(option makes

DB2 copy the

dictionary pages

after space map

page)

.

.H SM DI DI

D D D D

D D D

.

.Dictionary pages

not necessarily

after space map page!

-Could use inline

COPY during REORG

To ensure dictionary

pages up front

DSN

Page 24: DB2 Design for High Availability and Scalability

Migration Planning Workshop

Extended Address Volumes� Continue the direction started with the 3390-54 of defining larger

volumes by increasing the number of cylinders beyond 65520in z/OS V1R10 and higher to support 262,668 cylinders

� New track address format(CCCCHHHH-CCCCcccH)

– Continue relief provided by PAV, HyperPAV

– Benefit:• Increased z/OS addressable disk storage-supports SMS and non_SMS

• Easier to manage flash enabled devices for recover 3390-54

54 GBMax cyls: 65,520

© 2010 IBM Corporation24

• 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 STOGROUP

– Previously ‘LARGE’ datasets limited to 4GB, DSSIZE is now preferred method of defining size

– Still have 64GB limit on dataset(DSSIZE)

Size limited to 223 GB

(262,668 Max cylinders)

in z/OS V1R10

3390-A “EAV”

Up to 225 TB

DSN

Page 25: DB2 Design for High Availability and Scalability

Migration Planning Workshop

EAV DB2 Enablement

© 2010 IBM Corporation25

Page 26: DB2 Design for High Availability and Scalability

Migration Planning Workshop

© 2010 IBM Corporation26


Recommended