In the first post in this series, we saw gauges and aggregates of table space information across all the table spaces in your database. In today’s post, you will see how db2top presents individual table spaces and their attributes. You will see ways to gauge the efficiency of your caching by looking at individual hit ratios, check your storage space usage, and identify data skew problems in systems that use the Data Partitioning Feature (DPF).
The tables below show attributes for individual table spaces. The columns are shown as they would appear in delta mode (d=Y in the header) and actual mode (d=N in the header). This column information is shown one screen’s worth at a time, starting at the far left of the table:
Column Name | Definition |
---|---|
Tablespace Name | The name of the table space (tablespace_name). It is prefixed with “!” and colored red if the state (tablespace_state) is not normal. It is colored green if the table space is active. |
|
|
|
|
Hit Ratio% |
(1 – (pool_data_p_reads + pool_index_p_reads + pool_temp_data_p_reads + pool_temp_index_p_reads) / (pool_data_l_reads + pool_index_l_reads + pool_temp_data_l_reads + pool_temp_index_l_reads)) × 100% |
Async Reads% |
(pool_async_data_reads + pool_async_index_reads) / (pool_data_p_reads + pool_index_p_reads + pool_temp_data_p_reads + pool_temp_index_p_reads) × 100% |
Pages Aread |
(pool_async_data_reads + pool_async_index_reads)/(async_data_read_reqs + async_index_read_reqs) |
Column Name | Definition |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Column Name | Definition |
---|---|
Avg_Reads Dir_Reqs |
|
Avg RdTime | The average elapsed time required to perform a read for this table space, whether or not it used a buffer pool.
(pool_read_time + direct_read_time) / (pool_data_p_reads + pool_index_p_reads + pool_temp_data_p_reads + pool_temp_index_p_reads + direct_reads) |
Avg WrTime | The average amount of time spent physically writing a page to disk for this table space, whether or not it used a buffer pool.
(pool_write_time + direct_write_time) / (pool_data_writes + pool_index_writes + direct_writes) |
Tbsp Type |
The type of content in a table space (tablespace_content_type). It can take on one of the following values:
|
# of DBP | The number of database partitions for this table space. |
Avg PrefSize |
tablespace_page_size × (pool_async_data_reads + pool_async_index_reads) / (async_data_read_reqs + async_index_read_reqs) |
Space Used | The total number of bytes that are currently used (not free) in this table space (tablespace_used_pages × tablespace_page_size). Expressed as a multiple of bytes (e.g. KB, MB, etc.). |
Total Size | The total number of bytes in the table space (tablespace_total_pages × tablespace_page_size). Expressed as a multiple of bytes (e.g. KB, MB, etc.). |
Column Name | Definition |
---|---|
# of Extents | The number of extents in the table space (tablespace_total_pages / tablespace_extent_size). |
High WaterMark | For DMS table spaces, this shows the current number of bytes allocated (tablespace_page_top × tablespace_page_size). It is expressed as a multiple of bytes (e.g. KB, MB, etc.). |
Max High WaterMark | For DMS table spaces, this shows the highest number of bytes allocated (tbsp_max_page_top × tablespace_page_size) since the database was activated. It is expressed as a multiple of bytes (e.g. KB, MB, etc.). For SMS table spaces, this is not applicable. |
% Full | For DMS table spaces, this shows the percentage of the total number of bytes in the table space that are currently used. For SMS table spaces, a ‘-’ is shown. Colored red if over 90%. |
Data Skew | A measure of the asymmetry in table space page use among partitions.
1 – ((sum(tablespace_used_pages) / node_count) / tbsp_max_page_top), where sum() is the sum across all partitions, max() is the maximum across all partitions, and node_count is the number of partitions of the table space |
Tbspce Status |
The current state of a table space (tablespace_state). It is shown in bold and colored red if the state is not “Normal”. Only one state is reported among the following possible values:
|
Tbspce Type |
The type of the table space (tablespace_type). It can have one of the following values:
|
FSC On | Indicates whether a particular table space uses file system caching (fs_caching). If file system caching is enabled, “Yes” is shown. If file system caching is disabled, “No” is shown. |
Auto Stor | Describes whether the table space was created as an automatic storage table space (tablespace_using_auto_storage). If it is an automatic storage table space, “Yes” is shown. Otherwise, “No” is shown. |
Auto Size | Describes whether automatic resizing is enabled for the table space (tablespace_auto_resize_enabled). If automatic resizing is enabled, “Yes” is shown. Otherwise, “No” is shown. |
Column Name | Definition |
---|---|
Failed Resize | Describes whether or not the last attempt to automatically increase the size of the table space failed (tablespace_last_resize_failed). If the resize failed, “Yes” is shown in bold and colored red. Otherwise, “No” is shown. If automatic resizing is disabled, “-” is shown. |
Last Resize | The last time that the size of the table space was successfully increased (tablespace_last_resize_time). |
|
|
|
|
|
|
|
|
|
|
|
|
Column Name | Definition |
---|---|
Page Size | Page size used by this table space, expressed in units of kilobytes (tablespace_page_size / 1024). |
Extent Size | The extent size used by this table space (tablespace_page_size × tablespace_extent_size). Expressed in units that are a multiple of bytes (e.g. KB, MB, etc.). |
Prefetch Size | The maximum number of bytes the prefetcher gets from the disk at a time (tablespace_page_size × tablespace_prefetch_size). Expressed in units that are a multiple of bytes (e.g. KB, MB, etc.). If automatic prefetch size is enabled, “AUTO” is reported instead. |
Minimum Recovery_Time | The earliest point in time to which a table space can be rolled forward (tablespace_min_recovery_time). If the minimum recovery time is zero, a “-” is reported. |
Recent IOs[1 to 30] | The amount of logical reads, logical writes and direct writes to occur in this table space over the specified window of time. A sliding window is used to measure only the last x samples, where x is a number between 1 and 30 that the user can control using the ‘+’ and ‘-‘ keys.
pool_data_writes + pool_index_writes + direct_writes + pool_data_l_reads + pool_index_l_reads + pool_temp_data_l_reads + pool_temp_index_l_reads |
The Tablespaces screen is affected by typing the ‘k’ key to switch between deltas and actuals. It is also affected by the ‘G’ key switching between local and global snapshots. It is not affected by the ‘X’ key toggling extended mode on and off.