db2top Partitions Screen

Multiple servers used for partitioned instances

Today’s post is about DB2 Data Partitioning Feature (available in Infosphere Warehouse) and how you can use db2top to monitor your partitions. In this post, you’ll see how to use the Partitions screen to watch for skew between partitions in real-time. The Partitions screen can be launched by pressing the ‘p’ key. It is your typical screen, with a set of gauges up top and a table below, as shown below:

db2top Partitions screen at 80 columns wide

The following four gauges are shown at the top:

Gauge Name Gauge Type Definition
Mem Skew% Normal

A measure of the asymmetry in memory use among partitions.

1 – ((partsum(tbspsum(pool_cur_size)) / node_count) / max(tbspsum(pool_cur_size))), where:

  • partsum() is the sum across all partitions
  • tbspsum() is the sum across all table spaces
  • max() is the maximum across all partitions
  • node_count is the number of partitions on the system
Pool HWM Skew% Normal 1 – ((partsum(tbspsum(pool_watermark)) / node_count) / max(tbspsum(pool_watermark))), where:

  • partsum() is the sum across all partitions
  • tbspsum() is the sum across all table spaces
  • max() is the maximum across all partitions
  • node_count is the number of partitions on the system
BufSent Skew% Normal

A measure of the asymmetry among partitions in the amount of FCM buffers that have been sent between partitions during the interval.

1 – ((sum(total_buffers_sent) / node_count) / max(total_buffers_sent)), where:

  • sum() is the sum across all partitions
  • max() is the maximum across all partitions
  • node_count is the number of partitions on the system
BufRec Skew% Normal

A measure of the asymmetry among partitions in the amount of FCM buffers that have been received at each partition during the interval.

1 – ((sum(total_buffers_rcvd) / node_count) / max(total_buffers_rcvd)), where:

  • sum() is the sum across all partitions
  • max() is the maximum across all partitions
  • node_count is the number of partitions on the system

The following table columns are shown (shown here seven columns at a time):

db2top Partitions Screen columns 1 to 7

Column Name Definition
Partition Number The number assigned to the node in the db2nodes.cfg file (node_number).
Partition Status

This element indicates the communication connection status between the node issuing the GET SNAPSHOT command and other nodes listed in the db2nodes.cfg file (connection_status). If there are no other nodes, this field is blank. One of the following values can be shown:

  • Inactive (SQLM_FCM_CONNECT_INACTIVE)
  • Active (SQLM_FCM_CONNECT_ACTIVE)
  • Congested (SQLM_FCM_CONNECT_CONGESTED)

If the partition status is anything other than “Active”, the status is shown in red text.

Buffer LWM The lowest number of free FCM buffers reached during processing (buff_free_bottom).
Delta mode:
Delta BufSent/s
Actual mode:
Actual BufSent
Delta mode:
The total number of FCM buffers that have been sent per second during the interval from the node issuing the GET SNAPSHOT command to the node identified by the node_number (total_buffers_sent).
Actual mode:
The total number of FCM buffers that have been sent, since the last snapshot reset or database activateion, from the node issuing the GET SNAPSHOT command to the node identified by the node_number (total_buffers_sent).
Delta mode:
Delta BufRcvd/s
Actual mode:
Actual BufRcvd
Delta mode:
The total number of FCM buffers received per second during the interval by the node issuing the GET SNAPSHOT command from the node identified by the node_number  (total_buffers_rcvd).
Actual mode:
The total number of FCM buffers received, since the last snapshot reset or database activation, by the node issuing the GET SNAPSHOT command from the node identified by the node_number  (total_buffers_rcvd).
Pool CurrSize The aggregate of the current sizes of all memory pools on the partition (sum(pool_cur_size), where sum() means summing across all memory pools).
Pool HWM The sum of the high watermarks of each memory pool on the partition (sum(pool_watermark), where sum() means summing across all memory pools).

The final seven columns are:

db2top Partitions Screen columns 8 to 14

Column Name Definition
Channels Free The number of inter-node communication channels that are currently free (ch_free).
Space Used The total number of pages that are currently used (not free) across all table spaces on the partition.

sum(tablespace_used_pages) × tablespace_page_size, where sum() means summing across all table spaces on the partition

Total Space The total number of pages across all table spaces on the partition.

sum(tablespace_total_pages) × tablespace_page_size, where sum() means summing across all table spaces on the partition

Log Current The file number of the active log file the DB2® database system is currently writing (current_active_log).
Log First The file number of the first active log file (first_active_log).
Log Last The file number of the last active log file (last_active_log).
Number of Pools The number of memory pools on the partition.

The footer tells you your database size.

The screen is affected by pressing the ‘k’ key to switch between showing deltas and actuals and by pressing the ‘G’ key to switch between global and local snapshots.

When you increase the width of the screen above 140 columns, a column of aggregates appear on both the left and right of the set of gauges, as shown below:

db2top Partitions screen at 141 columns wide

The aggregates on the left are:

Aggregate Name Definition
Max mem DBP The partition with the largest amount of memory in use.
Max memory The largest amount of memory in use on any one partition in the system.

max(sum(pool_cur_size)), where sum() means summing across all memory pools and max() means the maximum found out of all partitions

The aggregates on the right are:

Aggregate Name Definition
Min mem DBP The partition with the smallest amount of memory in use.
Min memory The smallest amount of memory in use on any one partition in the system.

min(sum(pool_cur_size)), where sum() means summing across all memory pools and min() means the minimum found out of all partitions