TechTip: DB2 11 for z/OS Performance and Tuning Tips

  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times


Raise or lower the priority of a workload as needed to meet user-specified goals.


This article is an excerpt from chapter 6, “Performance and Tuning,” of DB2 11 for z/OS Database Administration: Certification Study Guide (Exam 312).


Using z/OS Workload Manager (WLM), you can set z/OS performance options for DB2. With WLM, you define performance goals and assign a business importance to each goal. The goals for work are defined in business terms, and the system decides how much resource, such as CPU and storage, to give to the work to meet its goal.


WLM controls the dispatching priority based on the user-supplied goals. It raises or lowers the priority as needed to meet the specified goal. Thus, you need not fine-tune the exact priorities of every piece of work in the system and can focus instead on business objectives.


The three kinds of goals are as follows:

  • Response time: How quickly the work is to be processed
  • Execution velocity: How fast the work should be run when ready, without being delayed for processor, storage, I/O access, and queue delay
  • Discretionary: A category for low-priority work with no performance goals


Response times are appropriate goals for user applications, such as DB2 QMF users running under the TSO address space goals, or users of CICS using the CICS workload goals. Response-time goals can also be set for distributed users.


For DB2 address spaces, velocity goals are more appropriate. A small amount of the work done in DB2 is counted toward this velocity goal. Most of the work performed in DB2 applies to user goals.


Workload Manager

With z/OS Workload Manager, work is assigned to a service class. For each service class, define both the wanted performance goal and a business importance of meeting the stated goal.


You can define transactional work in a z/OS system to run with either transaction response time goals or with velocity goals. Generally, transaction response time goals are recommended because they provide more management control. However, velocity goals work well in many installations for workloads such as CICS, IMS, and WebSphere. The WLM service definition of workloads must be defined with knowledge of all workloads that run in LPAR and the Parallel Sysplex.


You might need to adjust the recommendations for DB2 workloads so they are correctly incorporated into the overall WLM policy design. To account for DB2 address spaces in a WLM service definition, apply the following recommendations:

  • Place the IRLMPROC address space in SYSSTC dispatching priority. This address space manages IRLM locks and latches, and must run at a high dispatching priority that provides little or no CPU delay.
  • Place the following address spaces, which are critical for efficient system operation, in the same user-designed service class. Define this class with aggressive performance goals and a high importance:
  1. ssnmMSTR contains the DB2 system monitor task and requires an aggressive WLM goal so it can monitor CPU stalls and virtual storage constraints.
  2. ssnmDBM1 manages DB2 threads and is used for system services such as page set opening. In data sharing environments, this address space is critical for global operations such as P-lock negotiations, notifications, and global commands.
  3. ssnmDIST and WLM-managed stored procedure address spaces run only the DB2 service tasks and work for DB2 that is not attributable to a single user. These address spaces typically place a minimal CPU load on the system. However, they do require minimal CPU delay to ensure good system-wide performance and to avoid queuing of threads. DDF workloads, with their higher CPU demands, are controlled by the WLM service class definitions for the DDF enclave workloads. Similarly, the higher CPU demands for processing stored procedures are controlled by the WLM service class definitions for the workloads that call the stored procedures.


The velocity goal of these address spaces must be high enough that new work and new connections can be started and placed into their own goal or the goal of the caller.


