Version 4.2.6
 —  Operations  —

Dynamic Swap-Pool Reorganization

This document describes the prerequistes, process, control and start of a dynamic swap pool reorganization.

The following topics are covered:


Requirements for Dynamic Swap-Pool Reorganization

Dynamic swap pool reorganization is only possible when the physical swap pool contains only one logical swap pool. In this case, the swap pool slots are all of the same size. If necessary, the number of logical swap pools and the slot sizes can be adjusted to meet the requirements. Slot sizes are adjusted by reorganizing the swap pool dynamically.

Top of page

Statistics Tables

The statistical area of the swap pool directory contains two statistics tables which are used for swap pool reorganization:

Top of page

Swap-Pool-Reorganization Plus Table

The swap-pool-reorganization plus table contains information on the Natural user areas which could not be placed into the swap pool because their compressed length exceeded the swap-pool slot size.

The table contains 11 entries:

Top of page

Swap-Pool-Reorganization Minus Table

The swap-pool-reorganization minus table contains information on the Natural user areas whose compressed length was smaller than the swap-pool slot size.

The table contains 11 entries:

The size of a "unit" is defined with the keyword parameter SWPFACT.

Top of page

Parameters for Swap-Pool Reorganization

Dynamic swap-pool reorganization is controlled via the following keyword parameters in the macro NTSWPRM.

Parameter Specifies
SWPSLSZ the slot size for the first initialization of the swap pool. The default size is 62 KB.
SWPTFIX if the slot size is to be fixed or dynamic. With fixed slot size, there is no dynamic swap pool reorganization. If the slot size is defined as not fixed, the swap pool is dynamically reorganized when necessary (this is the default).
SWPTIM1 the time interval at which a check is to be performed to ascertain whether a swap pool reorganization is necessary. By default, the check is performed every 30 minutes.
SWPTIM2 the time to elapse after the check for the necessity of a swap pool reorganization is performed and before the reorganization is to be started. By default, a reorganization is started 2 minutes after a check has proved a reorganization to be necessary.
SWPUSER the rate of compressed user threads (in percent) which are too long for the actual SWP slot length. If this value is reached and the physical SWP contains only one logical swap pool, an SWP reorganization will be announced.
SWPFACT the factor for a "unit" in the swap pool reorganization plus table and minus table.

There is no need to change the default values for any of these parameters (unless you feel that slot size optimization is not performed efficiently enough).

For testing and optimizing, you can dynamically change the values for these parameters online using the Natural Swap Pool Manager, which is part of the Natural utility SYSTP.

Top of page

Checking for the Necessity of Swap-Pool Reorganization

The check is based on:

The number of necessary logical swap pools with the corresponding slot sizes will be computed if the number of user areas whose compressed length was greater or smaller (by at least one unit) than the current slot size is more than n percent of the number of dialog steps (n being the value of the SWPUSER parameter).

When the swap pool is reorganized, the new logical swap pools are used. If the physical swap pool contains more than one logical swap pool after the reorganization, there will be no further dynamic swap-pool reorganization.

Top of page

Flow of Dynamic Swap-Pool Reorganization

Natural will only check whether the swap pool needs to be reorganized if the physical swap pool contains no more than one logical swap pool.

Once the time specified with the SWPTIM1 parameter has elapsed, a check is performed to determine whether a swap-pool reorganization is necessary.

Top of page

Start of Dynamic Swap-Pool Reorganization

After the time specified with the SWPTIM2 parameter has elapsed, the swap pool is reorganized while the current online session continues:

  1. The compressed user areas which are still held in the swap pool are written to the swap file (or roll facility under CICS).

  2. The contents of the swap-pool-reorganization statistics tables are written to SYSLST and then deleted from the tables.

  3. The swap-pool is re-initialized with the newly computed values.

  4. The timer set with the SWPTIM1 parameter (time interval between checks) is activated again.

The Natural swap-pool manager, which is part of the Natural utility SYSTP (see the Natural Utilities documentation), can be used to obtain information on swap pool statistical data, sizes of Natural buffers and user threads.

Top of page