COMPUWARE CHUCK HOOVER SERIES Everything You Ever Wanted to Know About DB2 Buffering Table of Contents DB2 Database Services Basic Functions of the Buffer Manager Improvements V3 - V6 The Current Sub-System Configuring & Tuning DB2 Database Services Basic Functions of the Buffer Manager Improvements V3 - V6 The Current Sub-System Configuring & Tuning DB2 Address Spaces OS/390 IBM Resource Lock Manager (IRLM) DB2 DB2 System Services Database Services Address Address Space Space Sort Work Area Allied Agent Address Space RID Sort Area Log Buffers DB2 Log BSDS Buffers DB2 Bootstrap Data Set BSDS Virtual Buffer Pool(s) 1.6 GB Max. DB2 Database DB2 Catalog Directory Distributed Data Facility Hiperpool(s) EDM Pool Locking Control Elements Optional “Stuff” IMS, CICS, TSO, Batch Applications Stored Procedure Address Space(s) Data Spaces DB2 Database Services Application Program Relational Buffer Manager Data Manager Data System (RDS) DB2 Data- OS/390/DFP base Physical 4K Physical Blocks Blocks (Pages) on DASD Logical Records Results Set Consisting (Rows) of Columns from Within Indexes & Table Spaces Multiple Rows from Multiple Tables Lock Manager, Index Manager and Log Manager Fetch Columns from Rows of Results Table (Set) DB2 Attach Relational Data System Application Program Relational Data System (RDS) Qualified Rows from Data Manager Optimizer for Access Path Selection Stage Two Predicates Column Movement Join, Union Logic Sorting Column and Scalar Functions Database Manager Data Manager Access Path Navigation GETPAGE RELPAGE Logical Records (Rows) Within Indexes WRITE and Table Spaces SET PENDING Lock Manager, Index Manager and Log Manager Data Page Management Index Page Management Page Space Management Work File Management Buffer Manager Interface Stage One Predicates DFP/VSAM DB2 Database DB2 Catalog Directory DB2 Database OS/390/DFP DB2 Database DB2 Working Storage DB2 Buffer Pool Access Method Logic Device Error Handling Buffer Manager Major Functions Buffer Manager BP49 BP3 . GETPAGE, RELPAGE, SET WRITE PENDING . BP2 BP1 OS/390/DFP BP0 4K Buffers BP49 BP3 OS/390/ADMF . Data Set OPEN / CLOSE Buffer/Cache Management Read Engines Write Engines DFP / DASD Interface Hiperspace Management . BP2 BP1 BP0 MVPG V3 With Hiperpools 8K Buffers BP49 BP3 . . BP2 BP1 BP0 16K Buffers OS/390/XES V4 With Data Sharing BP49 BP3 . . BP2 BP1 BP0 32K Buffers Coupling Facility Communication DB2 Database Services Flow Buffer Manager Data Manager Relational Data System (RDS) Application Program Fetch Cursor DECLARE ... CURSOR FOR SELECT (20 COLUMNS) FROM CUSTOMER WHERE SC1 = :HV1 AND SC2 = :HV2 AND SC3 = NSC1 DB2 Database Services Flow Relational Buffer Manager Data Manager Data System GETPAGE . . . . . . . . . . . . . . . . .(RDS) .... OBID X PAGE 2 (OBID X PAGE 2) Application Program Fetch Cursor Row 1 Row 2 Row 3 Row 4 Row 5 Row 6 OBID X PAGE 3 Row 3 Row 4 Fetch Cursor Row 6 RELPAGE (OBID X PAGE 2) GETPAGE (OBID X PAGE 3) Row 1 Row 1 Row 2 Row 2 Row 6 Row 6 RELPAGE (OBID X PAGE N) Return Code +100 Process Columns from Page 3 Row 1 Fetch Cursor Process Columns from Page N Row 6 Fetch Cursor GETPAGE Page in Virtual Buffer Pool? Yes Empty Buffer in VBP? Yes Buffer Pool Hit Find Least-Recently-Used Buffer in VBP Move L-R-U Buffer Contents to HP? No Write L-R-U Buffer Contents to Hiperpool Steal L-R-U Buffer for Requested Page Page in Hiperpool? Move Page to Virtual Buffer Pool - Hiperpool Hit Free Buffer in Hiperpool Post LRU Chain and Return No Read Page From Disk - BP Miss Buffer Pool Organization Control Information and L-R-U Anchor Points Hash Table Virtual Buffer Pool N Buffer Headers Please GETPAGE OBID X Page Y Look-Aside Hash Search Hash Table Which Pool? Buffer Headers Data Manager P(3) = 0.14038 P(5) = 0.17547 P(<=5) = 0.61596 P(>10) = 0.00284 Hashing Algorithm “Miss” OBID Y Page N OBID Z Page B OBID T Page B OBID W Page Q OBID X Page G Repeat Logic for Hiperpool (if one exists) Stop if DB2 V2.R3 (VBP Miss) L-R-U* Buffer Chaining For Locating For Caching Hash Table Control Information and L-R-U Anchor Points Most Recent Sequential Least Recent Sequential (STEAL) Most Recent Random (HOT) Least Recent Random (COLD) OBID Y Page N OBID Z Page B OBID X Page E OBID Y Page F OBID W Page G OBID T Page B OBID X Page D OBID Z Page D OBID Y Page H OBID W Page Q OBID X Page C OBID Z Page H OBID X Page A OBID X Page G OBID W Page E OBID Y Page E OBID Y Page C OBID X Page B OBID X Page I OBID Z Page B * Least-Recently-Used Buffer Aging and Stealing Random GETPAGE Calls for Page Set X1 Page P1 tn t0 Random Synchronous Disk Read Page P1 Page Set X1 on Disk Virtual Buffer Pool Overlay LeastRecentlyUsed Page With Target of Current GETPAGE Call Random Synchronous Disk Read Page P1 From Time t0 to Time tn Eight GETPAGE Calls Two synchronous disk reads Overlaid with new page once Nine L-R-U chain modifications Buffering Versus Caching Buffer: Something that reduces the shock of impact An area to store data temporarily Batch or Sequential Process Buffer Set “A” Input “Flat” File Fill Buffer Set “A” Batch Program Waits Output “Flat” File Buffering Versus Caching Buffer: Something that reduces the shock of impact An area to store data temporarily Batch or Sequential Process Buffer Set “A” Input “Flat” File Fill Buffer Set “B” Batch Program Reads and Processes Logical Records in Buffer Set “A” and Writes Updated Logical Records in Buffer Set “C” Buffer Set “B” Buffer Set “C” Output “Flat” File Buffering Versus Caching Buffer: Something that reduces the shock of impact An area to store data temporarily Batch or Sequential Process Buffer Set “A” Input “Flat” File Fill Buffer Set “A” Buffer Set “D” Batch Program Reads and Processes Write Buffer Logical Records in Buffer Set “B” Set and Writes Updated Logical “C” Records in Buffer Set “D” Buffer Set “B” Buffer Set “C” Output “Flat” File Buffering Versus Caching Buffer: Something that reduces the shock of impact An area to store data temporarily Batch or Sequential Process DB2 Table Space Read Engine Write Engine Virtual Buffer Pool DB2 Index Probe Buffer Manager Index X PAGE 2 Key X1 Key X2 Key X3 Key X4 Key X5 Key X6 NLPage N1 NLPage N2 NLPage N3 NLPage N4 NLPage N5 NLPage N6 Index X PAGE N5 Key X40 Leaf Pg L40 Key X42 Leaf Pg L42 Key X44 Leaf Pg L44 Key X46 Leaf Pg L46 Key X48 Leaf Pg L48 Key X50 Leaf Pg L50 Index X PAGE L44 Key X422 Key X425 Key X429 Key X433 Key X437 Key X440 RID X422 RID X425 RID X429 RID X433 RID X437 RID X440 Table Space X PG Y Data Manager Relational Data System (RDS) SELECT... GETPAGE (Index X Page 2) ............................. Table Look-Up Equal or Higher GETPAGE (Index X Page N5) Table Look-Up Equal or Higher GETPAGE (Index X Page L44) Table Look-Up Equal or Higher GETPAGE (Table Space X Page Y) Table Space X PG Y Return Code 0 Application Program Index Caching Cache: A place for storing provisions or valuables for an extended period of time Online or Random DB2 Process DB2 Indexes Index Buffer Pool DB2 Buffer Manager Searches Index B-Tree in Index Buffer Pool to Locate RID of Target Row in Table Space Index Cache Table Space Buffer Pool DB2 Table Space Synchronous I/O Buffers GETPAGE INDEX X PAGE 2 GETPAGE INDEX X NLPAGE Y GETPAGE INDEX X LPAGE Z GETPAGE TABLE SPACE Q PAGE R (3 GETPAGE Calls - 3 “Hits”) (1 GETPAGE Call - 1 “Miss”) Page Set x Control Information Deferred Write Queue Buffer Pool N Headers Counter = 7 Oldest Modified Buffer Newest Modified Buffer 6 1 5 4 2 3 Virtual Buffer Pool N 7 Write Engines Page Set X Control Information 6 W Counter = 2 Oldest Modified Buffer Newest Modified Buffer 7 W W W W Virtual Buffer Pool N DB2 Buffer Manager Asynchronous Write Engine 2 3 5 1 Address Span <= 150 Pages 4 Page Set X Deferred Write Engine Triggers 100 80 Abbreviated Name Full Name Permitted Range IMTH 60 40 Immediate Write Not Threshold Alterable DWQT Deferred Write 0-90% Queue Threshold VDWQT Vertical Deferred 0-90% Write Queue Threshold 20 0 Plus - DB2 Checkpoint - QUIESCE Command - Data Set Close - DB2 Shutdown Default Value 98% 50% 10% Please RELPAGE Z and GETPAGE A Data Manager Sequential Prefetch Buffer Pool X Trigger Pages A Y Z Asynchronous Read Engine DB2 Page Set Sequential Prefetch - P Quantity Prefetch Quantity (P) Asynchronous Read Engine 4K Pools No. of ApplicaBuffers tion Utilities in Pool Programs 8 to 223 224 to 999 > 999 8 16 32 16 32 64 DB2 Page Set 32K Pools No. of ApplicaBuffers tion Utilities in Pool Programs 1 to 12 12 to 99 > 99 1 2 4 2 4 8 Sequential Detection CUB Prefetch Quantity (P) T T T T Plan A Statement X Index Probe Plan B Statement Y Table Space Scan with Prefetch CUB T T CUB = Cursor Block One per Open Cursor "5-Out-of-8 Within P/ 2" Trigger Page = (P/ 2) + 1 P Asynchronous Read Engine DB2 Page Set Asynchronous Read Engine DB2 Page Set RID Pool List Prefetch Sorted RIDs P Plan A Statement X Multiple Index Access T Plan B Statement Y Table Space Scan with Prefetch T T Asynchronous Read Engine DB2 Page Set Asynchronous Read Engine DB2 Page Set Buffer Inventory Group Buffer Write Pool Buffers Pending Free Buffers (Empty) Uncommitted Write Pending (Changed Page) Modified Pages Hiperpool Buffers Invalid Buffers Free Buffers (Empty) Being Read for Application Thread by Data Manager Active Buffers (in Virtual Buffer Pool) Virtual Buffers Invalid Buffers Version 4 With Data Sharing Free Buffers (Empty) Available (Stealable) Buffers Buffer Status Buffers Page Being Write Lock* Read Pending Buffer Status Stealable Description of Buffer and Contents None No No Contents can be overlaid or reclaimed S or U Yes No Non-Stealable Contents in use by Application Thread X Yes Yes Non-Stealable Contents in use and modified by Application. Unit-of-recovery not yet committed. X No Yes Non-Stealable Contents modified by Application. Unit-ofrecovery not yet committed. None No Yes X No No Non-Stealable Contents modified by Application. Unit-ofrecovery committed. Contents to be rewritten to disk by asynchronous write engine.** Contents modified by Application. Unit-ofStealable recovery not committed. Contents have been rewritten to disk and can be overlaid or reclaimed. * Assuming page-level locking by Application Thread. ** Buffer contents can be reclaimed and used by any application prior to being rewritten. More Buffer Categories Free Buffers Random Buffers Sequential Buffers * Sequential Prefetch * Sequential Detection * * DSNDB07 Work Files * * --ORDER BY --GROUP BY * --UNION --Merge Scan Joins Index Probes Index Look-Aside Online Transactions Using Small to Large Tables Joins of Smaller Tables (or Smaller Results Sets) More Buffer Pool Thresholds 100 80 60 40 20 0 Abbreviated Name IMTH Full Name Immediate Write Threshold DWQT Deferred Write Queue Threshold VDWQT Data Set Deferred Write Queue Threshold DMTH Data Manager Threshold SPTH Sequential Prefetch Threshold VPSEQT Virtual Buffer Pool Sequential Threshold VPPSEQT VBP Parallel Sequential Threshold Permitted Range Default Value Not Alterable 0-90% 98% 0-90% 10% Not Alterable 0-100% 95% 0-100% 80% 0-100% 40% 50% 90% Buffer Pools - Pre-Version 3 Expanded Storage as Auxiliary Storage Central Storage DBM1 Virtual Address Space B2 B1 Disk as Auxiliary Storage A Disk for DB2 Object Storage A =DB2 B =OS/390 Monitoring Storage Utilization DB2PM Systems Statistics: Expanded Storage DB2 Hiperpool OS/390 ESO Hiperspace DBM1 (Virtual Buffer Pool) “PAGE-INS REQ-READ” / time interval in seconds OS/390 Virtual Storage Manager page-ins from auxiliary storage to central storage per second to process DB2 data “PAGE-INS REQ. FOR WRT” / time interval in seconds OS/390 Virtual Storage Manager page-ins from auxiliary storage to central storage per second to write DB2 updated data back to DB2 disk page set All page-ins and -outs should be between Central Storage and Expanded Storage (Need help from OS/390 RMF Report*). If disk paging is used, pool is too big or expanded storage is too small If total PAGE-INS > 100 per second and expanded storage is available, implement hiperpool (Try HP = 2 x VBP size) Monitor DBM1 page movement between CS and ES - If “To ES” >> “To CS” consider multiple buffer pools * Paging Report from Program IFASMFDP Reporting on Type 70:79 Records DB2 Version 3 Hiperpools OS/390 IBM DB2 Resource System Lock Services Manager Address (IRLM) Space DB2 Database Services Address Space Virtual Buffer Pools(s) 1.6 GB Max. Data ™ Hiperspace is a trademark of the IBM Corporation Allied Agent Address Space OS/390 Hiperspaces™ 2 GB Max. 2 GB Max. 2 GB Max. DB2 Hiperpool = One to Four OS/390 Hiperspaces 8 GB Max. 2 GB Max. Virtual Buffer Pool / Hiperpool DB2 Indexes DB2 Data Services Address Space (DBM1) OS/390 / ESO Hiperspace(s) HPn VBPn DB2 Table Spaces MVPG Synchronous Single Page Movement Disk I/O DB2 Catalog Directory DB2 Working Storage Virtual Buffer Pool n ADMF Asynchronous Multiple Page Movement Hiperpool n Migration Sub-tasks DB2 Data Services Address Space (DBM1) VBPn Asynchronous Migration Sub-task Virtual Buffer Pool n SOURCE: L-R-U Unmodified Pages OS/390 / ESO Hiperspace OVERLAYS HPn Hiperpool n TARGET: (1) Empty Pages (2) L-R-U Pages Virtual Buffer Pool / Hiperpool . . . Expanded Storage as Hiperspace Expanded Storage as Auxiliary Storage B2 Disk as Auxiliary Storage Disk for DB2 Objects B1 Central Storage A2 Virtual Storage Address Spaces A1 A =DB2 B =OS/390 Virtual Buffer Pool n Hiperpool n A Hot Page - Efficient Caching Random GETPAGE Calls for Page Set X1 Page P1 t0 tn Virtual Buffer Pool Hiperpool Page P1 Page Set X1 on Disk From Time t0 to Time tn Eight GETPAGE Calls One synchronous disk read One ADMF page move to the hiperpool One MVPG move to the virtual pool Nine L-R-U chain modifications A Cold Page - Inefficient Caching t0 Random GETPAGE Calls for Page Set X1 Page P2 Minutes, Hours, Days?? tn Virtual Buffer Pool “Sent to Old People’s Home” Page P2 Page P2 Hiperpool Page Set X1 on Disk “Sent to Old People’s Home” Hiperpool “Dies of Old Age” From Time t to Time t 0 n “Dies of Old Age” GETPAGE Calls =2 VBP Hits “Reref Ratio” = 0 (0%) Synchronous Reads = 2 (100%) Hiperpool ADMF = 2 (?) Hiperpool Parameters 100 Abbreviated Name IMTH 80 DWQT 60 VDWQT DMTH 40 SPTH 20 VPSEQT VPPSEQT 0 HPSEQT Full Name Immediate Write Threshold Deferred Write Queue Threshold Data Set Deferred Write Queue Threshold Data Manager Threshold Sequential Prefetch Threshold Virtual Buffer Pool Sequential Threshold VBP Parallel Sequential Threshold Hiperpool Sequential Steal Threshold Permitted Range Default Value Not Alterable 0-90% 98% 0-90% 10% Not Alterable 0-100% 95% 0-100% 80% 0-100% 40% 0-100% 80% Plus CASTOUT = YES or CASTOUT = NO 50% 90% "ALTER-able" Pools 1 DISPLAY BUFFERPOOL (BPX) DETAIL (INTERVAL) LSTATS ALTER BUFFERPOOL (bpname) VPSIZE (integer) HPSIZE (integer) VPSEQT (integer) HPSEQT(integer) VPPSEQT (integer) DWQT (integer) VDWQT (integer) CASTOUT (YES | NO) 2 ALTER BUFFERPOOL (BPX) VDWQT (2) DB2 Online Pool Statistics BUFFERPOOL NAME BPX, BUFFERPOOL ID X, USE COUNT 1 VIRTUAL BUFFERPOOL SIZE = 2500 BUFFERS ALLOCATED = 2500 TO BE DELETED IN-USE / UPDATED = 564 22.6% HIPERPOOL SIZE ALLOCATED BACKED BY ES = 5000 BUFFERS CASTOUT = 5000 TO BE DELETED = 5000 Only One Page Set Opened? = 0 = YES = 0 THRESHOLDS VP SEQUENTIAL DEFERRED WRITE = = RANDOM GETPAGE SEQ. GETPAGE DMTH HIT = 260473 SYN READ I/O (R) = 65536 SYN READ I/O (S) = 0 = 15114 = 23 SEQUENTIAL PREFETCH REQUESTS PAGES READ = = = SYS PAGES UPDATED ASYNC WRITE I/O = 87708 SYS PAGE WRITTEN = 2411 SYNC WRITE I/O = 13658 = 1820 DW HIT NO WRITE ENGINE = = = 1821 = 80 HP SEQUENTIAL 50 VERTICAL DEFERRED WRT = 80 20 Good! 35 PREFETCH I/OS 229 0 VERTICAL DWT HIT 0 229 Huh? Expanded Storage OS/390 Paging in Pages per Second OS/390 Paging Versus Pool Size Paging Disks Auxiliary Central Storage Storage Virtual Storage (Virtual Buffer Pool) 7,000 6,000 5,000 All Pages in Virtual Buffer Pool 4,000 3,000 2,000 5,000 Pages in VBP + Excess in Hiperpool 1,000 0 0 20 40 60 Total Pool Size in Thousands of Pages 80 Performance Versus Pool Size 360 Stat s 101 355 5,000 Pages in VBP + Excess in Hiperpool 350 345 All Pages in Virtual Buffer Pool 340 335 .190 330 .185 325 Response Time in Seconds Transactions per Second 365 .180 0 20 40 60 Total Pool Size in Thousands of Pages 80 .175 .170 All Pages in Virtual Buffer Pool .165 .160 .155 .150 5,000 Pages in VBP + Excess in Hiperpool .145 .140 0 20 40 60 Total Pool Size in Thousands of Pages 80 OS/390 Paging vs. DB2 Hiperpool Management 35 30 Total CPU Time 25 CPU Time Minimum at 2:1 HP:VBP 20 15 10 OS/390 Paging CPU Time DB2 CPU Time 5 0 0% 50% 100% Percentage of 34,096 Page Pool in Hiperpool Source: SHARE 83 Session 6418, "DB2 V3 User Experience With Data Compression and Bufferpool Enhancements", R. Perih, Smith Barney A DB2 Data Sharing Group ... Coupling Facilities OS/390 OS/390 Member G001 Member G002 Sysplex Timers OS/390 ... Member G00n DB2 Subsystem Members ESCON Channels & Switching Shared DFP Shared Data- Shared Cata- Shared log Target & base DB2 Dist.DB2 CatalogLibraries Directory Shared Disk & Data Sets Log DB07 BSDS for ZPARMS G001 of G001 Log DB07 BSDS for ZPARMS G002 of G002 ... Log DB07 BSDS for ZPARMS Gnnn of Gnnn Shared Disk But “Dedicated” Data Sets Coupling Facility Functions DB2 Member M001 IRLM GXM1 HP0 VBP0 HP1 VBP1 : A Coupling Facility Shared Communications Area (SCA) Group Shared Database Locks Buffer Pool Directories Group Buffer Pool 0 Group Buffer Pool 1 : DB2 Page Sets on Shared Disk DB2 Member M002 IRLM GXM2 HP0 VBP0 HP1 VBP1 : Group Buffer Pools, Virtual Buffer Pools & Hiperpools Coupling Facility System Communication Area Group Locking Elements DB2 Group A - Member C DB2 Group A - Member B DB2 Group A - Member A Group Buffer Pool N Directory Group BP N Local Cache Vector Page Registration DB2 Group A - Member A GBP N Directory X.Y.Z Q00 Reading Database X Page Set Y Page Z into Buffer Q Member A VBP N VBP N Local Cache Vector Buffer Q GBP N Buffers Database X Page Set Y Page Z Cache Coherency Member A Member C UOR 1: S-Lock Page Z GETPAGE Z (1st Read) RELPAGE Z COMMIT Release S-Lock UOR 2: Group Buffer Pool N UOR 3: S-Lock Page GETPAGE Z Page Is Invalid Retrieve from GBP N (4) RELPAGE Z COMMIT Release S-Lock Virtual Buffer Pool N I Local Cache Vector XI 3 X-Lock Page Z GETPAGE Z (2nd Read) SET WRITE PENDING RELPAGE Z COMMIT Write Page Z to GBP (3) Release X-Lock 4 Virtual Buffer Pool N 1 2 Page Z Database X Page Set Y Local Cache Vector Cross-Member Invalidation Member C Virtual Pool N Vector VVVVVVVVVVVVVVVVV VVVVVVVVVVVVVVVVV Hiperpool N Vector Hiperpool N Virtual Buffer Pool N GBPn Directory Entries X1.Y1.Z1 Q1 X2.Y1.Z6 Q2 X1.Y2.Z3 0 X1.Y1.Z2 Q3 0 R1 R6 R3 S7 0 S2 S5 Group Buffer Pool N CHANGED X1.Y1.Z1 Member A Virtual Pool N Vector VVVVVV IVVVVVVVVVV VVVVVVVVVVVVVVVVV Hiperpool N Vector System Administrator Decisions: - Number of Pools and Buffers - Number of Directory Entries - Total Structure Size Hiperpool N Virtual Buffer Pool N I Group Buffer Pool Caching DB2 CREATE TABLESPACE ALTER TABLESPACE CREATE INDEX ALTER INDEX BUFFERPOOL bpname CHANGED GBPCACHE ALL NONE (V6) Casting Out to Disk Member M00x Triggering Events Group Buffer Pool n 1 - Group Buffer Pool Checkpoint 2 - Exceed Group Threshold 3 - Exceed Class Threshold 4 - End Inter-DB2 R/W Interest 5 - “-STOP DATABASE” Command 3 Private Buffer for Member 2 4 1 Virtual Buffer Pool n Group Buffer Pool Duplexing Coupling Facility X Coupling Facility Y System Communication Area Group Locking Elements DB2 Group A - Member C PGBP N Directory SGBP N Directory DB2 Group A - Member B DB2 Group A - Member A I I Primary Group BP N I I I I Secondary Group BP N I I Local Cache Vector Local Cache Vector • Removes a single point-of-failure • Overlapped movement of updated pages to both pools • Secondary ready for immediate take over • Updated pages rewritten to disk from primary --secondary pages deleted if rewrite successful • Excellent for VALUABLE READ/WRITE page sets GETPAGE Page in Virtual Buffer Pool? No “GBPCACHE ALL”? No Page in Hiperpool? A No Yes Yes Yes Flagged as Valid? No A Flagged as Valid? No Page in Group Yes Buffer Pool? No Cache Miss - Sync. Group Buffer Pool Disk Read - 15 ms Hit - 0.2 to 0.4 ms Read Page from Disk into VBP Yes Move Page from GBP into VBP Yes Hiperpool Hit 0.04 ms Move Page from HP into VBP Post LRU Chain and Return Virtual Buffer Pool Hit - 0 ms Central Storage Only Storage Supporting Instruction Execution and Input/Output Operations Auxiliary Storage Temporary Storage for Address Space Pages That Overflow Central Storage Logical Address Space of 2 GB Max. Virtual Storage 2 GB OS/390 Address Spaces for System and Application Program Execution Operating System Nucleus, Virtual Storage Management and I/O Supervisor Implemented with a Combination of Expanded Storage and Disk Storage Processor Storage Bipolar Technology HighSpeed Processor Cache Central Storage 2 GB Max. Addressable at the Bit Level CMOS Technology Expanded Storage 8 GB Max. Addressable at the 4K Page Level HighSpeed Processor Cache Central Storage 32 GB Max. Addressable at the Bit Level But Can Only Address up to 2 GB OS/390 Data Spaces for DB2 Data Caching DBM1 ESO Address Hiperspace Space WRITE Virtual HiperBuffer READ pool Pool Move 4K-Pages DBM1 MVCL A,B MVCL C,D OS/390 Data Space Look-Aside Pool C VBP B A D Can Address Data Space When in “Access Register (AR) Mode” New way to configure virtual buffer pools Maximum of 128 x 2 gigabyte address spaces (Eight times too big for current processors) Use subset of 32 gigabyte current maximum Watch for future processor and OS/390 announcements Page Size and Pool Options Virtual Pools BP0 to BP49 BP8K0 to BP8K9 BP16K0 to BP16K9 BP32K to BP32K9 Hiperpools HP0 to HP49 HP8K0 to HP8K9 HP16K0 to HP16K9 HP32K to HP32K9 Group Pools GBP0 to GBP49 GBP8K0 to GBP8K9 GBP16K0 to GBP16K9 GBP32K to GBP32K9 Index page sets must have 4K page size Sort work file may be either 4K or 32K page size Must REORGanize to change page size (no ALTER command) Use DROP CREATE or DSNTIAUL to convert Everything still 4K physical blocks on disk Uses for Larger Pages Rows per Page Row Size 4K 8K 2K 3K 4K 5K 6K 7K 8K 2 1 1 ----- 4 2 2 1 1 1 1 16K 32K 8 5 4 3 2 2 2 Improved Sequential Processing Improved Volume Packing 16 10 8 6 5 4 4 Rows per Track 4K 8K 24 12 12 ----- 24 12 12 6 6 6 6 16K 32K 24 15 12 9 6 6 6 24 15 12 9 7 6 6 Best Single Row Random Processing Group Buffer Pool Options XRAY BASE INDEX XRAY_BASE GBP XPrimary VBP X GBP YPrimary VBP Y AUXILIARY INDEX XRAY AUXILIARY TABLE VBP Z GBPCACHE ALL Any page accessed by any member copies into GBP GBPCACHE CHANGED Any page modified by any member copied into GBP GBPCACHE NONE Coupling facility used for cross-validation only - Write at commit A Cold Page -- Efficient “Caching” Random GETPAGE Calls for Page Set X1 Page P2 t0 tn Smaller Virtual Buffer Pool No Hiperpool Buffer Stolen and Overlaid with Fresh Data Page P2 Page Set X1 on Disk Buffer Stolen and Overlaid with Fresh Data Page P2 From Time t0 to Time tn Two GETPAGE calls Two synchronous disk reads No L-R-U chain modifications (roundrobin algorithm) DB2 Data Retrieval Hierarchy External (Physical) I/O Internal (Logical) I/O Hiperpools Expanded Storage Group Buffer Pools Central Storage Virtual Buffer Pools Central and Auxiliary Storage SLOW “The Best I/O is NO I/O” “The Disk Farm” Disk -- The Original Concept Request for Random Access Central Channel Control Storage Unit “Core” 3.Transfer 2.Rotate 1.Seek Service Time = 1. Seek Time + 2. Rotational Latency + 3. Data Transfer No Control Unit Storage and Very Little Logic Physical Volume Flow of an External I/O OS/39 0 DB2 Buffer Manage r DFP IOS VSAM Access Metho d Input Output Supervisor CHANNEL Device Unit Channel Busy Control Block Control Unit Busy (UCB) Busy Device Busy QUEUING PENDING Delay Delay DISK CONTROL UNIT CACHE Search and Data Transfer CONNECT Time Seek Rotational Position Sensing DISCONNECT Time QUEUING Delay + PENDING Delay + CONNECT Time + DISCONNECT Time = DISK RESPONSE TIME FOR EXTERNAL I/O The Second Era Small Cache Control Units Basic Microcode < 64 MB of Cache Storage Some (KB) Non-Volatile Storage Goal: • Faster Batch Sequential Read and Write Using: • Read-Ahead Track Caching • Write-Behind Block Caching Control Unit Read-Ahead / Write-Behind OS/390 Access Method Channel I/O Area One Physical Block OS/390 Access Method Channel I/O Area X Physical Blocks Control Unit Cache Rest of Storage Track Control Unit Cache Storage One Block at a time With Non-Volatile Storage Disk Fast Write (DFW) Three Types of Page Sets Type 1 Type 2 Type 3 0400 0800 1200 1600 2000 Type 1 - High Access Activity All of the Time Type 2 - High Access Activity Some of the Time and Low Access Activity the Rest of the Time Type 3 - Low Access Activity All of the Time Incremental Improvements Hardware • More Cache Storage • Multi-track Caching • Cylinder Caching • More Non-Volatile Storage Microcode Goals: • Bypass Cache • Better Balance • Record Cache (RC) of Sequential vs. Random Processing • Dynamic Cache Management Extended • Adapt to Dynamic (DCME) Access Patterns The Current Era Goals: • Faster Batch Sequential Read and Write • Channel Speed Retrieval of Cached Data Larger Cache Control Units Using: • Cheap CMOS Advanced Storage Microcode • Sophisticated Control Unit >= 256 MB of Cache Storage Management More (MB) Non-Volatile Storage • Data Compression DB2 4K Page Read/Write Times 3380E 3380K 3380J 3390-3 3390-2 3390-1 U 2XP Queuing Pending Disconnect (Seek & Rotation) Connect (Search & Transfer) Total Read Hit Ratio Weighted Average ? ? 25.3 ? ? 24.3 ? ? 20.3 ? ? 22.1 ? ? 19.6 ? ? 16.6 ? ? 11.7 1.4 1.4 1.4 1.0 1.0 1.0 0.4 26.7 25.7 21.7 23.1 20.6 17.6 12.1 --- --- --- 20% 20% 20% 50% 26.7 25.7 21.7 18.6 16.7 14.3 6.1 Caching Efficiency A. Random GETPAGE Calls 193,239 VBP Hits 171,141 (A-B-C) 88.5% Internal I/O External I/O VBP Misses 22,098 (B+C) B. Hiperpool Hits 14,054 (7.3%) DB2 System Statistics Would 8,000 hits be good or bad? Disk Cache Controller Hits ??? C. Synchronous Reads 8,044 (4.2%) Disk Reads ??? SMF 42-6 Records SEQCACH Parameter versus Disk Microcode DB2 SEQCACH * BYPASS (Default) Signal disk controller to avoid caching for DB2 read requests to everything but sort work files SEQ (Optional) Signal disk controller to use caching for - sequential prefetch - dynamic prefetch * BY SUBSYSTEM Disk Controller Microcoded Logic Current Cache Hit Ratio** Range Low < 10% Medium 10 to 55% High >55% Action Inhibit caching Cache track Cache cylinder ** BY PAGE SET Santa Teresa Recommendations OS/390 Options: • Install Third Generation RAMAC Virtual Arrays • Install as Much Disk Control Unit Cache Storage as Possible • Define Maximum Number of Virtual Disk Volumes (UCBs) • Set Target of 50 - 80% Disk Cache Hit Ratio • Ignore Access Arm Movement Analysis DB2 Options: • Install as Much Central Storage as Possible for DB2 Virtual Buffer Pools, Hiperpools and Group Buffer Pools • Set Sequential Caching Parameter SEQCACH to SEQ • Use DB2 Compression in Concert with Control Unit Compression • Use SnapShot for Fast Backup “Until you can measure something, and express it in numbers, you have only the beginning of understanding.” -- Lord Kelvin DB2 Processing Cost Model Buffer Manager Data Manager Relational Data System (RDS) Optimized Access Path Indexes ------------------- Index Entries "Scanned" Table Spaces ________ ________ ________ ________ ________ ________ ________ ________ Stage One ________ Qualified ________ Rows ________ Rows "Scanned" Rows "Scanned" RID and SORT Work Areas Temporary Work Files SELECT With Host Variables Columns from Stage Two Qualified Rows SELECT & FETCH Basic Cost Factors Description of Cost Factor RDS Data Manager Buffer Manager 9,680 55 2,640 Number of Open/Fetch/Close Cursor Loops...................... NOFC Number of Host Variables in Predicates............................ NHV Number of Application Fetches (NQ2+1)........................... NF Number of Pages Processed (GETPAGE Calls)............ .......................................................................... NP Number of I/O Operations-Synchronous.....................................................................................................NIOS Number of I/O Operations-Asynchronous..................................................................................................NIOA Number of Rows Data Manager Examines ............................................................ Number of Search Arguments Evaluated at Stage 1*.............................................NRDME Number of Rows Qualified at Stage 1..................................................................... NSA1* Number of Data Columns Passed to RDS.............................................................. NQ1 NCR Number of RID Pointer Sorts Initiated............................... NPSI Number of RID Pointers Sorted......................................... NPS Number of Search Arguments Evaluated at Stage 2........ NSA2 Number of Column Functions Evaluated.......................... NCF Number of Rows Qualified at Stage 2.............................. NQ2 Number of Data Sorts Initiated......................................... NSI Number of Rows Sorted................................................... NRS Number of Sort Work File Pages Processed................... NSWP Number of Data Columns Passed to Application............ NCA Class 2 Accounting Trace Factor Path Length 2,420 7,260 42,240 92 75 440 22 20,000 440 75 176 440 40,000 880 4,840 33 660 * Arguments used in index probes should not be counted Table Space Scan Estimation Application Program SELECT (20 COLUMNS) FROM CUSTOMER WHERE SC1 = :HV1 AND SC2 = :HV2 AND SC3 = NSC1 Columns Returned Optimized Access Path = Table Space Scan NSA1 NRDME NQ1 NCR 50,000 Rows 571,429 NSA1 Pages NRDME NQ1 NCR 20,000 Columns RDS: NOFC = 1 NHV =2 NF = 1,001 NSA2 = 1 x NQ1 NQ2 = 1,000* NCA = 20 x NQ2 Buffer Manager Data Manager Relational Data System (RDS) DATA MANAGER: NSA1 = 2 x NRDME NRDME= 20,000,000 NQ1 = 50,000* NCR = 21 x NQ1 BUFFER MANAGER: NP = 571,429 NIOS =0 NIOA = 17,858 NP NIOS NIOA History Table with 20,000,000 100-byte rows Sequential Prefetch 17,858 Channel Programs Disk Model = 3390-3 Disk Cache = Turned Off Blocks to Read = 571,429 at 35 rows per page Buffers > 1,000 Type of I/O = Asynchronous Asynchronous = 1,143 Sec. Read Time or 19 Min. * Analyst’s Best “Guess” CPU Cost of Table Space Scan Database Services Address Space Data Buffer RDS Manager Manager Factor Factor Factor NOFC NHV NF NRDME NSA1 NQ1 NCR Path Times Performed Length 0.0% 0.0% 0.0% 571,429 0 17,858 2,420 1,382,858,180 7,260 0 42,240 754,321,920 19.7% Number of Rows Examined Number of Search Arguments Evaluated at Stage 1 Number of Rows Qualified at Stage 1 Number of Data Columns Passed to RDS 20,000,000 2*20,000,000 50,000 21*50,000 92 1,840,000,000 75 3,000,000,000 440 22,000,000 22 23,100,000 26.2% 42.7% 0.3% 0.3% Number of Search Arguments Evaluated at Stage 2 Number of Rows Qualified at Stage 2 Number of Data Columns Fetched by Application 1*50,000 1,000 20*1,000 75 440 33 3,750,000 440,000 660,000 0.1% 0.0% 0.0% 1,003 660 661,980 0.0% Number of Pages Processed (GETPAGE Calls) Number of Synchronous I/O Operations Number of Asynchronous I/O Operations 1 2 1,001 9,680 55 2,640 CPU Load 9,680 110 2,642,640 Number of Open/Fetch/Close Cursor Loops Number of Host Variables in Predicates Number of Application Fetches (NQ2+1) NP NIOS NIOA NSA2 NQ2 NCA Description %Contribution 10.7% System Services Address Space Class 2 Accounting Trace Factor Total Processor Path Length: 7,030,444,510 100.0% Elapsed ("Wall Clock") Time 9021-711 CPU Time = 119.2 sec. 9672-RX5 CPU Time = 211.1 sec. 1,143 sec. = Asynchronous Disk Read Time 0 200 400 600 800 1,000 1,200 Time, in Seconds ~ 19 Minutes DB2 I/O Model for Retrieval Parallel Sysplex Coupling Facility Group Buffer Pools IBM 3390 Models 1, 2 and 3 IBM 3990 Cached Controller Cache Storage Asynchron. Read Engines IBM RAMAC VA Cache Storage Virtual Buffer Pools Buffer Manager Expanded Storage (ES) OS/390 Paging Disk Aux. Storage (AS) OS/390 Paging Aux. Storage (AS) DB2 ESO Hiperpools DBM1 Address Space Virtual Storage (2 GB) Data Manager Central Storage (CS) DB2 Retrieval Times In In Replace In AS On Disk In Hiper- In In ES Page in on In Disk RanVBP pool GBP CS as AS CS Disk Cache Seq. Pref Seq. dom Y Y Y Y N N Y Y N N N N * 3390 Model 1 N Y Y N Y Y N N N N Y Y N N N N Y N A V O I D !!! Y N N N Y Y Y Elapsed Relative Time* Speed 0 40 mic. 75 mic. 0 40 75 40 mic. 75 mic. 40 75 300 mic. 300 mic. 300 300 980 mic. 980 1.7* mil. 1,700 8.1* mil. 8,100 17.6* mil. 17,600 DB2 Retrieval Times In In Replace In AS On Disk In Hiper- In In ES Page in on In Disk RanVBP pool GBP CS as AS CS Disk Cache Seq. Pref Seq. dom Y Y Y Y N N Y Y N N N N N Y Y N Y Y N N N N Y Y N N N N * 3390 Model 1 Y N A V O I D !!! Y N N N Y Y Y Elapsed Relative Time* Speed 0 40 mic. 75 mic. 0 40 75 40 mic. 75 mic. 40 75 300 mic. 300 mic. 300 300 980 mic. 980 1.7* mil. 1,700 8.1* mil. 8,100 17.6* mil. 17,600 Sum of all working sets is too big for your central storage (CS) and expanded storage (ES) DB2 I/O Model for Writing IBM 3390 Models 1, 2 and 3 IBM RAMAC VA Cache Storage IBM 3990 Cached Controller Cache Storage NonVolatile Storage (NVS) DBM1 Address Space Virtual Storage Asynchronous Write Engines Virtual Buffer Pools Synchronous Write Buffer Manager Paging Disk Auxiliary Storage (AS) Expanded Storage (ES) Asynchronous Deferred Write: Best Case: 32 consecutive pages on disk or Writing to NVS Worst Case: 1 page in aux. storage Santa Teresa Skip-Sequential (Min. Seek) Synchronous Write: Rare -- Sign of Very Hot Pages Central Storage (CS) = 2 ms = 2 ms = 60 ms = 4 ms = 20 ms Sizing - Proactive or Reactive? Virtual Buffer Pool(s) 1.6 GB Max. Hiperpools 8 GB Max. Group Buffer Pool(s) ? GB Max. A. Total Buffer Pool Size (in Megabytes) = 40 +(Processor “M-Value” / 10) Given an IBM 9672-R15 (5th generation CMOS @ 112 MIPS) Pool Size = 40 + (2710/10) = 311 megabytes (about 76,000 pages) B. Total Buffer Pool Size (in Megabytes) = 40 + (Transactions per Second * 10) Assuming 95 transactions per second Pool Size = 40 + (95 * 10) = 990 megabytes (about 242,000 pages) NOTE: 10 megabytes per transaction = 2,500 pages! Source: SG24-2244 DB2 for OS/390 Capacity Planning GETPAGE Rates vs. Buffer Pool Size 800 GETPAGEs per Second 700 600 500 400 20 MB Pool Size 300 200 40 MB Pool Size 100 0 8 9 10 11 12 13 14 15 16 Hour of the Day Source: SHARE 76 Session I468, "A Systems Perspective of Subsystem Performance", Tom Birmingham, IBM WSC 80 MB Pool Size System Characteristics vs. Buffer Pool Size 140 120 20 MB 40 MB 80 MB 132.1 112.2 100 100 100 100 100 91.8 88.3 76.5 80 72.1 60 40.6 40 28.7 20 0 GETPAGEs During Prime Shift No. of Synchronous Reads CPU per GETPAGE Transaction Response Time Source: SHARE 76 Session I468, "A Systems Perspective of Subsystem Performance", Tom Birmingham, IBM WSC Key Statistics for Sizing Pool Too Small DM Threshold Hits Synchronous Writes OS/390 Disk Pages/Second GETPAGEs/Second Synchronous Reads CPU/GETPAGE Transaction Response Time Pool is Optimal for Users Pool Too Large DB2PM Version 3 Statistics Report - Long BP0 GENERAL QUANTITY --------------------------------------------- ---------------CURRENT ACTIVE BUFFERS 71 UNAVAIL.BUFFER-VPOOL FULL 0 BP0 READ OPERATIONS QUANTITY /MINUTE ----------------------------------------------- ---------------- ------------GETPAGE REQUEST 6134602 153.4K GETPAGE REQUEST-SEQUENTIAL 5941363 D 148.8K 193239 4831.76 A GETPAGE REQUEST-RANDOM NUMBER OF DATA SETS OPENS 0 SYNCHRONOUS READS 8570 214.28 SYNCHRON. READS-SEQUENTIAL 526 13.15 G MAX NUMBER OF ALLOC.BUFFERS 0 8044 201.13 BUFFERS ALLOCATED - VPOOL 10001 C SYNCHRON. READS-RANDOM BUFFERS ALLOCATED - HPOOL 20000 GETPAGE PER SYN.READ-RANDOM 24.0 HPOOL BUFFERS BACKED 20000 SEQUENTIAL PREFETCH REQUEST 70375 1759.66 SEQUENTIAL PREFETCH READS 51850 1296.46 DFHSM MIGRATED DATA SET 0 PAGES READ VIA SEQ.PREFETCH 1597717 39.9K DFHSM RECALL TIMEOUTS 0 S.PREF.PAGES READ/S.PRF.READ 30.8 HPOOL EXPANS. OR CONTRACT. 0 LIST PREFETCH REQUESTS 168 4.20 VPOOL EXPANS. OR CONTRACT 0 LIST PREFETCH READS 11 0.28 VPOOL OR HPOOL EXP.FAILURE 0 PAGES READ VIA LIST PREFTCH 60 1.50 L.PRF.PAGES READ/L.PREF.READ 5.5 GETPAGE OPERATIONS-FAILED 0 DYNAMIC PREFETCH REQUESTED. 320 8.00 CONCUR.PREF.I/O STREAMS-HWM 0 DYNAMIC PREFETCH READS 77 1.93 PREF.I/O STREAMS REDUCTION 0 PAGES READ VIA DYN.PREFETCH 1815 45.38 PARALLEL QUERY REQUESTS 0 D.PRF.PAGES READ/D.PRF.READ 23.6 PARALL.QUERY REQ.REDUCTION 0 PREF.QUANT.REDUCED TO 1/2 0 PREF.DISABLED-NO BUFFER 0 0.00 PREF.QUANT.REDUCED TO 1/4 0 PREF.DISABLED-NO READ ENG 0 0.00 B SYNC.HPOOL READ ASYN.HPOOL READ-WITHOUT ADM HPOOL READ(NO ADM) - FAILED ASYN.HPOOL READ-WITH ADM HPOOL READ(ADM) - FAILED 14054 351.41 6781 F 169.55 0 0.00 240138 E 6004.43 0 0.00 Buffer Pool Hit Ratio Batting Average = Number of Safe Hits / Times at Bat Buffer Pool Hit Ratio = (A - C) / A No. of Times Page Found in Buffer Pool No. of GETPAGE Calls Random Hit Ratio = (193,239 - 8,044) / 193,239 = 0.958 Sequential Hit Ratio = (5,941,363 - 526) / 5,941,363 = 0.99991 Caching Efficiency A. RANDOM GETPAGEs 193,239 VBP0 171,141 Hits (A-B-C) VBP0 Misses 22,098 B+C B. HP0 14,054 Hits C. BP Misses 8,044 88.56% 7.27% (or 63.60%) 4.16% D. SEQUENTIAL GETPAGEs 5,941,363 VBP0 VBP0 5,693,918 Misses 247,445 Hits (D-E-F-G) E+F+G 95.84% 4.15% (or 99.78%) 0.01% E+F. HP0 G. BP 246,919 Misses 526 Hits “Just Make the Pool Bigger” 100% 90% Third 1,000 Only Gains 3% More 80% Second 1,000 Buffers Only Gains 8% More Hit Ratio 70% 60% 50% Investment in First 1,000 Buffers Delivers 78% Hits 40% 30% 20% 10% 0% 2,000 4,000 6,000 8,000 Size of Pool Obviously can waste “Virtual Storage” Waste of central and expanded storage Places extra burden on OS/390 Virtual Storage Manager May force OS/390 paging to auxiliary disk storage Random Hit Ratio vs. Coverage 100% Random Hit Ratio 80% 90% Buffer Pool Hits at 10% Coverage 60% 40% DB2 / IMS -TM Transaction Processing Benchmark Avg. GETPAGE at 10% Coverage = (0.90 * 0.0) + (0.10 * 17.6) = 1.76 ms 20% 0% 0% 10% 20% 30% 40% 50% 60% % Database Covered by Buffer Pool Source: ZZ05-0462 IBM WSC Tech. Bulletin: MVS/ESA and Data in Memory Performance Studies Average GETPAGE Time vs. Coverage Random Hit Ratio GETPAGE Time 25 ms Random Hit Ratio RAMAC VA 3390-1 3390-2 3390-3 20 ms 15 ms GETPAGE Time at 10% Coverage (90% Hits) RAMAC VA = 1.58 ms 3390-1 = 1.76 ms +11.4% 3390-2 = 2.06 ms +30.4% 3390-3 = 2.31 ms +46.2% 10 ms 5 ms 0 ms 0% 5% 10% 15% 20% % Database Covered by Buffer Pool Random Hit Ratio Versus “Coverage” Hit Ratio for Random GETPAGEs 100% High Random Access to Small Working Set of Pages 80% 60% 40% 100% Random Access to All Pages in Page Set 20% 0% 0% 20% 40% 60% 80% Size of Buffer Pool Coverage = Size of Page Set 100% Hot Pages vs. Cold Pages Pages Heavily Re-Used “Resident Pages” 100% Random Hit Ratio 80% 60% Pages With Intermediate Level of Re-Use 40% 20% Pages With Very Low Probability of Re-Use “Transient Pages” 0% 0% 10% 20% 30% 40% % Database Covered by Buffer Pool 50% Classic Questions How to Configure the Pool(s)? A Single Large Pool versus Multiple, Not-So-Large? Which Pages Sets in Which Pools? Any Scientific Method to Help? DB2 Capabilities 80 Virtual Buffer Pools, Hiperpools and Group Buffer Pools Dynamic Alter of Sizes and Thresholds Dynamic Reassignment of Page Sets Improved Statistical Display Categories of Buffer Pool Statistics Data Manager/Buffer Manager Trace Synchronous Reads During Prime Shift Synchronous Read Rate 27-Feb 28-Feb 1-Mar 2-Mar 3-Mar 4-Mar 5-Mar 1 4 15 Virtual Buffer Pool Number 16 Synchronous Reads During Night Shift Synchronous Read Rate 27-Feb 28-Feb 1-Mar 2-Mar 3-Mar 4-Mar 5-Mar 1 4 15 Virtual Buffer Pool Number 16 Synchronous Read During Midnight Shift Synchronous Read Rate 27-Feb 28-Feb 1-Mar 2-Mar 3-Mar 4-Mar 5-Mar 1 4 15 Virtual Buffer Pool Number 16 DB2 Key Page Set Characteristics Density of Access Mode of Access Size of Page Set Rereferencing Pattern Read-Only or Read/Write Static or Erratic Behavior A Tough Step “We need to identify the specific page sets containing a high percentage of pages with the characteristic of being mainly resident.” “Once the page sets have been identified......” Two Basic Tracing Options IFCID 6 - Start of Reading Page from Disk IFCID 198 - GETPAGE, RELPAGE and SET WRITE PENDING Calls to Buffer Manager G-Series (IFCID 198 Trace) • DBID • OBID • No. of Unique Pages Used • GETPAGE Count for Object • Virtual BP Hit Count Data Manager Buffer Manager Interface All GETPAGE, RELPAGE and Set Write Pending Calls ~ 9,000 records per second G-Series Random GETPAGE Calls ~ 3,400 records per second for “operational” buffer pool* Summarized IFCID 198 Records ~ 900 records per sample 10 Traces of One Minute Each * For production page sets (no DB2 catalog, sort work files or decision support objects) Time Sequence of IFCID Records VBP Hit GETPAGE Call (Write 198) Flagged as Buffer Pool Hit Possible Set Write Pending Call (Write 198) Time Interval T1 RELPAGE Call (Write 198) Time Interval T2 HP Hit GETPAGE Call (Write 198) Flagged as Buffer Pool Miss Possible Set Write Pending Call (Write 198) RELPAGE Call (Write 198) GBP Hit GETPAGE Call (Write 198) Flagged as Buffer Pool Miss Possible Set Write Pending Call (Write 198) RELPAGE Call (Write 198) NOTE: No IFCID 6’s or 7’s are written--no I/O with hits. Interarrival Rate of GETPAGE Calls Random GETPAGE Calls for Page P2 of Page Set X1 t0 Seconds, Minutes, Hours? tn Virtual Buffer Pool “Sent to Old People’s Home” Page P2 “Sent to Old People’s Home” Page P2 Hiperpool Page Set X1 on Disk Hiperpool “Dies of Old Age” “Dies of Old Age” Number of Pages Reread Reread Interval 3,000 2,500 2,000 1,500 1,000 500 0 10K 1 20K 30K 2 40K 3 4 50K R-Series (IFCID 6 Trace) Buffer Manager VSAM DFP Interface R-Series Start of Read Page from Disk ~ 100 records per second for “operational” page sets 10 Traces of 10 Minutes Each Summarized IFCID 6 Records • DBID • OBID • No. of Pages Read • No. of Pages Reread Time Sequence of IFCID Records VBP, HP, GBP All Missed GETPAGE Call (Write 198) Flagged as Buffer Pool Miss Write 6--Start of Disk I/O Call DFP/VSAM Time Interval T3 Posted by DFP/VSAM Write 7--End of Disk I/O* Possible Set Write Pending Call (Write 198) RELPAGE Call (Write 198) Downstream Analysis G-Series Summarized IFCID 198 Records R-Series Summarized IFCID 6 Records Download Microsoft Excel Microsoft Access 10 G-Series Samples of GETPAGE Calls 250,000 200,000 Total GETPAGEs 150,000 1,542 Unique Page Sets Observed 100,000 50,000 GETPAGEs by Page Set 0 G01 G02 G03 G04 G05 G06 G07 G08 G09 G10 96 Page Sets Generated 90.1% of GETPAGE Calls Total GETPAGEs 100,000 91 Well Behaved Consistent Page Sets Five Inconsistent Page Sets 1 G01 G02 G03 G04 G05 G06 G07 G08 G09 G10 Does the 80-20 Rule Apply? 100% Cumulative Contribution to Total Workload 3 2 1 90% 4 80% 70% 115 60% 20% of Page Sets 50% 10% of Page Sets 40% 1 = ADPUs 30% 2 = GETPAGEs 20% 3 = VBP Hits 10% 4 = VBP Misses 0% 100 200 300 400 Size of Page Set PAD = Page Access Density = Random GETPAGEs per Minute per Page PAD PAD Distribution of PAD Values 100 1,459 90 80 70 No. of Page Sets 60 Cut-Off Point 57 Range: 0.1 to 3,413 Mean: 74.29 > 200 = 83 Page Sets 50 40 30 20 12 7 10 2 1 1 1 0 1 0 0 0 0 0 0 0 1 0 <=200 <=800 <=1,400 <=2,000 PAD Values <=2,600 <=3,200 IAGPC - Inter-Arrival Time 1 : PAD = InterArrival Time of GETPAGE Requests for the “Average” Page Given: PAD = 3,413 GETPAGEs per Minute per Page IAGPC = 1 / PAD = 1 / 3,413 = 0.000293 Minutes Between GETPAGE Calls for the “Average” Page Rereferencing Pattern “Hot” to “Cold” Access Density Clustering Index: One Root Page 86 Non-Leaf Pages 37,640 Leaf Pages Table: 170,700 Data Pages Page Type = 1,000,000 GETPAGEs/Page = 11,628 GETPAGEs/Page = 27 GETPAGEs/Page = PAD 6 GETPAGEs/Page IAGPC Root 6,506.4 / min. 9.2 ms. Non-Leaf 75.7 / min. 793.1 ms. Leaf 0.173 / min. 5.79 sec. Data 0.038 / min. 26.2 min. But How About Tables? New Mexico Area Code 505 New York City Area Code 212 Identifying Objects of Interest GETPAGE Calls 3 23,208 540 43 66 55 832,224 18,604 45 109,902 177 112,960 2,752 41 29,447 VBP Misses 34 883,636 2,254 392 29,649 0 0 0 0 0 LEGEND No. of Page Sets No. of GETPAGE Calls Average Pages Used Page Access Density VBP Misses 4 102,655 215 477 126 45 29,652 86 345 1,148 Page Access Density (PAD) Identifying Objects of Interest GETPAGE Calls 0.19% 1.96% 1.14% 0.04% 3.57% 67.60% 40.70% 58.47% 11.48% 10.00% 5.52% 15.67% VBP Misses 2.20% 8.19% 43.22% 15.77% LEGEND % of Page Sets % of Distinct Pages % of GETPAGE Calls % of VBP Misses 0.26% 0.78% 5.02% 0.07% 2.92% 0.31% 1.45% 0.61% 0.00% 0.00% 0.00% Page Access Density 0.00% (PAD) LEGEND Buffer Pool ID No. of Page Sets No. of VBP Pages No. of Hiperpool Pages No. of GETPAGE Calls Average Pages Used Page Access Density VBP Misses Uninteresting BPZ 1,401 1,000 -0173,225 5,823 30 47,072 Buffer Pool Allocation GETPAGE Calls BPY 55 5,500 35,000 832,224 18,604 45 109,902 VBP Misses BPX 86 2,500 5,000 1,039,151 3,095 336 30,989 Page Access Density (PAD) DB2 Catalog & Directory BP0 ? 1,000 4,000 ? ? ? ? DB2 Sort BP1 ? 2,000 -0? ? ? ? R-Series Samples of Pages Read/Reread 80,000 70,000 60,000 50,000 40,000 Pages Read 30,000 Pages Reread 20,000 10,000 0 R01 R02 R03 R04 R05 R06 R07 R08 R09 R10 Top Page Sets for Disk Reads 100,000 Total Read 10,000 1,000 98 Well Behaved Consistent Page Sets 100 10 Two Erratic Inconsistent Page Sets 1 R01 R02 R03 R04 R05 R06 R07 R08 R09 R10 Does the 80-20 Rule Apply? 100% 1 90% 2 Contribution to Total Workload 80% 3 134 70% 10% of Page Sets 60% 20% of Page Sets 50% 40% 1 = Reads 30% 2 = Rereads 20% 3 = Weighted Rereads 10% 0% 1 50 100 150 200 250 Number of Page Sets 300 350 400 Distribution of Read Values 100 1,813 90 80 Range: 1 to 113,940 Mean: 327 70 60 No. of Page Sets 50 40 30 35 23 20 6 10 2 3 0 3 3 1 0 2 1 2 5 0 <=2,000 <=4,000 <=6,000 <=8,000 <=10,000 <=12,000 <=14,000 No. of Reads Distribution of Reread Values 100 1,785 90 80 70 No. of Page Sets Range: 0 to 17,167 Mean: 48 60 52 50 40 30 22 20 10 6 6 8 3 2 4 4 1 2 2 0 1 0 <=200 <=400 <=600 <=800 <=1,000 No. of Rereads <=1,200 <=1,400 Distribution of % Rereads 180 591 171 164 160 138 139 140 130 116 120 No. of Page Sets Range: 0 to 61.12% Mean: 14.68% 159 109 95 100 80 60 42 40 31 20 13 0 0 1 0 <=4% <=16% <=28% <=40% % of Rereads <=52% >60% Distribution of Weighted Rereads 180 847 346 Range: 0 - 2,587 Mean: 8.69 160 147 140 120 No. of Page Sets Mean Value (224 Page Sets Above Average) 100 80 60 42 40 20 0 0 5 10 15 20 25 30 Weighted Re-reads 35 40 45 50 Identifying Objects of Interest LEGEND No. of Page Sets Total Reads Total Rereads Reread Percentage Weighted Rereads Weighted Rereads 0 0 0 0.00% 0 10 6,011 172 2.86% 13 Reads 172 14,563 3,999 27.46% 1,296 157 525,839 77,685 14.77% 13,276 19 27,035 877 3.24% 64 72 14,649 3,441 23.49% 921 2 681 72 10.57% 8 Rereads Identifying Objects of Interest LEGEND % of Total Page Sets % of Total Reads % of Total Rereads % of Weighted Rereads Weighted Rereads 9.06% 2.35% 4.39% 7.53% 0.00% 0.00% 0.00% 0.00% 0.53% 0.97% 0.19% 0.08% Reads 8.27% 84.69% 85.20% 777.14% 1.00% 4.35% 0.96% 0.37% 3.79% 2.36% 3.77% 5.35% 0.11% 0.11% 0.08% 0.05% Rereads LEGEND Buffer Pool ID No. of Page Sets No. of Reads No. of Rereads Reread Percentage Weighted Rereads VBP Size Hiperpool Size BPY1 1,499 65,868 6,051 9.18% 1,717 2,000 -0- Buffer Pool Allocation Weighted Rereads BPX1 401 555,051 85,125 15.34% 15,493 5,000 30,000 Reads Rereads DB2 Catalog & Directory BP0 ? ? ? ? ? 1,000 4,000 DB2 Sort BP1 ? ? ? ? ? 2,000 -0- Comparison of Traces G-Series 141 Page Sets 91.52% of GETPAGE Calls 74.96% of VBP Misses R-Series 401 Page Sets 90.02% of Weighted Rereads Degree of Overlap G NOT R G AND R G NOT R Page Sets GETPAGEs Pages Used PAD VBP Misses Wgtd. Rereads No. % 63 3.19 427,736 20.92 2,094 7.61 204.27 5,698 3.03 33 0.19 R NOT G G AND R No. 78 1,443,639 19,645 73.49 135,193 10,943 % 3.95 70.61 71.38 71.93 63.59 R NOT G No. 323 104,979 3,165 33.17 29,580 4,550 % 16.35 5.13 11.50 15.74 26.44 Standalone G-Series R-Series G-Series Page Sets GETPAGEs Pages Used PAD VBP Misses Wgtd. Rereads No. 141 1,871,375 21,739 86.08 140,891 10,976 % 7.14 91.53 78.99 74.96 63.78 R-Series No. 401 1,548,618 22,810 67.89 164,773 15,493 % 20.30 75.74 82.88 87.66 90.02 Ranking of Critical Page Sets Object ID Weighted Rereads 370.006 379.004 370.037 379.023 416.263 420.024 371.065 416.102 370.004 402.012 420.014 370.029 402.002 401.008 401.014 1. 2,587 2. 1,284 3. 805 4. 587 5. 498 6. 456 7. 441 8. 389 9. 315 10. 285 11. 238 12. 212 13. 204 14. 201 15. 185 VB Pool Misses 1. 2. 3. 4. 9. 91. 24. -14. 23. 173. 5. 22. 7. 6. 29,187 15,235 8,799 4,652 3,111 271 1,452 N/R 2,089 1,545 130 4,295 1,614 4,009 4,098 GETPAGE Calls 1. 7. 4. 14. 11. 39. 15. -53. 25. 175. 3. 35. 12. 13. 168,298 78,608 100,035 39,455 54,007 8,858 36,423 N/R 6,207 15,805 684 100,806 9,938 52,907 51,290 Page Access Density (PAD) 281. 59.92 305. 56.29 122. 142.14 159. 103.02 967. 7.18 832. 11.69 42. 342.00 -N/R 396. 40.07 129. 130.94 379. 44.29 45. 307.62 182. 89.45 81. 210.20 87. 198.36 Erratic Page Sets 60% 50% The Normal Distribution 40% 30% 20% 97.72% of Population 10% 0% -3.0 -2.3 -1.5 -0.8 0.0 0.8 Standard Deviation Mean + (2 x Standard Deviation) 1.5 2.3 3.0 Summary of Buffer Configurations Pool BP0 BP1 BP2 BPX BPY BPZ BPX’ BPY’ Original Set-Up IFCID 6 VBP HP VBP HP Contents Size Size Size Size DB2 Catalog & Directory 1,000 4,000 1,000 4,000 Sort Work Files 2,000 0 2,000 0 All Operational Data 10,000 0 High GP and PAD High VBP Misses All Other Cold Page Sets High Reread 5,000 30,000 All Other Cold Page Sets 2,000 0 Totals 13,000 4,000 10,000 34,000 IFCID 198 VBP HP Size Size 1,000 4,000 2,000 0 2,500 5,000 5,500 30,000 1,000 0 12,000 39,000 “Industrial Strength” Analysis - Michael Barnard CGU Life, Kent, U.K. “Reread Minimization” - IBM Watson Research Messers. Dan, Yu, Chung “DBPMAA Algorithm” - IBM Almaden Research Drs. Levy and Morris and Mr. Messinger “Depth Distributions” - IBM and Responsive Systems “Buffer Pool Tool™” ™Trademark of Responsive Systems Michael Barnard’s Approach Goal: Minimize Rereads of Pages from Disk 1. Create DB2 table to save trace data CREATE TABLE IFCID6 (POOL_ID CHAR(8) NOT NULL, DBID SMALLINT NOT NULL, OBID SMALLINT NOT NULL, PAGE CHAR(6) NOT NULL, READTYPE CHAR(1) NOT NULL) 2. Run DB2 trace for IFCID 6 records DB2 Trace RAW IFCID 6 Start Read I/O Records 3. Run DB2PM report to format the IFCID 6 records RAW IFCID 6 Start Read I/O Records DB2PM Formatted IFCID 6 Start Read I/Os Load and Summarize 4. Load report line items into DB2 table using the DB2 LOAD Utility* LOAD DATA INDDN SYSREC00 REPLACE LOG NO CONTINUEIF(118:120)=‘ACE’ INTO TABLE xxxxx.IFCID6 WHEN (80:83)=‘DBID’ (POOL_ID POSITION(108:115) CHAR(8), DBID POSITION(88:91) INTEGER EXTERNAL, OBID POSITION(218:221) INTEGER EXTERNAL, PAGE POSITION(239:244) CHAR(6), READTYPE POSITION(260:260) CHAR(1)) Formatted IFCID 6 Start Read I/Os DB2 LOAD DB2 Table IFCID6 5. Run SQL query against table IFCID6 for re-read report * Based on DB2PM report format with DB2 Version 4. Version 5’s record layout is different to accommodate LARGE table spaces. The Buffer Pool Tool Coupling Facility Sizing Estimator Pool Configuration Simulator DB2 Subsystem DB2 Instrumentation Facility IFI Exit Logic DB2 Trace IFCID 6, 7 & 198 Records BPT Analysis Buffer Pool Performance Statistics GETPAGE by Page Set Analysis Buffer Pool Statistics Statistics for Buffer Pool: BP0 Buffer size is.......................................…...............4K Number of VP Buffers is....…...........10,000 VP sequential threshold is…...............80% Number of HP Buffers is.......….................0 HP sequential threshold is......…..........80% Hiper Space Castout is..............….........Yes * Application Vertical Write Threshold...............….....10% HIT RATIO Horizontal Write Threshold............…....50% Number of GETPAGEs........................….....2,379,499 Number of Sequential Access...1,429,246 60.1% of GETPAGEs Number of Random Access..........709,940 29.8% of GETPAGEs Number of RID_List.......................240,313 10.1% of GETPAGEs Number of Random Misses..........277,488 77.1 Misses per Sec. Number of Misses (others)...........149,291 41.5 Misses per Sec. Number of No_Reads...........................604 0.0% of GETPAGEs Number of Hits............................1,952,116 82.0% of GETPAGES* System HIT RATIO.............................................34.7% Avg. Page Residency......................................1,250 Seconds Report continues on next page Buffer Pool Statistics Continued from previous page Number of Pages Read...........................1,553,174 Number of Sync Pages Read.................393,989 Number of SPref Pages Read.................999,889 Number of LPref Pages Read...................14,853 Number of DPref Pages Read.................144,443 Number of Read I/Os..................................442,966 Number of Sync Read I/Os.....................393,989 Number of SPref Read I/Os.......................32,127 Number of LPref Read I/Os.......................11,853 Number of DPref Read I/Os.........................4,997 Delay of Sync Read I/Os.................................14 Delay of SPref Read I/Os.................................36 Delay of LPref Read I/Os.................................43 Delay of DPref Read I/Os.................................44 Report continues on next page 431.5 Pages per Second 25.4% of Pages Read 64.4% of Pages Read 1.0% of Pages Read 9.3% of Pages Read 123.1 I/Os per Second 88.9% of Read I/Os 7.3% of Read I/Os 2.7% of Read I/Os 1.1% of Read I/Os ms. average (Max. 249) ms. average (Max. 250) ms. average (Max. 249) ms. average (Max. 243) Buffer Pool Statistics Continued from previous page Number of Set Write Pending (Modifications)............170,158 Number of Pages Written............................73,624 Number of Sync Pages Written ...................100 Number of ASync Pages Written ............73,524 20.5 Pages per Sec 0.1% of Pages Written 99.9% of Pages Written Number of Write I/Os..............…...................45,719 12.7 I/Os per Sec Number of Sync Write I/Os...…......................100 0.2% of Write I/Os Number of ASync Write I/Os......................45,619 .99.8% of Write I/Os Delay of Sync Write I/Os....................................7 ms. average (Max. 66) Delay of ASync Write I/Os..................................4 ms. average(Max. 231) Average Number Pages/Async Write..............1.6 pages Page Set Statistics Statistics for Table Space.......................................DB2xx.TABLEyy Number of GETPAGEs.................................690,589 29.0% of Pool’s GETPAGEs Number of Sequential Access..................634,019 91.8% of GETPAGEs << Note Number of Random Access........................56,570 8.2% of GETPAGEs Number of RID_List Access.................................0 0.0% of GETPAGEs Number of Random Misses.........................27,438 7.6 Misses per Sec Number of Misses (others)..........................19,740 5.5 Misses per Sec Number of No_Reads............................................0 0.0% of GETPAGEs Number of Hits............................................643,411 93.2% of GETPAGEs System HIT RATIO.............................................-1.9% Average Page Residency......................................0 Seconds Report continues on next page Application HIT RATIO Page Set Statistics Continued from previous page Number of Pages Processed..........................704,258 Number of Sync Pages Read.........................27,938 Number of SPref Pages Read.......................654,078 Number of LPref Pages Read..................................0 Number of DPref Pages Read.........................22,242 195.6 Pages per Second 4.0% of Pages 92.9% of Pages 0.0% of Pages 3.2% of Pages Number of Read I/Os.........................................49,414 Number of Sync Read I/Os...........................27,938 Number of SPref Read I/Os...........................20,735 Number of LPref Read I/Os....................................0 Number of DPref Read I/Os................................741 Delay of Sync Read I/Os.....................................21 Delay of SPref Read I/Os.....................................38 Delay of LPref Read I/Os.......................................0 Delay of DPref Read I/Os.....................................43 13.7 Read I/Os per Sec 56.5% of Read I/Os 42.0% of Read I/Os 0.0% of Read I/Os 1.5% of Read I/Os ms. average (Max. 239) ms. average (Max. 250) ms. average (Max. 0) ms. average (Max. 183) Report continues on next page Page Set Statistics Continued from previous page Number of Set Write Pendings (Modifications)..14,443 8.5% of pool SWPs Number of Pages Written.....................................8,055 2.2 Pages per Sec. Number of Sync Pages Written .... ...........................1 0.0% of Pages Written Number of ASync Pages Written ........................8,054 100.0% of Pages Written Number of Write I/Os.............................................4,833 1.3 I/Os per Sec. Number of Sync Write I/Os........................................1 0.0% of Write I/Os Number of ASync Write I/Os...............................4,832 100.0% of Write I/Os Delay of Sync Write I/Os...........................................6 ms. average (Max. 6) Delay of ASync Write I/Os.........................................4 ms. average (Max. 219) Average Pages / Write I/O (Asynch).......................1.67 Simulation at the Buffer Pool Level Forecast Read I/O Rate Forecast Application Hit Ratio Results of Simulation for Buffer Pool..................................BP0 Buffer Pool GETPAGE Total.......................................2,379,499 Pages in Pool 10,000* 18,000 26,000 34,000 42,000 50,000 58,000 66,000 GETPAGEs Used 2,362,768 2,349,204 2,322,343 2,294,862 2,267,584 2,233,613 2,171,257 2,160,792 * Baseline Verification Forecast BP Hits 1,971,692 2,049,084 2,067,504 2,070,271 2,064,701 2,044,257 1,995,045 1,991,388 Applic. Hit Ratio 83.5 % 87.3 % 89.1 % 90.3 % 91.1 % 91.6 % 91.9 % 92.2% Page Read Read I/O System Rate Rate Hit Ratio 438.5/sec. 120.6/sec. 34.0% 382.8/sec. 95.0/sec. 42.6% 358.2/sec. 83.1/sec. 46.7% 338.2/sec. 75.1/sec. 49.9% 326.4/sec. 69.2/sec. 51.6% 322.3/sec. 66.3/sec. 52.5% 322.6/sec. 64.2/sec. 52.6% 315.8/sec. 62.1/sec. 53.6% Simulation at the Page Set Level Forecast Application Hit Ratio Forecast Read I/O Rate Results for Table Space..................................... DB2xx.TABLEyy Page Set GETPAGE Total.................................690,589 ( 29.0% of BP GETPAGEs) Pages in GETPAGEs No. of Applic. Wking Set Size Pages Read System Pool Used BP Hits Hit Ratio Avg. Max. Read I/Os Hit Ratio 10,000 689,218 661,803 95.6 % 3,277 8,607 198.5/sec. 13.8/sec. -2.1% 18,000 688,180 663,431 96.4 % 6,297 15,329 198.8/sec. 13.1/sec. -1.6% 26,000 686,874 664,066 96.7 % 9,537 21,855 201.2/sec. 12.8/sec. -1.2% 34,000 685,796 664,560 96.9 % 13,074 28,390 203.3/sec. 12.5/sec. -0.8% 42,000 685,025 665,323 97.1 % 16,815 34,939 204.8/sec. 12.2/sec. -0.5% 50,000 684,158 665,571 97.3 % 20,804 41,553 208.1/sec. 12.1/sec. -0.2% 58,000 680,175 662,784 97.4 % 25,196 48,298 213.6/sec. 12.0/sec. -0.1% 66,000 672,849 655,905 97.5% 29,344 54,684 211.9/sec. 11.9/sec. 0.0% Heavy use of sequential prefetch causes high application and low system hit ratio Simulation at the Page Set Level Forecast Application Hit Ratio Forecast Read I/O Rate Results for Table Space......................................DB2xx.TABLEzz Page Set GETPAGE Total................................406,973 ( 17.1% of BP GETPAGEs) Pages in GETPAGE No. of Applic. Wking Set Size Pages Read System Pool Used BP Hits Hit Ratio Avg. Max. Read I/Os Hit Ratio 10,000 405,845 302,693 74.6 % 2,352 6,653 85.3/sec. 31.0/sec. 25.4% 18,000 404,852 349,267 86.3 % 3,512 7,072 51.3/sec. 17.2/sec. 55.4% 26,000 402,225 363,294 90.3 % 4,312 8,501 39.6/sec. 12.5/sec. 66.0% 34,000 395,202 367,227 92.9 % 4,914 8,476 30.0/sec. 9.3/sec. 74.2% 42,000 385,542 364,811 94.6 % 5,341 8,643 24.2/sec. 7.1/sec. 78.9% 50,000 374,082 355,458 95.0 % 5,592 8,712 21.2/sec. 6.5/sec. 81.3% This page set should not be in the same pool as DB2xx.TABLEyy on the preceding page Simulation - Large Random Object Forecast Application Hit Ratio Forecast Read I/O Rate Results for Index Space........... ..............................DB2xx.INDEXxx Page Set GETPAGE Total....................................559,377 ( 17.2% of BP GETPAGEs) Pages in GETPAGE No. of Applic. Wking Set Size Pages Read System Pool Used BP Hits Hit Ratio Avg. Max. Read I/Os Hit Ratio 10,000 558,266 340,542 61.0 % 3,364 6,264 193.5/sec. 20.8/sec. 58.1% 18,000 557,425 345,046 61.8 % 7,249 10,112 194.6/sec. 19.9/sec. 58.5% 26,000 556,357 346,054 62.1 % 9,656 12,314 199.1/sec. 19.5/sec. 59.1% 34,000 555,494 348,850 62.8 % 13,513 15,965 201.6/sec. 18.9/sec. 59.7% 42,000 554,873 349,015 62.9 % 15,223 17,101 201.9/sec. 18.7/sec. 60.1% 50,000 554,159 349,674 63.1 % 16,174 18,096 202.8/sec. 18.4/sec. 60.5% Very large, random and low rereference causes this profile.... Buffer Pool Tool Testimonial GETPAGE Calls per second Read I/Os per second 58% Reduction No. of VB Pools No. of Hiperpools Pages in HPs 1 0 7 0 7 3 5k 13.3% Reduction in DB2 Elapsed Time 6.7% Reduction in DB2 CPU Time Over 2,000,000 I/Os per day eliminated 7 3 10k 7 3 15k 7 3 30k $410,000 savings per years Conclusions DB2 buffer management is • Sophisticated but understandable • Designed for high-performance • Keeping up with hardware economics and capabilities • Measurable and controllable Questions? Contact Chuck Hoover Compuware Corporation (248) 737-7300 x-16249 chuck_hoover@compuware.com or chuckhoovermi@aol.com Chuck Hoover Compuware Corporation 31440 Northwestern Highway Farmington Hills, Michigan MI 48334-2564 (248) 737-7300 Extension 16249 FAX: (248) 737-7513 E-mail: chuck_hoover@compuware.com COMPUWARE People and software for business applicationssm www.compuware.com