You should specify a high importance for the DB2 workloads, typically importance 1. In every case, set the service class with the DB2 address spaces with an understanding of the overall WLM service definition in use. Use this information as a guide in setting the DB2 portion of the overall WLM policy. To make certain that the DB2 environment receives the CPU service that it requires to ensure a well-running system, take the following actions:

  • Ensure that protocols and methods such TCP/IP and VTAM are defined in SYSSTC.
  • If necessary to meet performance objectives, consider designating certain service classes as CPU critical. Doing so provides long-term CPU protection of critical work. Designating a service class as CPU critical ensures that less important work generally has a lower dispatch priority than work that is marked CPU critical. This protection can be valuable for work that is extremely CPU-sensitive. Generally, having an appropriately set goal for the DB2 service class is all that is required to ensure a well-running system. However, CPU critical protection is available if needed.
  • Set the velocity goal for the DB2 address spaces to be among the highest for the current LPAR. The intent is to define the DB2 address spaces so that they experience little CPU delay. These address spaces must be defined with a WLM velocity goal.
  • Typically, DBAs place these address spaces together into the same user-defined service class. This user-defined service class need not be dedicated to these address spaces. Because they must be defined with a velocity goal, it is important to set an appropriately high goal set for this workload. Velocity goals are dependent on the overall LPAR logical CP configuration and on the amount of processor capacity allocated to the LPAR. LPARs that have fewer logical CPs can attain only lower velocities, whereas LPARs that have more logical CPs can obtain higher velocities.
  • For LPARs that are constrained by a lack of CPU resources and have lower-priority work that uses DB2, use blocked workload support. This support is most important in an environment where work that uses DB2 resources runs constrained at low priorities. The low-priority constrained work might hold DB2 resources required by other, more important, workloads in the system or Sysplex.
  • For environments where low dispatch priority DB2 workloads run in periods of CPU constraint, it might prove beneficial to help blocked workloads more frequently. Changing the default blocked interval (BLWLINTHD in IEAOPTxx) from the default value of 20 seconds to a value of 5 to 6 seconds might provide better overall system throughput at high utilizations. However, long-term reliance on blocked workload support to accommodate CPU saturated systems is not recommended.


Workloads that are misclassified in WLM might receive insufficient CPU. Accounting reports often display this as NOT ACCCOUTED FOR time. (Accounting reports are further described in this chapter.)


Storage and Performance

You can use several techniques to minimize the use of storage by DB2, thereby improving performance of users of memory. The next sections explore those methods.


Minimizing Storage Usage

The amount of real storage must often be close to the amount of virtual storage. Real storage refers to the processor storage where program instructions reside while they are executing. It also refers to where data is heldfor example, data in DB2 buffer pools that has not been paged out to auxiliary storage, the EDM pools, and the sort pool. To be used, data must either reside in or be moved into processor storage or processor special registers. The maximum amount of real storage that one DB2 subsystem can use is the real storage of the processor, although other limitations might be encountered first.


The large capacity for buffers in real storage and the write avoidance and sequential access techniques allow applications to avoid a substantial amount of read and write I/O, combining single accesses into sequential access so that the disk devices are used more effectively.


Virtual storage is auxiliary storage space that can be regarded as addressable storage because virtual addresses are mapped to real addresses. Proper tuning of the buffer pools, EDM pools, RID pools, and sort pools can improve the response time and throughput for applications and provide optimum resource utilization. Using data compression can also improve buffer pool hit ratios and reduce table space I/O rates.


To minimize the amount of storage that DB2 uses, follow these recommendations:


  • Use less buffer pool storage. Using fewer and smaller buffer pools reduces the amount of real storage space DB2 requires. Buffer pool size can also affect the number of I/O operations performed; the smaller the buffer pool, the more I/O operations needed. Also, some SQL operations, such as JOINS, can create a result row that does not fit on a 4 KB page.
  • Commit frequently to minimize the storage required for locks.
  • Improve the performance for sorting. The highest performance sort is the one that is avoided. However, because you cannot avoid all sorting, make sorting as efficient as possible.
  • Provide for pooled threads. Distributed threads that are allowed to be pooled use less storage than inactive database access threads. Per connection, pooled threads use even less storage than inactive database access threads.
  • Ensure that ECSA size is adequate. The extended common service area (ECSA) is a system area that DB2 shares with other programs. Shortage of ECSA at the system level leads to use of the common service area.
  • Ensure that EDM pool space is being used efficiently.
  • Use the long-term page fix option for I/O intensive buffer pools. Specify PGFIX(YES) for buffer pools with a high I/O rate—that is, a high number of pages read or written.
  • Specify an appropriate value for the MAXKEEPD subsystem parameter. A larger value might improve the performance of applications that are bound with the KEEPDYNAMIC(YES) option, yet also keep SQL statement storage allocated when it is not in use. For systems with real-storage constraints, minimizing the value of the MAXKEEPD might reduce storage use.


Buffer Pools

Buffer pools are areas of virtual storage that temporarily store pages of table spaces or indexes. When a program accesses a row of a table, DB2 places the page containing that row in a buffer. When a program changes a row of a table, DB2 must write the data in the buffer back to disk (eventually), normally either at a DB2 system checkpoint or at a write threshold. Each write threshold is either a vertical threshold at the page set level or a horizontal threshold at the buffer pool level.


The way buffer pools work is fairly straightforward by design, but tuning these simple operations can make a big difference to application performance. The data manager issues getpage requests to the buffer manager, which might be able to satisfy the request from the buffer pool instead of having to retrieve the page from disk. We often trade CPU for I/O to manage our buffer pools efficiently. Buffer pools are maintained by subsystem, but individual buffer pool design and use should be by object granularity and sometimes by application.


DB2 buffer pool management by design provides the ability to alter and display buffer pool information dynamically, without requiring a recycle of the DB2 subsystem. This feature improves availability by allowing you to create new buffer pools when necessary as well as dynamically change and delete buffer pools.


Although you set initial buffer pool definitions during installation/migration, they are often hard to configure at this time because the application process against the objects usually is not detailed at installation. Regardless of the installation settings, however, you can use an ALTER statement at any time after the installation to add or delete buffer pools, resize buffer pools, or change thresholds.



In several cases, you can tune buffer pools effectively by using the –DISPLAY BUFFERPOOL command. When a tool is not available for tuning, the following steps help you tune buffer pools:

  1. Use the command, and view statistics.
  2. Make changes (i.e., to thresholds, size, object placement).
  3. Use the command again during processing, and view statistics.
  4. Measure statistics.


The output from the –DISPLAY BUFFER POOL command contains valuable information, such as prefetch information (sequential, list, dynamic requests) pages read, prefetch I/O, prefetch disablement (no buffer, no engine), and I/O and getpage information. The incremental detail display shifts the time frame whenever a new display is performed.


DISPLAY obtains several different types of details as well as varying degrees of granularity. Here are two examples that are useful for tuning applications with possible I/O problems.


The following DISPLAY command will produce a report showing all active buffer pools in the subsystem with getpage and I/O counts:




The next example’s output will show the details, including I/O, for all objects in a particular buffer pool:





Susan Lawson

Susan Lawson is an internationally recognized consultant and lecturer with a background in system and database administration. She currently works with several large clients to help develop, implement, and tune some of the world’s largest and most complex DB2 databases and applications. She also conducts performance and availability audits for many clients to help reduce costs through proper performance tuning and to help ensure availability.

Susan’s other activities include authoring articles and white papers, presenting at user group meetings, and teaching a variety of DB2 courses. She is an IBM GOLD Consultant for DB2 and z/Series, an IBM Champion, and the author of numerous DB2 books, including several IBM certification guides.

Daniel Luksetich is a DB2 database professional with more than 26 years of experience in high-performance design and tuning of very large databases and highly available, high-volume database applications. He also teaches DB2 courses and has authored books, guides, white papers, and magazine articles.

Working as a DB2 application architect, Dan has been involved in several very large DB2 application designs. He specializes in DB2 for z/OS but has worked with DB2 on a variety of platforms. His specialties include performance audits, SQL education, backup and recovery, stored procedures, UDFs, triggers, application design, high-availability design, and DB2 high performance.

Dan is the creator of the DB2EXPERT.COM free DB2 help site, which features free downloads, numerous helpful links, free white papers, and articles. The site’s first, longest-running, and most popular podcast series, “The DB2 Cocktail Hour,” began in March 2005 and now includes more than 33 episodes.

