db2 10 memory management

30
The Information Management Specialists Memory Management in DB2 10 for z/OS Julian Stuhler Principal Consultant Triton Consulting

Upload: caroldm

Post on 17-Jun-2015

6.010 views

Category:

Technology


1 download

TRANSCRIPT

  • 1. Memory Management in DB2 10 for z/OS Julian StuhlerPrincipal Consultant Triton ConsultingThe Information Management Specialists

2. Acknowledgements John Campbell Michael DewertThe Information Management Specialists 3. Agenda Introduction Whats Changed & Why? What Does It Mean for Me? Summary & QuestionsThe Information Management Specialists 4. Introduction Julian Stuhler Director and Principal Consultant at Triton Consulting 24 years DB2 experience, 19 as a consultant working with customers in UK, Europe and the US IBM Gold Consultant since 1999 IBM Information Champion Former IDUG (International DB2 User Group) President Author of IBM Redbooks, white papers and more recently flashbooks Designer of IBMs new DB2 10 Business Value Assessment Estimator Tool The Information Management Specialists 5. Whats Changed and Why?The Need for Scalability The Information Management Specialists 6. The Need for Scalability IT volumes continue to increase More applications More data More transactions Performance is ever more important Customers need to support workload growth without a drop-off inperformance Availability is ever more important Pressure to reduce both planned and unplanned outages End result: each DB2 environment is being asked to work harder, with lessdowntime Every DB2 release attempts to push back these boundaries, but majorprogress has been made in DB2 10The Information Management Specialists 7. Virtual Storage Enhancements V8 began a major project to transformDB2 into a 64-bit RDBMS Laid the groundwork and providedsome scalability improvements but alot of DBM1 objects remained belowthe 2GB bar DB2 9 improved things a little, butonly by another 10-15% for mostcustomers Practical limit of 300-500 threads perDB2 subsystem DB2 10 moves 80-90% of theremaining objects above the bar,resulting in 5-10x improvement inthreads per subsystem (CM)The Information Management Specialists 8. Virtual Storage EnhancementsCastout buffersCastout buffers Castout buffers Compression Dict Compression DictCompression Dict DBD CacheDBD Cache DBD Cache Global DSC Global DSCGlobal DSCRIDPOOLRIDPOOL RIDPOOL SORTPOOL SORTPOOLSORTPOOL SKCT + PT SKCT + PTCT + PT ThreadEDMPool CT + PT(Pointers) All storage Thread Storage Thread StorageDataset Storage Dataset StorageDataset Storage V7V8 V9V10 The Information Management Specialists 9. Real Storage Enhancements For prior releases, z/OSDB2 9 Buffer Poolalways managed DB2bufferpool pages as 4Kframes z/OS Storage Move to 64-bit architecturemade much larger bufferpools viable Bufferpools can use many millions of pages 4K Increased z/OS overheads Pages for page management 4KPagesThe Information Management Specialists 10. Real Storage Enhancements DB2 10 introduces support for1MB pages to reduce z/OS pagemanagement overheadsDB2 10 Buffer Pool Needs z10 or newer z196 server Needs bufferpool to be definedwith PGFIX=YES z/OS Storage z/OS sysprogs must partition realstorage between 4K and 1MBframes (IESYSnn in PARMLIB,needs IPL) so wait until DB2 10 isbedded in Key part of potential DB2 10 CPU 4Kreduction Pages Customer testing during betaprogram showed CPU reductions1MBof 0-6% with this feature enabled PagesThe Information Management Specialists 11. What Does It Mean For Me? The Information Management Specialists 12. Real Storage Availability You need sufficient real storage to back any increasedvirtual storage usage Paging will still kill you in a 64-bit environment, should be near zero Plan on additional 10-30% real memory for DB2following migration from DB2 9 Most customers will be at lower end of this range, but more will be required once you start using some DB2 10 capabilities. Skip migration customers will need more The Information Management Specialists 13. Real Storage Availability You also need to allow approx. 16GB for DB2 dump requirement (twice the 8GB value recommended for DB2 8 and 9) MAXSPACE parameter defines max amount of virtual storage for SVCdump z/OS default is 500MB Some customer horror stories due to insufficient storage beingavailable for dumps Good news if youre on a z196, as the technology dividend meansthat cost per GB will be around 75% less than for a z10 Many customers are already running lean on real storage evenunder V9, and are building real storage increase costs into their DB210 financial justificationsThe Information Management Specialists 14. Real Storage Monitoring Statistics IFCID 225 has long been vital for DB2 storage monitoring Part of Statistics Class 1 trace since PQ99658, so now enabled by default Once DB2 10 is implemented in your environment, focus should change fromvirtual to real storage monitoring PM24723 and PM37647 introduce important real storage monitoring andcontraction enhancements ICFID 225 enhanced with new fields to externalise real and auxiliary storage consumption forstorage objects in private, shared, and common areas above the bar (see additionalinformation at end of presentation) Introduces two new DSNZPARMs to tell DB2 if and how to release any unused real storage(REALSTORAGE_MANAGEMENT) and specify upper limit on DB2 real storage usage(REALSTORAGE_MAX) see next slide Some increase in MSTR CPU due to storage monitoring. Make sure PTFs for z/OS APAR APAROA37821 and corresponding DB2 APAR PM49816 are also applied see later Both APARs marked as HIPER you are strongly advised to implement the associated PTFsbefore migrating to DB2 10 in any production environments!The Information Management Specialists 15. Real Storage Monitoring Opaque DSNZPARMs introduced by PM24723 and PM37647 REALSTORAGE_MANAGEMENT ON Unused backed real frames discarded when possible (CPU overhead) OFF DB2 will only discard unused frames when critical real storage or auxiliary storage usageis detected AUTO (default) DB2 will discard unused frames when the system begins to page Recommended value = AUTO DSNV516I and DSNV517I written when DB2 enters and exits real storage contraction mode REALSTORAGE_MAX Hard limit on real and auxiliary storage used by DB2 subsystem DB2 will terminate if limitreached Valid values: NOLIMIT (default), 1 65,535 (GB) Recommended value = 2 x amount of real and auxiliary storage that the subsystem mightreasonably consume DSNS003I written when DB2 approaches the threshold and DSNS004I written to indicate relieffrom this conditionThe Information Management Specialists 16. Real Storage Monitoring Monitor use of 1MB page frames used by a specific BP -DISPLAY BUFFERPOOL(BPnn) SERVICE=4 Resultant DSNB999I message shows number of 1MB pages in use -DBA1 DIS BUFFERPOOL(BP0) SERVICE=4 DSNB401I -DBA1 BUFFERPOOL NAME BP0, BUFFERPOOL ID 0, USE COUNT 246 DSNB402I -DBA1 BUFFER POOL SIZE = 5000 BUFFERS AUTOSIZE = NO 641ALLOCATED = 5000 TO BE DELETED = 0IN-USE/UPDATED = 172 DSNB406I -DBA1 PGFIX ATTRIBUTE - 642CURRENT = NOPENDING = NOPAGE STEALING METHOD = LRU DSNB404I -DBA1 THRESHOLDS - 643 VP SEQUENTIAL= 80 DEFERRED WRITE = 30 VERTICAL DEFERRED WRT = 5, 0 PARALLEL SEQUENTIAL =50 ASSISTING PARALLEL SEQT= 0 DSNB999I -DBA1 DSNB1DBP SERVICE( 4 )OUTPUT DSNB999I -DBA1 4K PAGES 5000 DSNB999I -DBA1 1M PAGES 0 DSN9022I -DBA1 DSNB1CMD -DIS BUFFERPOOL NORMAL COMPLETION The Information Management Specialists 17. Real Storage Monitoring Monitor use of 1MB page frames across LPAR /DISPLAY VIRTSTOR,LFAREA (needs APAR OA31116) IAR019I message shows breakdown of 4KB and 1MB page frames and how much of each is currently available HWM usage is also shown useful for ensuring correct segmentation of 4K and 1MB pages in z/OS /DISPLAY VIRTSTOR,LFAREA IAR019I 12.31.04 DISPLAY VIRTSTOR SOURCE = GS TOTAL LFAREA = 1024M LFAREA AVAILABLE = 1023M LFAREA ALLOCATED (1M) = 10M LFAREA ALLOCATED (4K) = 2M MAX LFAREA ALLOCATED (1M) = 10M MAX LFAREA ALLOCATED (4K) = 2MThe Information Management Specialists 18. Real Storage Other Issues Ensure PTFs for z/OS APAR APAR OA37821 and corresponding DB2 APARPM49816 are applied Fixes MSTR CPU issue associated with MVS COUNTPAGES function used for real storage monitoring (introduced by our good friend PM24723) Especially noticable where more than one DB2 subsystem resides on same LPAR Needs IPL to implement z/OS fix What about CONTSTOR and MINSTOR? Enabling these ZPARMs in previous releases allowed you to spend a little more CPU in exchange for improved virtual storage utilisation Both ZPARMs apply to 31-bit storage only, so are less important in DB2 10 Recommendation is CONTSTOR=MINSTOR=NO once you have proven VSCR in DB2 10The Information Management Specialists 19. Other Limiting Factors DBM1 Virtual Storage should no longer be anissue, but other limiting factors on verticalscalability still remain ESQA/ECSA (31-bit) storage Active log write contention (LC19) SMF volumes (DB2 10 SMF compression can help)The Information Management Specialists 20. Use New DB2 10 Features Only consider use of new features when you are sure youhave fully considered all the previous items and DB2 10 isproperly bedded in Remember that VSCR enhancements are available in CM,but you need package rebind to get maximum benefitsThe Information Management Specialists 21. Use New DB2 10 Features Exploit 1MB real storage frames Needs PGFIX=YES, but many customers still havent exploited this feature in their DB2 8 and DB2 9 systems despite significant potential CPU savings (up to 6% seen) PGFIX=YES benefits dependent on I/O rate, and you need to back pools 100% with real storage (scary if youre already running lean on real storage availability) 1MB page frames specified by LFAREA in IEASYSnn parmlib member, and need IPL to implement Use /DISPLAY VIRTSTOR,LFAREA after implementation to ensure sizing is OK, as conversion between 4K and 1MB frames costs CPU Ensure you are up to date on z/OS maintenance before enablingThe Information Management Specialists 22. Use New DB2 10 Features Possibility for less DB2subsystems (and possiblyless LPARs) in a data sharingenvironment Lower data sharing overhead Less systems to manage / maintain Minimum of 4 members / 2 LPARs still recommended for high availabilityThe Information Management Specialists 23. Use New DB2 10 Features More space for performance critical storage objects such as dynamicstatement cache Improve DSC hit ratio and reduce CPU accordingly Potential for significant MAXKEEPD increase is a key part of the overall DB2 10value proposition for SAP customers Potential to reduce CPU cost through more use of persistent threads withRELEASE(DEALLOCATE) CICS protected entry threads DB2 10 High-Performance DBATs Remember trade-off on BIND/DDL concurrency with use ofRELEASE(DEALLOCATE) Dont forget that youll need to allocate additional real storage to back anyincreases above!The Information Management Specialists 24. Summary & Questions The Information Management Specialists 25. Summary Make sure you have enough real storage before upgradingto DB2 10 Change your focus from monitoring virtual storage tomonitoring real storage If you are scaling vertically or consolidating subsystems, beaware of other limiting factors that were previouslyinvisible but may now come to bite you Once youve addressed ALL of the above, start to make useof the new DB2 10 storage-related features Remember to add more real storage as required in order to prevent pagingThe Information Management Specialists 26. Feedback / QuestionsJulian Stuhler [email protected] Information Management Specialists 27. Additional InformationThe Information Management Specialists 28. Real Storage Monitoring New IFCID225 CountersADDRESS SPACE SUMMARY DBM1EXTENDED REGION SIZE (MAX):1587544064 24-BIT LOW PRIVATE:22118424-BIT HIGH PRIVATE :450560 31-BIT EXTENDED LOW PRIVATE :6960332831-BIT EXTENDED HIGH PRIVATE:38600704 CURR HIGH ADDR 24-BIT PRIV REGION : X0003C000CURR HIGH ADDR 31-BIT PRIV REGION : X270E9000 31-BIT RESERVED FOR MUST COMPLETE :15875440631-BIT RESERVED FOR MVS :25827760 STORAGE CUSHION WARNING TO CONTRACT: 158754406TOTAL 31-BIT GETMAINED STACK: 4341760 TOTAL 31-BIT STACK IN USE: 3997696TOTAL 31-BIT VARIABLE POOL:12836864 TOTAL 31-BIT FIXED POOL: 86016TOTAL 31-BIT GETMAINED: 1002384 AMOUNT OF AVAILABLE 31-BIT :1479335936SYSTEM AGENT STACK STORAGE IN USE : 1234567TOTAL 64-BIT VARIABLE POOL:10162176 TOTAL 64-BIT FIXED :7503872TOTAL 64-BIT GETMAINED: 438127168 TOTAL 64-BIT PRIVATE FOR STOR MANAG:1925120REAL 4K FRAMES IN USE :20577AUXILIARY SLOTS IN USE: 4122764-BIT REAL 4K FRAMES IN USE:1212964-BIT 4K AUX SLOTS IN USE: 27055ABOVE VALUE W/O BP STORAGE:10000ABOVE VALUE W/O BP STORAGE:4096HWM 64-BIT REAL 4K FRAMES IN USE:43047HWM 64-BIT AUX SLOTS IN USE : 27059QW0225CTLP (S): OFF QW0225CTLS (S): OFFThe Information Management Specialists 29. Real Storage Monitoring New IFCID225 CountersSHARED/COMMON STORAGE SUMMARYEXTENDED CSA SIZE: 315179008 31-BIT COMMON FIXED POOL:112230431-BIT COMMON VARIABLE POOL:716800 31-BIT COMMON GETMAINED :7966164-BIT COMMON FIXED POOL: 364134464-BIT COMMON VARIABLE POOL : 3774873664-BIT COMMON GETMAINED : 064-BIT COMMON FOR STOR MANAG:140083264-BIT SHARED VARIABLE POOL:13545472 64-BIT SHARED FIXED : 312934464-BIT SHARED GETMAINED: 4220208 64-BIT SHARED FOR STOR MANAG: 205619264-BIT SHR SYSTEM AGENT STACK (AS) : 268435456 64-BIT SHR SYSTEM AS IN USE :3355443264-BIT SHR NON-SYSTEM AS : 805306368 64-BIT SHR NON-SYSTEM AS IN USE : 1048576SHARED MEMORY OBJECTS: 564-BIT SHARED MEMORY PAGES : 117440512 HWM 64-BIT SHARED BYTES : 48103633715264-BIT SHARED PAGES BACKED IN REAL :9395 AUX SLOTS USED FOR 64-BIT SHARED: 538564-BIT PAGES PAGED IN FROM AUX STO :5317 64-BIT PAGES PAGED OUT TO AUX STO :4157764-BIT SHR STG REAL 4K FRMS IN USE :12344459 64-BIT SHR STG 4K AUX SLTS IN USE :51264-BIT STK STG REAL 4K FRMS IN USE :12345789 64-BIT STK STG 4K AUX SLTS IN USE :25664-BIT COM STG REAL 4K FRMS IN USE :12345123456789 64-BIT COM STG 4K AUX SLTS IN USE : 1234555555SERVICE INFORMATION:QW0225_WARN : 0QW0225_REALAVAIL: 0QW0225_REALAVAILLO: 0QW0225_REALAVAILOK: 0QW0225_ESQAS: 0QW0225_ESQA_ALLOC : 0QW0225_ESQA_HWM : 0QW0225_ECSA_ALLOC : 0QW0225_ECSA_HWM : 0QW0225_ECSA_CONV: 0QW0225_CTGP : OFFQW0225_DISC : OFF The Information Management Specialists 30. Further Reading IBM DB2 10 Home Page http://www-01.ibm.com/software/data/db2/zos/db2-10/ White Paper DB2 10: A Smarter Database for a Smarter Planet https://www14.software.ibm.com/webapp/iwm/web/signup.do?source=s w-infomgt&S_PKG=wp-z-db2-smarter Also available as part of a flashbook - ISBN: 1583473610 DB2 10 for z/OS Performance Topics Redbook (SG24-7942) http://www.redbooks.ibm.com/abstracts/sg247942.html?Open IDUG International DB2 User Group http://www.idug.org/The Information Management Specialists