PostgreSQL Workload Graphs
It is expected that the user of this tool has a basic understanding of database workloads and performance metrics. The tool provides a user-friendly interface to analyze workloads, but some knowledge of database systems and performance tuning is beneficial for interpreting the results effectively.
The datasource used in this tutorial is QuickStartPostgres. As the name indicates it is a PostgreSQL database system.
Average Active Sessions
The load on the database system is measured in terms of average active sessions. An active session is a session that is either using the CPU or waiting for some resource (like I/O, locks etc.) to complete its work. This data is collected at a frequency of 1 minute. The more the number of active sessions, the more the load on the system. A system with very high load may lead to performance issues. It is calculated based on the number of sessions at the time of measurement divided by the number of samples. For example:
-
If you choose to view an hourly time interval graph, the graph is plotted for every minute. If there are 5 active sessions at the time of measurement (i.e. 1 minute frequency), then average active sessions for that minute would be 5 (5 / 1 minute).
-
If you choose to view a daily graph then, the graph is plotted for every hour of the day. If there are a total 5 active sessions after all the measurements in an hour (i.e. 1 measurement at 1 minute frequency for 60 minutes), then at the end of 60 minutes, average active sessions for that hour would be 0.083 (5 / 60 minutes).
-
If you choose to view a monthly (30 days) graph then, the graph is plotted for every day of the month. If there are 5 active sessions ater all the measurements for 30 days (i.e. 1 measurement at 1 minute frequency for 30 days), then at the end of 30 days, average active sessions for that hour would be 0.0001157 (5 / 60 minutes * 24 hours * 30 days).
-
Similarly, you can compute average active sessions for the number of days you choose as the time interval.
- Average active sessions is a key metric for understanding database performance. A higher number of average active sessions indicates a higher load on the database, which can lead to performance bottlenecks if the system is not adequately provisioned to handle the load.
- In the examples above 5 active sessions have been considered for simplicity. In real-world scenarios, the number of active sessions can vary significantly based on the workload and usage patterns of the database system.