Storage considerations

The virtual storage for the cell pool must reside in an address space or a data space.
  • The anchor and extents must reside within the same address space or data space.
  • The cells must reside within one address space or data space; that space can be different from the one that contains the anchor and extents.

Figure 1 illustrates the anchor and extents in Data/Address Space A and the cell storage in Data/Address Space B.

Before you can obtain the first cell from a cell pool, you must plan the location of the anchor, the extents, and the cell storage. You must obtain the storage for the following areas and pass the following addresses to the services:
  • The anchor, which requires 64 bytes of storage
  • The extent, which requires 128 bytes plus one byte for every eight cells of cell storage
  • The cell storage.
Figure 1. Cell pool storage
The diagram shows the cell pool anchor and extents in address space A (or data space A) and cell storage in address space B (or data space B).
When you plan the size of the cell storage, consider the total requirements of your application for this storage and some performance factors. Although a single extent may contain any number of cells (up to 2²⁴ bytes, or 16,777,216), you might wish to have multiple extents for performance purposes. Avoid having a large number of extents, where each extent is responsible for a small number of cells. In general, a greater requirement for cells should mean a proportionately smaller number of extents. The following two examples illustrate this point.
  • If you have 10,000 cells in the pool, a good extent size is 2,500 cells per extent.
  • If you have 100,000 cells in the pool, a good extent size is 10,000 cells per extent.

Using callable cell pool services to manage data space areas contains an example of using callable cell pool services with data spaces. It also describes some storage considerations.