5.23. Profiler #

5.23.1. Profiler Servers
5.23.2. Samples
5.23.3. Viewing Profiler Graphs
5.23.4. Sampling Schedules
5.23.5. Reports

Profiler is an interface to the pgpro_pwr module. With profiler, you can build detailed reports on database performance. Reports are based on samples of database data and cover the specified periods of time.

To build a report, take at least two samples. The samples are placed in the directory of the profiler server. Before taking samples, prepare profiler servers and create them in the web application.

You can create schedules that allow taking samples automatically at the specified time interval. Such schedules also allow taking a sample for the specified date and time.

5.23.1. Profiler Servers #

This section explains how to manage profiler servers. It includes the following instructions:

Creating a Profiler Server

Before performing this instruction:

To create a profiler server:

  1. Go to profiler servers in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerServers.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerServers.

  2. In the top-right corner of the page, click Create server.

  3. Enter parameters of the new profiler server (parameters marked with an asterisk are required):

    • Database: The database for which the profiler server will take samples.

    • Server name.

    • Description.

    • Connection string: The connection string for the profiler server.

    • Enabled: Specifies whether the profiler server is enabled.

      Possible values:

      • yes

      • no

    • Retention period (days): The number of days during which samples can be stored on the profiler server.

      Samples stored longer than the specified period are deleted.

  4. Click Save.

Viewing Profiler Servers

  1. Go to profiler servers in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerServers.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerServers.

  2. From Database, select the database.

  3. Click Select.

The table of profiler servers with the following columns will be displayed:

  • Name.

  • Description.

  • Connection string: The connection string for the profiler server.

  • Enabled: Specifies whether the profiler server is enabled.

    Possible values:

    • yes

    • no

  • Retention period: The number of days during which samples are stored.

    Samples stored longer than the specified period are deleted.

  • Actions.

    For more information about available actions, refer to other instructions in this section.

Editing a Profiler Server

  1. Go to profiler servers in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerServers.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerServers.

  2. From Database, select the database.

  3. Click Select.

  4. Click Edit next to the profiler server.

  5. Edit profiler server parameters.

  6. Click Save.

Deleting a Profiler Server

Important

Deleted profiler servers cannot be restored.

Deleting a profiler server also removes all associated samples and disables sampling schedules that place samples to this server directory.

To delete a profiler server:

  1. Go to profiler servers in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerServers.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerServers.

  2. From Database, select the database.

  3. Click Select.

  4. Click Delete next to the profiler server.

  5. Click Delete.

5.23.2. Samples #

This section explains how to take and view samples.

Taking a sample

Before performing this instruction:

To take a sample:

  1. Go to samples in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSamples.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSamples.

  2. In the top-right corner of the page, click Take snapshot.

  3. Enter parameters of the new sample (parameters marked with an asterisk are required):

    • Database: The database for which the sample will be taken.

    • Server: The profiler server whose directory will be used to store the sample.

    • skip_sizes: Specifies whether to skip the collection of relation sizes when taking the sample.

      Possible values:

      • true: The collection of relation sizes will be skipped when taking the sample.

      • false: The collection of relation sizes will not be skipped when taking the sample.

  4. Click Save.

Viewing Samples

  1. Go to samples in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSamples.

      2. Select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSamples.

  2. From Database, select the database.

  3. From Server, select the profiler server.

  4. Click Select.

The table of samples with the following columns will be displayed:

  • ID: The unique identifier (ordinal number) of the sample.

  • Time: The date and time when the sample was created.

  • Sizes were collected: Specifies whether relation sizes were collected when taking the sample.

    Possible values:

    • yes

    • no

  • Database stat reset: Specifies whether database statistics were reset when taking the sample.

    Possible values:

    • yes

    • no

  • Bgwriter stat reset: Specifies whether bgwriter statistics were reset.

    Possible values:

    • yes

    • no

  • Archiver stat reset: Specifies whether archiver statistics were reset.

    Possible values:

    • yes

    • no

