Chapter 14. Tibero Performance Repository

Table of Contents

14.1. Overview
14.2. Using TPR
14.2.1. Specifying a tip File
14.2.2. Related Tables and Views
14.2.3. Creating a Snapshot Manually
14.2.4. Creating a Report

This chapter describes Tibero Performance Repository (TPR), which is used to diagnose Tibero's performance.

14.1. Overview

Tibero provides a variety of statistics to help DBAs diagnose performance problems. Tibero Performance Repository (hereafter TPR) automatically and periodically collects such statistics and provides its own analysis reports about the statistics for system load analysis.

TPR has the following functions:

  • Saving snapshots

    Periodically saves Tibero's various performance statistics such as _vt_jcntstat, v$system_event, v$sqlstats, and v$sgastat (usually once an hour) in a table. The saved information is called a snapshot. Snapshots are used to create an analysis report to diagnose database performance problems.

  • Saving session status

    Saves the current session IDs and pending event information in memory every second. The saved information can be viewed using the view v$active_session_history. With this view, a database's performance problems can be analyzed in detail. Increasing the save cycle based on the environment is recommended because this function can reduce the performance of the database.

14.2. Using TPR

14.2.1. Specifying a tip File

To use the snapshot saving function, set 'TIBERO_PERFORMANCE_REPOSITORY=Y' in the tip file. To use the session status saving function, set 'ACTIVE_SESSION_HISTORY=Y'. To use other APM functions, specify the following parameters in the tip file.

ParameterDescription
TIBERO_PERFORMANCE_ REPOSITORYIf specified as Y, the snapshot saving function is enabled. (Default value: Y)
TPR_SNAPSHOT_SAMPLING_ INTERVALInterval at which to save snapshots, in minutes. (Default value: 60)
TPR_SNAPSHOT_RETENTIONPeriod to maintain snapshots, in days. (Default value: 7)
TPR_SNAPSHOT_TOP_SQL_CNTThe number of top SQL to print in the report. (Default value:5)
TPR_SEGMENT_STATISTICSTPR enables statistics collection for each segment. (Default value: N)
TPR_SNAPSHOT_TOP_ SEGMENT_CNT

Number of top segments to be printed in the report.

(Default value: 5, unit: count)

TPR_METRICEnables the TPR METRIC function. (Default value: N)
TPR_AGGREGATION

Enables the TPR AGGREGATION function. (Default value: N)

ACTIVE_SESSION_HISTORYIf specified as Y, the session status saving function is enabled. (Default value: N)
_ACTIVE_SESSION_HISTORY_ SAMPLING_INTERVALInterval at which to save session status, in seconds. (Default value: 1)

14.2.2. Related Tables and Views

Saved snapshots and session status can be viewed using the relevant tables and views. By default, snapshots and session status are removed from a table after seven days.

  • Tables related to snapshot saving:

    TableDescription
    _TPR_SNAPSHOTContains saved snapshot IDs and time information.
    _TPR_BASELINEManages registered baseline information.
    _TPR_ACTIVE_SESSION_HISTORYManages saved ASH sample information.
    _TPR_METRICManages saved TPR metric information.
    _TPR_JCNTSTATContains snapshot information for the view _VT_JCNTSTAT.
    _TPR_SQLSTATSContains snapshot information for the view V$SQLSTATS.
    _TPR_SQL_PLANContains snapshot information for the view V$SQL_PLAN.
    _TPR_SQL_PLAN_STATContains snapshot information for the view V$SQL_PLAN_STATISTICS.
    _TPR_LATCHContains snapshot information for the view V$LATCH.
    _TPR_SYSTEM_EVENTContains snapshot information for the view V$SYSTEM_EVENT.
    _TPR_WAITSTATContains snapshot information for the view V$WAITSTAT.
    _TPR_SGASTATContains snapshot information for the view V$SGASTAT.
    _TPR_PGASTATContains snapshot information for the view V$PGASTAT .
    _TPR_LIBRARYCACHEContains snapshot information for the view V$LIBRARYCACHE.
    _TPR_SQLTEXTContains snapshot information for the view V$SQLTEXT .
    _TPR_FILESTATContains snapshot information for the view V$FILESTAT.
    _TPR_SEGMENTSTATContains snapshot information for the view V$SEGMENT_STATISTICS.
    _TPR_TEMPSEG_OP_USAGEContains snapshot information for the view V$TEMPSEG_OP_USAGE.
    _TPR_PROCESSContains snapshot information for the view V$PROCESS.
    _TPR_SESSIONContains snapshot information for the view V$SESSION.
    _TPR_WAITER_SESSIONContains snapshot information for the view V$WAITER_SESSION.
    _TPR_UNDOSTATContains snapshot information for the view V$UNDOSTAT.
    _TPR_OSSTAT2Contains snapshot information for the view V$OSSTAT2.
    _TPR_SQLWA_HISTContains snapshot information for the view V$SQLWA_HIST.
    _TPR_MODIFIED_PARAMContains snapshot information for the table _VT_PARAMETER.
    _TPR_MISCContains snapshot information such as the number of sessions.

    A sample of the table _TPR_SNAPSHOT is shown below:

    TABLE '_TPR_SNAPSHOT'
    -------------------------------------------------------------
    COLUMN_NAME                       TYPE             CONSTRAINT
    --------------------------------- ---------------- ----------
    SNAP_ID                           NUMBER
    THREAD#                           NUMBER
    INSTANCE_NUMBER                   NUMBER
    BEGIN_INTERVAL_TIME               DATE
    END_INTERVAL_TIME                 DATE
    SNAP_GID                          NUMBER
  • Tables related to session status saving

    TableDescription
    _TPR_ACTIVE_SESSION_HISTORYContains running session status.
    V$ACTIVE_SESSION_HISTORYContains session status during the past hour.

    The following is an example of the table V$ACTIVE_SESSION_HISTORY:

    VIEW 'V$ACTIVE_SESSION_HISTORY'
    ----------------------------------------------------------
    COLUMN_NAME                     TYPE           CONSTRAINT              
    ------------------------------- -------------- -----------
    SAMPLE_ID                       NUMBER
    THREAD#                         NUMBER
    SAMPLE_TIME                     DATE
    SID                             NUMBER
    SESS_SERIAL_NO                  NUMBER
    USER_NO                         NUMBER
    WAIT_EVENT                      NUMBER
    TIME_WAITED                     NUMBER
    SQL_ID                          VARCHAR(13)
    SQL_CHILD_NUMBER                NUMBER
    CURR_HASHVAL                    NUMBER
    MODULE_NAME                     VARCHAR(64)
    ACTION_NAME                     VARCHAR(64)
    CLIENT_INFO_NAME                VARCHAR(64)
    PROG_NAME                       VARCHAR(30)
    SQL_EXEC_START                  DATE
    SQL_EXEC_ID                     NUMBER
    SQL_PLAN_LINE_ID                NUMBER
    ID1                             NUMBER
    ID2                             NUMBER
    WE_SEQ                          NUMBER
    USGMT_ID                        NUMBER
    SLOTNO                          NUMBER
    WRAPNO                          NUMBER
    PORT                            NUMBER
    DELTA_TIME                      NUMBER
    DELTA_PHY_READ_BLKS             NUMBER
    DELTA_PHY_WRITE_BLKS            NUMBER
    DELTA_LOG_READ_BLKS             NUMBER
    PGA_SIZE                        NUMBER
    WAIT_OBJ_ID                     NUMBER
    WAIT_FILE_NO                    NUMBER
    WAIT_BLOCK_NO                   NUMBER
    WAIT_ROW_NO                     NUMBER

