Show TOC

Changed Buffer Behavior of Entire/Generic Table Buffer

Description

Like the partial buffer, the generic/entire table buffer consists of a central management structure, a list of tables and the data range.

The main difference to the partial buffer is in management of the data range. The generic/entire buffer divides its storage into areas (extents) of variable length. The length of an area is a multiple of a predefined block size (256 bytes). The buffer management attempts to place the contents of a generic table area or an entire table into one extent. This enables a reduction of the storage requirement of buffered data compared to partial buffering.

The table names are sorted alphabetically in the list of tables. The data records - already sorted by the database - are rolled into the corresponding extent in one step. When accessing the buffer, the list of tables is first searched for the corresponding table name using binary search. The extent is then also searched for the corresponding data record using binary search.

Displacement

Unlike the partial buffer, the displacement in the generic/entire buffer is carried out asynchronously at particular times. These events are determined dynamically using the number of accesses to the buffer. Thus, the time between two updates depends on the utilization of the buffer.

A displacement only occurs if the free space in the buffer drops below a preset value at the corresponding time or if the access quality (that is, the number of accesses which can be satisfied directly from the buffer) is too poor. An attempt is then made to free a particular space in the buffer. A large quantity of tables are thus displaced at specific times.

Here, the tables that are the most rarely accessed are displaced. The accesses to a table are weighted differently, depending on the time at which they were made. In this case, accesses which occurred further in the past are weighted lower than those that were made only a short time before the displacement.

In particular, this procedure guarantees that tables that are only accessed very frequently at a specific time and then are not used again after this, can be displaced from the buffer after a certain length of time.

Please note that for tables that are generically buffered, the individual generic areas in the buffer are dealt with as independent tables. Individual generic areas of a table can thus be displaced while other generic areas of the table remain in the buffer.

After the tables have been displaced, a reorganization of the buffer occurs after certain periods to reduce the fragmentation of the buffer.

Installation information

Whether displacement occurs or not is controlled via a system parameter. For the delivery, this system parameter is set so that the displacement is switched on as a default.

System administration changes

The displacement is controlled via three system parameters:

1) zcsa/exchange_mode: controls whether displacement occurs. Settings:

2) zcsa/table_buffer_area: controls the size of the buffer in bytes

3) zcsa/db_max_buftab : specifies the number of management entries. A management entry should be entered for every 3000 bytes of buffer size.