Information About

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg
Showing posts with label memory. Show all posts
Showing posts with label memory. Show all posts

Wednesday, 25 September 2013

Using the DISPLAY Command, Part 2

Posted on 14:44 by Unknown
In the first part of this series on the DISPLAY command, we focused on using DISPLAY to monitor details about you database objects. In today's second installment of this series, we will look into using DISPLAY to monitor your DB2 buffer pools.

The DISPLAY BUFFERPOOL command can be issued to display the current status and allocation information for each buffer pool. For example:


DSNB401I  =DB2Q BUFFERPOOL NAME BP0, BUFFERPOOL ID 0, USE COUNT 202
DSNB402I  =DB2Q BUFFER POOL SIZE = 4000 BUFFERS  AUTOSIZE = NO     
             ALLOCATED       =     4000   TO BE DELETED  =        0
             IN-USE/UPDATED  =        0   BUFFERS ACTIVE =     4000
DSNB406I  =DB2Q PGFIX ATTRIBUTE -                                  
             CURRENT = NO                                          
             PENDING = NO                                          
           PAGE STEALING METHOD = LRU                              
DSNB404I  =DB2Q THRESHOLDS -                                       
            VP SEQUENTIAL    = 50                                  
            DEFERRED WRITE   = 15   VERTICAL DEFERRED WRT  = 5,  0
            PARALLEL SEQUENTIAL =0   ASSISTING PARALLEL SEQT = 0   
DSNB409I  =DB2Q INCREMENTAL STATISTICS SINCE 11:20:17 DEC 31, 2011 
DSNB411I  =DB2Q RANDOM GETPAGE = 6116897 SYNC READ I/O (R) = 37632 
           SEQ.   GETPAGE      = 799445  SYNC READ I/O (S) = 10602
           DMTH HIT            = 0       PAGE-INS REQUIRED = 0
DSNB412I  =DB2Q SEQUENTIAL PREFETCH -                              
             REQUESTS        =    11926   PREFETCH I/O    =   11861
             PAGES READ      =   753753                            
DSNB413I  =DB2Q LIST PREFETCH -                                    
             REQUESTS        =        0   PREFETCH I/O    =       0

             PAGES READ      =        0                            

We can see by reviewing these results that BP0 has been assigned 4,000 pages, all of which have been allocated. We also know that the buffers are not page fixed. The output also shows us the current settings for each of the sequential steal and deferred write thresholds.

For additional information on buffer pools you can specify the DETAIL parameter. Using DETAIL(INTERVAL) produces buffer pool usage information since the last execution of DISPLAY BUFFERPOOL. 

To report on buffer pool usage since the pool was activated, specify DETAIL(*). In each case, DB2 will return detailed information on buffer-pool usage such as the number of GETPAGEs, prefetch usage, and synchronous reads. The detailed data returned after executing this command can be used for rudimentary buffer pool tuning. We can see such detail in the example above.

For example, you can monitor the read efficiency of each buffer pool using the following formula:


  (Total GETPAGEs) / [ (SEQUENTIAL PREFETCH) +
                       (DYNAMIC PREFETCH) +
                       (SYNCHRONOUS READ)
                     ]
A higher read efficiency value is better than a lower one because it indicates that pages, once read into the buffer pool, are used more frequently. Additionally, if buffer pool I/O is consistently high, you might consider adding pages to the buffer pool to handle more data.


Finally, you can gather even more information about your buffer pools using the LIST and LSTATS parameters. The LIST parameter lists the open table spaces and indexes within the specified buffer pools; the LSTATS parameter lists statistics for the table spaces and indexes reported by LIST. Statistical information is reset each time DISPLAY with LSTATS is issued, so the statistics are as of the last time LSTATS was issued.
Read More
Posted in bufferpool, DISPLAY, memory | No comments

Tuesday, 28 April 2009

Basic DB2 Buffering and Memory Guidelines