5.23.3. Viewing Profiler Graphs #

Before performing this instruction:

To view profiler graphs:

  1. Go to profiler graphs in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfiler.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to Profiler.

  2. From Database, select the database.

  3. From Server, select the profiler server.

  4. (Optional) In Period, specify the time period.

    If you do not specify a value, the profiler graphs are displayed for the entire time range.

  5. Click Select.

The following profiler graphs will be displayed:

You can perform the following actions using the icons in the top-right corner of the planner graphs:

5.23.4. Sampling Schedules #

This section explains how to manage sampling schedules. It includes the following instructions:

Creating a Sampling Schedule

Before performing this instruction:

To create a sampling schedule:

  1. Go to sampling schedules in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSchedule.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSchedule.

  2. In the top-right corner of the page, click Create task.

  3. Enter parameters of the new sampling schedule (parameters marked with an asterisk are required):

    • Name.

    • Set cron-string execution: Allows specifying the time interval for taking samples in the crontab format.

      If you turn on this toggle, in Execution, enter the string.

    • Task planning: The type of the sampling schedule.

      Possible values:

      • Time-delayed: One sample will be created at the specified date and time.

      • On schedule: Samples will be taken at the specified time interval.

        For this value, specify the following parameters:

        • Interval: The unit of measurement of the time interval.

          Possible values:

          • Minutes

          • Hours

          • Days

        • Repeat every: The time interval for taking samples by minutes or hours.

          This parameter is available only if you select Minutes or Hours from Interval.

        • Execution days: The days when samples will be taken.

        • Cron total line: The string in the crontab format that specifies the time interval for taking samples.

          The value is entered automatically.

      This parameter is available only if you turn off Set cron-string execution.

    • Time: The date and/or time when samples will be taken.

      This parameter is available only if you select Time-delayed from Task planning or Days from Interval.

    • Start and Repeat until: The start and end date and time for taking samples.

      These parameters are available only if you turn on Set cron-string execution or select On schedule from Task planning.

    • Database: The database for which the sample will be taken.

    • Server: The profiler server whose directory will be used to store the sample.

    • skip_sizes: Specifies whether to skip the collection of relation sizes when taking the sample.

      Possible values:

      • true: The collection of relation sizes will be skipped when taking the sample.

      • false: The collection of relation sizes will not be skipped when taking the sample.

  4. Click Save.

Viewing Sampling Schedules

Go to sampling schedules in one of the following ways:

  • Using the monitoring section:

    1. In the navigation panel, go to MonitoringProfilerSchedule.

    2. From Instance, select the instance.

  • Using the configuration section of the specified instance:

    1. In the navigation panel, go to InfrastructureInstances.

    2. Click the name of the instance.

    3. In the navigation panel, go to ProfilerSchedule.

The table of sampling schedules with the following columns will be displayed:

  • Task: The unique name of the sampling schedule.

  • Instance: The instance where the sampling schedule is created.

  • Database: The database for which samples are taken.

  • Schedule: The string in the crontab format that specifies the time interval for taking samples.

  • User: The user that created the sampling schedule.

  • Actions.

    For more information about available actions, refer to other instructions in this section.

Editing a Sampling Schedule

  1. Go to sampling schedules in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSchedule.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSchedule.

  2. Click Three vertical dots iconEdit next to the sampling schedule.

  3. Edit sampling schedule parameters.

  4. Click Save.

Executing a Sampling Schedule

You can manually execute a sampling schedule to instantly start taking samples.

To execute a sampling schedule:

  1. Go to sampling schedules in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSchedule.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSchedule.

  2. Click Three vertical dots iconExecute next to the sampling schedule.

Activating and Deactivating a Sampling Schedule

You can deactivate a sampling schedule to temporarily stop taking samples. Sampling schedules are activated by default.

To deactivate or activate a sampling schedule:

  1. Go to sampling schedules in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSchedule.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSchedule.

  2. Click Three vertical dots iconDeactivate or Activate next to the sampling schedule.

