Calculating real storage requirements

Db2 can use real storage to reduce I/O and processor times and to improve response time and throughput. The amount of real storage that Db2 needs varies greatly.

About this task

Some users find that their organizations need several times the estimates listed below, whereas others need less. The amount of storage is an important parameter in Db2 performance. Performance monitoring programs give you a more accurate estimate of your storage requirements than the formulas in this topic because these programs can take specific environmental characteristics into account.

For the Db2 buffer pools, the EDM pool, log buffers, and working storage, the amount of real storage must be the same as the amount of virtual storage. Paging activity in the buffers is an indication of a problem. If you do not have enough real storage, you might need to reduce your buffer pool size, which allows fewer concurrent users. You also need space to contain locks, the working set of code in all address spaces, log buffers, and common storage space. In Db2 13, log buffers are permanently page-fixed. Therefore, the entire size of the output buffer needs to be used to estimate real storage. Because some of the figures that are used in virtual storage calculations are maximums, whereas the real storage figures typically use activity for the peak, changes are needed in the calculations. The virtual storage figures concentrate on the most constrained address space, but real storage work must include them all. For more information about each category, see the information specified in the first two tables below.

Some storage for castout engines or DASD read and write of a compressed index might be fixed through a PAGEFIX operation. More castout engines or more compressed indexes can cause more storage to be permanently fixed. MVS Real Storage Manager (RSM) controls where the PAGEFIX occurs in real storage, and it can occur below the 16 MB line. If you have concerns about this behavior, consult with IBM Support for MVS RSM.

Procedure

To estimate real storage requirements:

  1. Multiply the virtual size of each storage area by the factor that is indicated in the following table to estimate the real size for that area.

    Table 1. Real storage size calculation
    Category Default Virtual size × Factor = Real size
    Buffer pools 104,200 KB _______ 1.0 _______
    Sort pool 10,000 KB _______ 0.5 _______
    RID pool 400,000 _______ 0.5 _______
    EDM pool 33,600 KB _______ 1.0 _______
    Data set size 17,928 KB _______ 0.6 _______
    Code size + 1100 (4 address spaces) 40,000 KB 40,000 KB 0.5 20,000 KB
    Working storage + (DSCF + DDF) 55,800 KB _______ 1.0 _______
    Log buffers 4000 KB _______ 1.0 _______
    Lock space 5000 KB _______ 0.4 _______
    Common storage 2160 KB _______ 0.4 _______
             
      Total real storage size = _______

  2. Plan to add real storage for additional users.

    The following table uses rough estimates to approximate the amount of additional real storage that is needed by several kinds of users. If you have more concurrent users, plan to add real storage.

    Table 2. Additional real storage for more users
    Type of user Additional real storage
    Transaction 150 KB
    Query 400 KB
    Batch 700 KB
    Recommendation: If you are assessing the storage needs of a running subsystem, look at the IBM OMEGAMON for Db2 Performance Expert on z/OS report for IFCID 0225. This report calculates the virtual storage per user.
  3. Plan to add 28 KB of real storage for each open index partition.

Example

The following table shows the default real storage size calculations.


Table 3. Default real storage size calculation
Category Default virtual size × Factor = Real size
Buffer pools 104,000 KB 1.0 104,000 KB
Sort pool 10,000 KB 0.5 5000 KB
RID pool 400,000 0.5 200,000
EDM pool 33,600 KB 1.0 33,600 KB
Data set size 17,928 KB 0.6 10,756.8 KB
Code size + 1100 (4 address spaces) 40,000 KB 0.5 20,000 KB
Working storage + (DSCF + DDF) 55,800 KB 1.0 55,800 KB
Log buffers 4000 KB 1.0 4000 KB
Lock space 5000 KB 0.4 2000 KB
Common storage 2160 KB 0.4 864 KB
      ----------
  Total real storage size = 436,021 KB