Posted on 08:47 by Unknown
One of the most important areas for tuning DB2 subsystem performance is memory usage. DB2 for z/OS uses memory for buffer pools, the EDM pool, RID pool and sort pools to cache data and structures in memory. The better memory is allocated to these structures, the better DB2 will perform.

When allocating DB2 buffer pools, keep these rules of thumb in mind:

  • Don't allocate everything to a single buffer pool (e.g., BP0); use a multiple buffer pool strategy.

  • Explicitly specify a buffer pool for every table space and index.

  • Isolate the DB2 Catalog in BP0; put user and application DB2 objects into other buffer pools.

  • Consider separating indexes from table spaces with each in their own dedicated buffer pools.

  • Consider isolating heavily hit data into its own buffer pool to better control performance.

  • Consider isolating sorts into a single buffer pool and tuning for mostly sequential access (e.g. BP7).

  • Consider separating DB2 objects into separate buffer pools that have been configured for sequential verses random access.

  • Forget about trying to follow a cookie-cutter approach to buffer pool management. Every shop must create and optimize a buffer pool strategy for its own data and application mix. DB2 offers the following buffer pool tuning "knobs" that can be used to configure virutal buffer pools to the type of processing they support:

  • DWQT –this value is the deferred write threshold; it is expressed as a percentage of the virtual buffer pool that might be occupied by unavailable pages. When this threshold is reached DB2 will start to schedule write I/Os to externalize data. The default is 50%, which is likely to be too high for most shops.

  • VDWQT – this value is the vertical deferred write threshold; it is basically the same as DWQT, but for individual data sets. The default is 10%, which once again is quite likely to be too high for many shops.

  • VPSEQT – this value is the sequential steal threshold; it is a expressed as a percentage of the virtual buffer pool that can be occupied by sequentially accessed pages. Tune buffer pools for sequential access such as scans and sorting by modifying VPSEQT to a larger value. The default is 80%.

  • VPPSEQT – this value is the sequential steal threshold for parallel operations; the default value is 50%.

  • VPXPSEQT – this value is assisting parallel sequential threshold; it is basically the VPPSEQT for opertaions from another DB2 subsystem in the data sharing group.


  • These parameters can be changed using the ALTER BUFFERPOOL command. Additionally, hiperpools can be created to back up DB2 virtual buffer pools with additional memory. DB2 provides several tuning knobs for hiperpools, too, including HPSIZE to adjust the size of hiperpools and HPSEQT to adjust the hiperpool sequential steal threshold.

    With the advent of DB2 V8, we will have more memory at our disposal for DB2's use. This next version of DB2 will be able to surmount the limitation of 2GB real storage that was imposed due to S/390's 31-bit addressing. Theoretically, with 64-bit addressing DB2 could have up to 16 exabytes of virtual storage addressability to be used by a single DB2 address space. Now there is some room for growth!

    In addition to buffer pools, DB2 uses memory for the EDM pool. The EDM pool is used for caching internal structures used by DB2 programs. This includes DBDs, SKCTs, CTs, SKPTs, and PTs. It also includes the authorization cache for plans and packages, as well as the cache for dynamic SQL mini-plans. As a general rule of thumb, shoot for an 80 percent hit rate with the EDM pool; this means that only one out every five times should a structure need to be loaded from disk into the EDM pool.

    Finally, remember that buffer and EDM pool tuning are in-depth subjects that cannot be adequately covered in a high-level tip such as this. So, study those IBM DB2 manuals - and learn by doing. Additionally, there is much more to proper DB2 system performance tuning than memory tuning. Other system elements requiring attention include allied agent setup (CICS, TSO, etc.), network configuration, locking, logging, and Parallel Sysplex configuration and management for DB2 data-sharing shops.
    Read More
    Posted in buffers, memory, performance | No comments
    Older Posts Home
    Subscribe to: Posts (Atom)

    Popular Posts

    • IBM Announces DB2 10 for z/OS Beta Program
      IBM announced the beta program for the next version of DB2 today, now "officially" known as DB2 10 (no more DB2 X). It is a closed...
    • SQL Coding Guidelines: The Basics
      When you are writing your SQL statements to access DB2 data be sure to follow the subsequent guidelines for coding SQL for performance. Thes...
    • How are Indexes Being Used?
      In keeping with my promise to periodically post blog entries based on questions I have received, here we have another question I have been a...
    • DB2 Locking, Part 4: Page and Row Locks
      In the first three installments of this series on DB2 locking we have looked ata broad overview of locking (part 1), table and table space l...
    • Using the DISPLAY Command, Part 1
      Often times some of the simplest commands and features of DB2 can be used to great effect -- if you just remember that they are there and le...
    • IBM Manages the Data Lifecycle
      Data lifecycle is a somewhat new-ish term, at least in terms of what I plan to talk about in this blog posting. The data lifecycle – and dat...
    • DB2 Locking, Part 17: In Conclusion
      Today's blog post concludes our multi-part series on DB2 for z/OS locking and concurrency. We have touched on a great many aspects of lo...
    • Can You Write a Redbook?
      If you've been working with mainframes for any period of time you have almost certainly become familiar with the IBM redbook. These are ...
    • The Top Ten DB2 Development Best Practices
      If you have been reading my blogs lately you know that I have been posting Top Ten lists of various types, and today's post offers up ye...
    • The PIECESIZE Clause
      One of the more troubling aspects of DB2 database design and creation is the non-partitioning index (NPI). Creating NPIs on tables in a par...

    Categories

    • .NET
    • ACID
    • ALTER
    • analytics
    • articles
    • automation
    • award
    • backup
    • best practices
    • BETWEEN
    • BI
    • Big Data
    • BIND
    • blogging
    • book review
    • bufferpool
    • buffers
    • CASE
    • change management
    • claim
    • Cognos
    • COMMIT
    • compliance
    • compression
    • conference
    • constraints
    • COPY
    • data
    • data breaches
    • data quality
    • data security
    • Data Sharing
    • data types
    • data warehouse
    • database archiving
    • database auditing
    • database design
    • date
    • DB2
    • DB2 10
    • DB2 11
    • DB2 9
    • DB2 Analystics Accelerator
    • DB2 Catalog
    • DB2 conversion
    • DB2 Developer's Guide
    • DB2 X
    • DB2-L
    • DBA
    • DDL
    • developerWorks
    • dirty read
    • DISPLAY
    • DL/1
    • drain
    • DSNZPARM
    • Dynamic SQL
    • eBook
    • education
    • enclave SRB
    • encryption
    • ERP
    • FETCH FIRST
    • Freakonomics
    • functions
    • generosity factor
    • Happy Holidays
    • Happy New Year
    • Hibernate
    • HIPAA
    • history
    • IBM
    • ICF
    • IDUG
    • IFL
    • IMS
    • index
    • Information Agenda
    • Informix
    • InfoSphere
    • infrastructure
    • integrity
    • IOD
    • IOD11
    • IOD2009
    • IOD2011
    • IODGC
    • IRLM
    • ISOLATION
    • Java
    • JDBC
    • load balancing
    • LOBs
    • locking
    • LUW
    • mainframe
    • Malcolm Gladwell
    • manuals
    • memory
    • middleware
    • migration
    • misc
    • monitoring
    • natural key
    • Netezza
    • new blog location
    • NoSQL
    • nulls
    • OLAP
    • optimization
    • Oracle versus DB2
    • packages
    • PCI-DSS
    • performance
    • PIECESIZE
    • poll
    • primary key
    • production data
    • programming
    • Q+A
    • QMF
    • REBIND
    • recovery
    • RedBook
    • regulatory compliance
    • reliability
    • REORG
    • research
    • RI
    • RTO
    • salaries
    • SAP
    • scalability
    • security
    • smarter planet
    • SoftwareOnZ
    • sort
    • SOX
    • specialty processors
    • SPUFI
    • SQL
    • Stage 1
    • Stage 2
    • standards
    • Steelers
    • storage
    • stored procedures
    • stream computing
    • surrogate key
    • SYSADM
    • Sysadmin
    • table expressions
    • table space
    • TechDoc
    • tips and tricks
    • Top Ten
    • trace
    • training
    • triggers
    • Twitter
    • UDFs
    • UNION
    • unstructured data
    • user groups
    • utilities
    • V1
    • V10
    • V2
    • V3
    • V4
    • V5
    • V6
    • V7
    • V8
    • V9
    • variables
    • views
    • VOLATILE
    • Web 2.0
    • webinar
    • Wordle
    • XML
    • z/OS
    • zAAP
    • zIIP

    Blog Archive

    • ▼  2014 (2)
      • ▼  January (2)
        • DBA Rules of Thumb - Part 9 (Call on Others for He...
        • DBA Rules of Thumb - Part 8 (Being Business Savvy)
    • ►  2013 (50)
      • ►  December (6)
      • ►  November (6)
      • ►  October (5)
      • ►  September (5)
      • ►  August (3)
      • ►  July (7)
      • ►  June (4)
      • ►  May (4)
      • ►  April (5)
      • ►  March (1)
      • ►  February (2)
      • ►  January (2)
    • ►  2012 (17)
      • ►  December (1)
      • ►  November (2)
      • ►  October (3)
      • ►  August (2)
      • ►  July (1)
      • ►  May (1)
      • ►  April (1)
      • ►  March (2)
      • ►  February (2)
      • ►  January (2)
    • ►  2011 (27)
      • ►  December (1)
      • ►  November (1)
      • ►  October (6)
      • ►  September (2)
      • ►  August (3)
      • ►  July (2)
      • ►  June (3)
      • ►  May (2)
      • ►  April (3)
      • ►  March (1)
      • ►  February (3)
    • ►  2010 (29)
      • ►  December (1)
      • ►  October (6)
      • ►  September (1)
      • ►  August (2)
      • ►  July (2)
      • ►  June (1)
      • ►  May (3)
      • ►  April (3)
      • ►  March (3)
      • ►  February (4)
      • ►  January (3)
    • ►  2009 (43)
      • ►  December (5)
      • ►  November (4)
      • ►  October (6)
      • ►  September (2)
      • ►  August (1)
      • ►  July (3)
      • ►  June (2)
      • ►  May (3)
      • ►  April (2)
      • ►  March (4)
      • ►  February (5)
      • ►  January (6)
    • ►  2008 (44)
      • ►  December (1)
      • ►  November (4)
      • ►  October (4)
      • ►  September (6)
      • ►  August (1)
      • ►  July (4)
      • ►  June (3)
      • ►  May (5)
      • ►  April (4)
      • ►  March (4)
      • ►  February (2)
      • ►  January (6)
    • ►  2007 (51)
      • ►  December (2)
      • ►  November (3)
      • ►  October (5)
      • ►  September (3)
      • ►  August (6)
      • ►  July (4)
      • ►  June (4)
      • ►  May (5)
      • ►  April (8)
      • ►  March (5)
      • ►  February (4)
      • ►  January (2)
    • ►  2006 (60)
      • ►  November (4)
      • ►  October (8)
      • ►  September (4)
      • ►  August (11)
      • ►  July (7)
      • ►  June (2)
      • ►  May (7)
      • ►  April (3)
      • ►  March (6)
      • ►  February (4)
      • ►  January (4)
    • ►  2005 (11)
      • ►  December (3)
      • ►  November (6)
      • ►  October (2)
    Powered by Blogger.

    About Me

    Unknown
    View my complete profile