Deleting a Sampling Schedule

Important

Deleted sampling schedules cannot be restored.

When you delete a sampling schedule, the associated samples are not deleted.

To delete a sampling schedule:

  1. Go to sampling schedules in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerSchedule.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerSchedule.

  2. Click Three vertical dots iconDelete next to the sampling schedule.

  3. Click Delete.

5.23.5. Reports #

This section explains how to manage reports. It includes the following instructions:

It is recommended to view available profiler graphs first.

Building a Report

Before performing this instruction:

To build a report:

  1. Go to building a report in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfilerReports generating.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerReports generating.

  2. Enter parameters of the new report (parameters marked with an asterisk are required):

    • Database: The database for which the report will be built.

    • Server: The profiler server whose directory contains samples.

    • Report: The format of the time period that the report will cover.

      Possible values:

      • By snapshot: The report will cover the time period between two samples.

      • By time: The report will cover the time period between two dates.

    • Type.

      Possible values:

      • Standard: Provides the database load statistics for a specified time period.

      • Differential: Provides comparative database load statistics for two specified time periods.

    • Interval or Interval 1 and Interval 2: The time period covered by the report.

      The period format depends on the value selected in Report:

      • If you select By snapshot, specify the first and last samples.

      • If you select By time, specify the start and end date and time.

  3. Click Generate report.

Building a Report Using a Profiler Graph

You can also build a report when viewing profiler graphs. In this case, the time period between two samples cannot be used as the time period that the report will cover.

Before performing this instruction:

To build a report using a graph profiler:

  1. Go to profiler graphs in one of the following ways:

    • Using the monitoring section:

      1. In the navigation panel, go to MonitoringProfiler.

      2. From Instance, select the instance.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to Profiler.

  2. From Database, select the database.

  3. From Server, select the profiler server.

  4. (Optional) In Period, specify the time period.

    If you do not specify a value, the profiler graphs are displayed for the entire time range.

  5. Click Select.

  6. In the top-right corner of the profiler graph, click Select the period for the report.

  7. Click and drag on the profiler graph to select the time period for the report.

  8. (Optional) To include comparative database load statistics for two specified time periods in the report, click Select another period and repeat step 7.

  9. Click Generate report.

Viewing All Built Reports

To view all built reports:

Go to reports in one of the following ways:

  • Using the monitoring section:

    In the navigation panel, go to MonitoringProfilerReports.

  • Using the configuration section of the specified instance:

    1. In the navigation panel, go to InfrastructureInstances.

    2. Click the name of the instance.

    3. In the navigation panel, go to ProfilerReports.

The table of reports with the following columns will be displayed:

  • Instance: The instance where the report is built.

  • Server: The profiler server whose directory contains samples.

  • Database: The database for which the report is generated.

  • Status.

    Possible values:

    • done: The report is built.

    • pending: The report is being built.

    • error: An error occurred while building a report.

  • Period: The time period covered by the report.

  • Execution start and Execution end: The start and end date and time of report building.

  • User: The user that built the report.

  • Actions.

    For more information about available actions, refer to other instructions in this section.

Viewing and Downloading a Report

  1. Go to reports in one of the following ways:

    • Using the monitoring section:

      In the navigation panel, go to MonitoringProfilerReports.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerReports.

  2. Perform one of the following actions:

    • To view the report, click View next to it.

      For more information about the report contents, refer to the official Postgres Pro documentation.

    • To download the report, in the top-right corner of the page, click Download report.

Deleting a Report

Important

Deleted reports cannot be restored.

To delete a report:

  1. Go to reports in one of the following ways:

    • Using the monitoring section:

      In the navigation panel, go to MonitoringProfilerReports.

    • Using the configuration section of the specified instance:

      1. In the navigation panel, go to InfrastructureInstances.

      2. Click the name of the instance.

      3. In the navigation panel, go to ProfilerReports.

  2. Click Delete next to the report.

  3. Click Delete.