14.2.3. Creating a Snapshot Manually

A snapshot can be created manually as shown below:

SQL> exec dbms_tpr.create_snapshot();

14.2.4. Creating a Report

Saved snapshots and session status may be used with tables and views, but in general, they are used with an analysis report. A performance analysis report can currently be created by analyzing snapshot information, but cannot be created by analyzing session status information.

Creating a Performance Analysis Report Using Snapshots

Use the table _TPR_SNAPSHOT to check if the start and end time of a period are available to create a performance analysis report.

Specify the period's start time begin and end time end as shown below to create a performance analysis report: All snapshots with a BEGIN_INTERVAL_TIME value that falls between begin_date and end_date in _TPR_SNAPSHOT table are displayed in a report.

/* exec dbms_tpr.report_text(begin_date, end_date) */
SQL> exec dbms_tpr.report_text('2013-01-01 13:00:00', '2013-01-01 14:59:00');

The report file is generated in the following path:

$TB_HOME/instance/$TB_SID/tpr_report.{mthr_pid}.{current_time}

Performance Analysis Items

Descriptions for each performance analysis item are as follows:

  • Overview Part

    • System Overview

      • CPU Usage

      • Memory Usage

    • Workload Overview

      • Workload Summary

      • Workload Stats

    • Instance Overview

      • Instance Efficiency

      • TAC Statistics Overview (Cluster Cache Activity, Cluster Buffer Cache, Cluster Cache and Wait Lock Statistics)

      • Top 5 Wait Events by Wait Time

      • I/O Overview

    • SQL Overview

      • PGA Work Area Statistics

      • Top 3 SQL Ordered by Elapsed Time

      • Top 3 SQL Ordered by Executions

      • Top 3 SQL Ordered by Gets

  • Detail Part

    • System Detail

      • OS Statistics

      • Shared Pool Statistics

      • Physical Plan Cache Statistics

      • Data Dictionary Cache Statistics

      • PGA Statistics

    • Workload Detail

      • Workload Stats (Time-based)

      • Workload Stats (Number-based)

      • Workload Stats (Size-based)

    • Instance Detail

      • Buffer Cache Statistics

      • Wait Event Summary (by Class)

      • Wait Events by Wait Time

      • Session Status with Wait Event

      • Blocking Session Status with Wait Event

      • Wlock Statistics

      • Spinlock (Latch) Statistics

      • Spinlock (Latch) Sleep Statistics

      • Tablespace I/O Statistics

      • File I/O Statistics

      • Temp Segment Usage Statistics

      • Segments Ordered by Physical Reads (When "TPR_SEGMENT_STATISTICS" is set to Y. )

      • Segments Ordered by Logical Reads (When "TPR_SEGMENT_STATISTICS" is set to Y.)

      • Segments Ordered by ITL Waits (When "TPR_SEGMENT_STATISTICS" is set to Y.)

      • Segments Ordered by Buffer Busy Waits (When "TPR_SEGMENT_STATISTICS" is set to Y.)

      • Segments Ordered by Row Lock Waits (When "TPR_SEGMENT_STATISTICS" is set to Y.)

      • Undo Statistics

      • Wait Statistics (When "_DB_BLOCK_PIN_WAIT_USE_STAT" is set to Y.)

    • SQL Detail

      • PGA Summary

      • PGA Work Area Histogram

      • SQL Ordered by Elapsed Time (with Physical Plan)

      • SQL Ordered by Elapsed Time/Execution (with Physical Plan)

      • SQL Ordered by Executions (with Physical Plan)

      • SQL Ordered by Gets (with Physical Plan)

      • SQL Ordered by Reads (with Physical Plan)

      • SQL Ordered by Extra I/O (with Physical Plan)

      • SQL Ordered by CPU (with Physical Plan)

  • Etc

    • Tibero Init.Parameters (.tip)

    • Modified Parameters