The PostgreSQL Performance Investigator (PostgreSQL PI) provides a more in-depth analysis and investigation of the Instance activity and resource consumption. The PostgreSQL PI dashboard displays the following components:
The Instance View - Provides the ability to investigate and analyze the resource consumption of the instance.
The Performance Tree - Provides iterative access to any dimension associated with PostgreSQL database activity. For more information, refer to Using the Performance Tree.
The Resource Menu - Selecting one resource updates the performance tree, resource consumption charts, and overview section to display only the activity related to the selected resource. For more information, refer to Understanding the overall Instance Activity with the Resource Selector.
This section covers the following key ares:
The PostgreSQL PI dashboard includes a resource selector that allows you to filter activity by the resource it is waiting for. Each resource indicates a group of several wait events that relate to the same area. By selecting a resource, you set the PI dashboard to show only activity relevant to the resource selected. It also highlights relevant metrics for investigation issues related to the selected resource. For example, by selecting I/O, the performance tree is filtered to show only activity that was waiting for I/O and show metrics like Tuple Deleted/Inserted/Updated.
The following table explains the resources available:
Resource | Description |
---|---|
Workload | This resource enables you to review the instance workload by consolidating all resources into a single view. |
Client | This resource indicates a backend process is waiting for communication with the client application. Possible causes include network delays, slow client processing, or waiting for user input. |
I/O | This resource allows you to review I/O-related data, including wait events, and physical reads and writes. |
IPC | This resource indicates a delay in inter-process communication (IPC) mechanisms, which are used by processes to share data and synchronize actions. |
LWLock | This resource indicates that the process is waiting for a lightweight lock (LWLock), which is utilized for internal synchronization within PostgreSQL. Excessive LWLock waits may suggest internal contention points. |
Lock | This resource indicates that the backend process is waiting to acquire a lock on a table or row currently held by another transaction. |
Other | Miscellaneous instance waits include infrequent or special-purpose wait states that should typically remain close to zero. |
Process Time | This resource refers to the time spent by the database engine processing a statement. The server process is active and not waiting for resources. A high processing time may indicate a CPU bottleneck. |
The performance tree provides iterative (up to three levels) access to any of the key dimensions associated with PostgreSQL Server database activity, based on the OLAP multidimensional model and an instance view of the instance activity. Domain nodes offer a hierarchical view of all types of PostgreSQL Server activity characteristics.
Selecting a dimension from the tree determines what subset of activity is displayed. Iterative drill-down into domains of interest provides increasingly refined focus and diagnosis.
For example, to begin the investigation by first identifying the most active DB User, follow the steps described below:
In a similar manner, such iterative drilldowns can be carried out into any PostgreSQL Server dimension of interest, to gain a complete understanding of the causes of its behavior.
The default PostgreSQL Server dimensions are as follows:
The PostgreSQL PI dashboard is divided into three sections that are correlated to each other:
The Workload Metrics section displays parameters such as name, resource, average, min, max, total, and per execution for each metric.
The metrics listed in the table below are available only for certain dimension levels.
Resource menu | Default Metrics Available |
---|---|
Workload | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Elapsed Time - Displays the total time consumed for executing the statements. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Wait Time Percent - Displays the percentage of time spent waiting for resources, such as CPU and I/O, relative to the total active time. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. |
Client | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Elapsed Time - Displays the total time consumed for executing the statements. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Wait Time Percent - Displays the percentage of time spent waiting for resources, such as CPU and I/O, relative to the total active time. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. |
I/O | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Elapsed Time - Displays the total time consumed for executing the statements. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Tuple Deleted Rate - Displays the frequency at which tuples (rows of data) are deleted. - Tuple Inserted Rate - Displays the frequency at which tuples (rows of data) are inserted. - Tuple Updated Rate - Displays the frequency at which tuples (rows of data) are updated. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. - I/O Wait - Displays the time spent by the various sessions waiting for data to be read from or written to disk. |
LWLock | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Elapsed Time - Displays the total time consumed for executing the statements. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. - LWLOCK Wait - Displays the time spent by the various sessions waiting for internal synchronization within PostgreSQL. |
Lock | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Deadlocks - Displays the total number of deadlocks. Deadlock occurs when two or more transactions are struck, each waiting for the other to release a resource they need. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. - Lock Wait - Displays the time spent by the various sessions waiting to acquire a lock on a table or row that is currently held by another transaction. |
Process Time | - Active Time - Displays the sum of all active waits and processing time represents the total activity within the current time interval. - Average SQL Response Time - Displays the average duration of the statements executed during the current time interval is calculated as the elapsed time divided by the execution count. - Commits Rate - Displays the frequency at which transactions are committed. - Elapsed Time - Displays the total time consumed for executing the statements. - Executions - Displays the number of times statements were executed that were active during the current interval. - Rollbacks Rate - Displays the frequency at which transactions are rolled back. - Used Connections - Displays the number of connections (sessions) established between client applications and the PostgreSQL database server. - Waiting Connections - Displays the number of connections (sessions) that are waiting for resources to proceed with their tasks. - Process Time - Displays the time spent by DB engine to process statement (the server process is active and does not wait for resources). |
This section displays the details of the blocked session, the session that is causing the block, and any deadlock sessions. To view blocked sessions for a specific timeframe, click the Duration dropdown list, select the minimum and maximum time range limit, and then click Apply. You can view the following metric parameters for the sessions: