Purpose of a Natural Swap Pool

This document describes the purpose, benefits and structure of a Natural swap pool.

The section covers the following topics:


Purpose of a Natural Swap Pool

A Natural user work area is required for each online Natural user. The size of this work area is determined by the parameter MAXSIZE in the macro NTSWPRM.) The user work area must be in the computer's main storage whenever the user initiates any form of dialog transaction.

In order to reduce the frequency with which the user work area is rolled out to the swap file (or roll facility under CICS) and rolled in again, it is possible to set up a Natural swap pool.

For more details, refer to Natural Swap Pool Theory of Operation.

Benefits of Using a Natural Swap Pool

The user work areas are held in the Natural swap pool in compressed form as much as possible. The amount by which disk swapping is reduced depends upon the size of the swap pool, the size of each compressed Natural user work area and the number of online users.

If the user work areas of all the online users can be kept resident in the swap pool, no disk swapping takes place.

TP Monitor Comment
CICS The size, name and cache size of the swap pool are specified using profile parameter BPI or the corresponding macro NTBPI in the Natural parameter module, that is, the (NT)BPI settings in effect for the Natural session initializing the Natural CICS environment are taken.
openUTM The size of the Natural swap pool is specified with the keyword parameter SIZE in the macro ADDON or by program CMPSTART (see also the keyword parameters DATA and DESA for the generation of swap pool data space).

Swap Pool Structure

The physical swap pool is made up of the following parts:

  • Main directory

  • Logical swap pools with

    • Subdirectories

    • Swap pool slots

Swap Pool Main Directory

The swap pool main directory refers to the entire swap pool. Up to 15 logical swap pools can be defined.

Subdirectories

Each logical swap pool has its own subdirectory.

Swap Pool Slots

In the swap pool slots, the Natural user work areas are held in compressed form.

For the first initialization of the swap pool, the number of logical swap pools and the size of their slots can be defined with the parameter SWPSLSZ in the macro NTSWPRM to generate the swap pool parameter module.

Logical Swap Pools

Each logical swap pool contains a subdirectory and a guest table.

Each swap pool directory entry used is chained to its predecessor entry and successor entry. This is also true for the entries in the guest table. In this way, the most recent and the oldest swap pool users/guests are always known.

To define a guest in a logical swap pool, proceed as in the following example:

There is a swap pool with three logical swap pools (LSPs).

  • LSP 1 has a slot size of 62 KB.

  • LSP 2 has a slot size of 72 KB.

  • LSP 3 has a slot size of 82 KB.

The size of the compressed Natural user work area is 60 KB and therefore, this user work area should be compressed into a slot of the logical swap pool 1. If LSP 1 is currently full (which is the case in the above example) and LSP 2 contains a free slot, the user work area will be compressed into LSP 2; if it is full, and LSP 3 contains a free slot, the user work area will be compressed into LSP 3. A user work area in LSP 2 or 3 is a guest in these LSPs because its own LSP was full.

TP Monitor Comment
CICS The Natural swap pool is optional under CICS. Due to CICS command-level overhead, swapping into or from the swap pool is faster than expensive roll I/Os. Nevertheless, if virtual storage is a bottleneck, the installation of a swap pool may lead to performance degradations due to paging overhead; see also Natural Swap Pool under CICS and Using the Natural Swap Pool under CICS in the Natural TP Monitor Interfaces documentation.
openUTM The Natural swap pool is necessary under openUTM. See also Natural Swap Pool under openUTM