Dan is a regular speaker at IDUG, IBM Information on Demand, and numerous other user groups and communities worldwide. He has consulted in more than a dozen countries on the z/OS, AIX, Linux, and Windows platforms and has worked for state, federal, and international governments, domestic and international financial institutions, large retailers, consumer agencies, insurance companies, and medical device companies, among others.

MC Press books written by Susan Lawson and Daniel Luksetich available now on the MC Press Bookstore.

DB2 9 for z/OS Database Administration (Exam 732) DB2 9 for z/OS Database Administration (Exam 732)
Get a wealth of information about DB2 z/OS V9, plus practical information and tips for best DB2 performance and use.
List Price $64.95

Now On Sale

DB2 10 for z/OS Database Administration (Exam 612) DB2 10 for z/OS Database Administration (Exam 612)
Get a comprehensive review of all topics on the exam, plus important new features in DB2 10 for z/OS.
List Price $74.95

Now On Sale

DB2 11 for z/OS Database Administration: Certification Study Guide (Exam 312) DB2 11 for z/OS Database Administration: Certification Study Guide (Exam 312)
Prep for the exam, and master the skills needed to be an effective database administrator of z/OS mainframes.
List Price $89.95

Now On Sale



Support MC Press Online





  • White Paper: Node.js for Enterprise IBM i Modernization

    SB Profound WP 5539

    If your business is thinking about modernizing your legacy IBM i (also known as AS/400 or iSeries) applications, you will want to read this white paper first!

    Download this paper and learn how Node.js can ensure that you:
    - Modernize on-time and budget - no more lengthy, costly, disruptive app rewrites!
    - Retain your IBM i systems of record
    - Find and hire new development talent
    - Integrate new Node.js applications with your existing RPG, Java, .Net, and PHP apps
    - Extend your IBM i capabilties to include Watson API, Cloud, and Internet of Things

    Read Node.js for Enterprise IBM i Modernization Now!


  • Profound Logic Solution Guide

    SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation.
    Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects.
    The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the companyare not aligned with the current IT environment.

    Get your copy of this important guide today!


  • 2022 IBM i Marketplace Survey Results

    Fortra2022 marks the eighth edition of the IBM i Marketplace Survey Results. Each year, Fortra captures data on how businesses use the IBM i platform and the IT and cybersecurity initiatives it supports.

    Over the years, this survey has become a true industry benchmark, revealing to readers the trends that are shaping and driving the market and providing insight into what the future may bring for this technology.

  • Brunswick bowls a perfect 300 with LANSA!

    FortraBrunswick is the leader in bowling products, services, and industry expertise for the development and renovation of new and existing bowling centers and mixed-use recreation facilities across the entertainment industry. However, the lifeblood of Brunswick’s capital equipment business was running on a 15-year-old software application written in Visual Basic 6 (VB6) with a SQL Server back-end. The application was at the end of its life and needed to be replaced.
    With the help of Visual LANSA, they found an easy-to-use, long-term platform that enabled their team to collaborate, innovate, and integrate with existing systems and databases within a single platform.
    Read the case study to learn how they achieved success and increased the speed of development by 30% with Visual LANSA.


  • Progressive Web Apps: Create a Universal Experience Across All Devices

    LANSAProgressive Web Apps allow you to reach anyone, anywhere, and on any device with a single unified codebase. This means that your applications—regardless of browser, device, or platform—instantly become more reliable and consistent. They are the present and future of application development, and more and more businesses are catching on.
    Download this whitepaper and learn:

    • How PWAs support fast application development and streamline DevOps
    • How to give your business a competitive edge using PWAs
    • What makes progressive web apps so versatile, both online and offline



  • The Power of Coding in a Low-Code Solution

    LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed.
    Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

    • Discover the benefits of Low-code's quick application creation
    • Understand the differences in model-based and language-based Low-Code platforms
    • Explore the strengths of LANSA's Low-Code Solution to Low-Code’s biggest drawbacks



  • Why Migrate When You Can Modernize?

    LANSABusiness users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.
    In this white paper, you’ll learn how to think of these issues as opportunities rather than problems. We’ll explore motivations to migrate or modernize, their risks and considerations you should be aware of before embarking on a (migration or modernization) project.
    Lastly, we’ll discuss how modernizing IBM i applications with optimized business workflows, integration with other technologies and new mobile and web user interfaces will enable IT – and the business – to experience time-added value and much more.


  • UPDATED: Developer Kit: Making a Business Case for Modernization and Beyond

    Profound Logic Software, Inc.Having trouble getting management approval for modernization projects? The problem may be you're not speaking enough "business" to them.

    This Developer Kit provides you study-backed data and a ready-to-use business case template to help get your very next development project approved!

  • What to Do When Your AS/400 Talent Retires

    FortraIT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators is small.

    This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn:

    • Why IBM i skills depletion is a top concern
    • How leading organizations are coping
    • Where automation will make the biggest impact


  • Node.js on IBM i Webinar Series Pt. 2: Setting Up Your Development Tools

    Profound Logic Software, Inc.Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. In Part 2, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Attend this webinar to learn:

    • Different tools to develop Node.js applications on IBM i
    • Debugging Node.js
    • The basics of Git and tools to help those new to it
    • Using as a pre-built development environment



  • Expert Tips for IBM i Security: Beyond the Basics

    SB PowerTech WC GenericIn this session, IBM i security expert Robin Tatam provides a quick recap of IBM i security basics and guides you through some advanced cybersecurity techniques that can help you take data protection to the next level. Robin will cover:

    • Reducing the risk posed by special authorities
    • Establishing object-level security
    • Overseeing user actions and data access

    Don't miss this chance to take your knowledge of IBM i security beyond the basics.



  • 5 IBM i Security Quick Wins

    SB PowerTech WC GenericIn today’s threat landscape, upper management is laser-focused on cybersecurity. You need to make progress in securing your systems—and make it fast.
    There’s no shortage of actions you could take, but what tactics will actually deliver the results you need? And how can you find a security strategy that fits your budget and time constraints?
    Join top IBM i security expert Robin Tatam as he outlines the five fastest and most impactful changes you can make to strengthen IBM i security this year.
    Your system didn’t become unsecure overnight and you won’t be able to turn it around overnight either. But quick wins are possible with IBM i security, and Robin Tatam will show you how to achieve them.

  • Security Bulletin: Malware Infection Discovered on IBM i Server!

    SB PowerTech WC GenericMalicious programs can bring entire businesses to their knees—and IBM i shops are not immune. It’s critical to grasp the true impact malware can have on IBM i and the network that connects to it. Attend this webinar to gain a thorough understanding of the relationships between:

    • Viruses, native objects, and the integrated file system (IFS)
    • Power Systems and Windows-based viruses and malware
    • PC-based anti-virus scanning versus native IBM i scanning

    There are a number of ways you can minimize your exposure to viruses. IBM i security expert Sandi Moore explains the facts, including how to ensure you're fully protected and compliant with regulations such as PCI.



  • Encryption on IBM i Simplified

    SB PowerTech WC GenericDB2 Field Procedures (FieldProcs) were introduced in IBM i 7.1 and have greatly simplified encryption, often without requiring any application changes. Now you can quickly encrypt sensitive data on the IBM i including PII, PCI, PHI data in your physical files and tables.
    Watch this webinar to learn how you can quickly implement encryption on the IBM i. During the webinar, security expert Robin Tatam will show you how to:

    • Use Field Procedures to automate encryption and decryption
    • Restrict and mask field level access by user or group
    • Meet compliance requirements with effective key management and audit trails


  • Lessons Learned from IBM i Cyber Attacks

    SB PowerTech WC GenericDespite the many options IBM has provided to protect your systems and data, many organizations still struggle to apply appropriate security controls.
    In this webinar, you'll get insight into how the criminals accessed these systems, the fallout from these attacks, and how the incidents could have been avoided by following security best practices.

    • Learn which security gaps cyber criminals love most
    • Find out how other IBM i organizations have fallen victim
    • Get the details on policies and processes you can implement to protect your organization, even when staff works from home

    You will learn the steps you can take to avoid the mistakes made in these examples, as well as other inadequate and misconfigured settings that put businesses at risk.



  • The Power of Coding in a Low-Code Solution

    SB PowerTech WC GenericWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed.
    Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

    • Discover the benefits of Low-code's quick application creation
    • Understand the differences in model-based and language-based Low-Code platforms
    • Explore the strengths of LANSA's Low-Code Solution to Low-Code’s biggest drawbacks



  • Node Webinar Series Pt. 1: The World of Node.js on IBM i

    SB Profound WC GenericHave you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.
    Part 1 will teach you what Node.js is, why it's a great option for IBM i shops, and how to take advantage of the ecosystem surrounding Node.
    In addition to background information, our Director of Product Development Scott Klement will demonstrate applications that take advantage of the Node Package Manager (npm).
    Watch Now.

  • The Biggest Mistakes in IBM i Security

    SB Profound WC Generic The Biggest Mistakes in IBM i Security
    Here’s the harsh reality: cybersecurity pros have to get their jobs right every single day, while an attacker only has to succeed once to do incredible damage.
    Whether that’s thousands of exposed records, millions of dollars in fines and legal fees, or diminished share value, it’s easy to judge organizations that fall victim. IBM i enjoys an enviable reputation for security, but no system is impervious to mistakes.
    Join this webinar to learn about the biggest errors made when securing a Power Systems server.
    This knowledge is critical for ensuring integrity of your application data and preventing you from becoming the next Equifax. It’s also essential for complying with all formal regulations, including SOX, PCI, GDPR, and HIPAA
    Watch Now.

  • Comply in 5! Well, actually UNDER 5 minutes!!

    SB CYBRA PPL 5382

    TRY the one package that solves all your document design and printing challenges on all your platforms.

    Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product.

    Request your trial now!

  • Backup and Recovery on IBM i: Your Strategy for the Unexpected

    FortraRobot automates the routine tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:
    - Simplified backup procedures
    - Easy data encryption
    - Save media management
    - Guided restoration
    - Seamless product integration
    Make sure your data survives when catastrophe hits. Try the Robot Backup and Recovery Solution FREE for 30 days.

  • Manage IBM i Messages by Exception with Robot

    SB HelpSystems SC 5413Managing messages on your IBM i can be more than a full-time job if you have to do it manually. How can you be sure you won’t miss important system events?
    Automate your message center with the Robot Message Management Solution. Key features include:
    - Automated message management
    - Tailored notifications and automatic escalation
    - System-wide control of your IBM i partitions
    - Two-way system notifications from your mobile device
    - Seamless product integration
    Try the Robot Message Management Solution FREE for 30 days.

  • Easiest Way to Save Money? Stop Printing IBM i Reports

    FortraRobot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing.
    Manage your reports with the Robot Report Management Solution. Key features include:

    - Automated report distribution
    - View online without delay
    - Browser interface to make notes
    - Custom retention capabilities
    - Seamless product integration
    Rerun another report? Never again. Try the Robot Report Management Solution FREE for 30 days.

  • Hassle-Free IBM i Operations around the Clock

    SB HelpSystems SC 5413For over 30 years, Robot has been a leader in systems management for IBM i.
    Manage your job schedule with the Robot Job Scheduling Solution. Key features include:
    - Automated batch, interactive, and cross-platform scheduling
    - Event-driven dependency processing
    - Centralized monitoring and reporting
    - Audit log and ready-to-use reports
    - Seamless product integration
    Scale your software, not your staff. Try the Robot Job Scheduling Solution FREE for 30 days.