Updated on 2025-05-29 GMT+08:00

System Performance Snapshot

enable_perf_trigger

Parameter description: Specifies whether to enable the flame graph function for high seconds-level CPU usage.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The flame graph function is enabled for high seconds-level CPU usage.
  • off: The flame graph function is disabled for high seconds-level CPU usage.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

perf_trigger_limit

Parameter description: Specifies the threshold for triggering flame graph collection due to high CPU usage. When the CPU usage exceeds the value of this parameter, a flame graph of high CPU usage is generated.

Parameter type: integer.

Unit: %

Value range: 0 to 100

Default value: 90

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

perf_trigger_increase

Parameter description: Specifies the threshold for triggering flame graph collection due to high seconds-level CPU usage. When the increase rate of the system CPU usage compared with that in the previous second exceeds the value of this parameter, a flame graph of high seconds-level CPU usage is generated.

Parameter type: integer.

Unit: %

Value range: 0 to 100

Default value: 30

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

enable_wdr_snapshot

Parameter description: Specifies whether to enable the database monitoring snapshot function.

Parameter type: Boolean.

Unit: none

Value range:

  • on indicates that the database monitoring snapshot function is enabled.
  • off indicates that the database monitoring snapshot function is disabled.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

You are advised not to enable it in the following scenarios:

  • In multi-table and multi-database scenarios, WDR snapshot records snapshots in each database in serial mode, which takes a long time. Therefore, you are advised not to enable it.
  • In the multi-table scenario, the query speed of the pg_stat_all_tables is slow due to the performance problems of some internal tables. In this case, the WDR snapshot function is slow. Therefore, you are advised not to enable it.
  • If WDR snapshot is performed when there are a large number of DDL statements, WDR snapshot may fail. Therefore, you are advised not to enable it.

enable_wdr_snapshot_standby

Parameter description: Specifies whether to enable the database monitoring snapshot function on the standby node.

Parameter type: Boolean.

Unit: none

Value range:

  • on indicates that the database monitoring snapshot function is enabled on the standby node.
  • off indicates that the database monitoring snapshot function is disabled on the standby node.

Default value: off

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value. If you want to adjust the value, make sure you understand the parameter meaning and adjust the value with caution to avoid risks caused by misoperations.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

enable_show_standby_name

Parameter description: Specifies whether to display the names of the primary and standby nodes in the same shard. The names are used to distinguish the primary and standby nodes. After this function is enabled, different names are returned when dbe_perf.node_name is queried on different nodes of the same shard. This parameter can be set at the PDB level.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The function of distinguishing primary and standby node names is enabled.
  • off: The function of distinguishing primary and standby node names is disabled.

Default value: off. In the PDB scenario, if this parameter is not set, the global setting is inherited.

Setting method: This is a USERSET parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

wdr_snapshot_retention_days

Parameter description: Specifies the number of days database monitoring snapshots are retained. If the number of snapshots generated during database running exceeds the maximum number of snapshots that can be generated within the retention period (24 x 8 = 192 by default), the system deletes the snapshots with the smallest ID at an interval specified by the value of wdr_snapshot_interval.

This parameter is valid only when enable_wdr_snapshot is set to on.

Parameter type: integer

Unit: day

Value range: 1 to 30

Default value: 8

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: A larger value of this parameter indicates the higher disk usage.

wdr_snapshot_query_timeout

Parameter description: Specifies the execution timeout for the SQL statements associated with database monitoring snapshot operations. If the execution of a statement is not complete within the specified time and the result is returned, the snapshot operation fails, but some snapshots that have been generated are retained.

Parameter type: integer

Unit: second

Value range: 0 to 2147483647

Default value: 100

Setting method: This parameter is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value 0 indicates that there is no timeout limit. For example, if the value is 60 without a unit, wdr_snapshot_query_timeout indicates 60s. If the value is 1min, wdr_snapshot_query_timeout indicates 1 minute. The unit must be s, min, h, or d if required.

Setting suggestion: Set this parameter based on the actual scenario. If you do not care about the data in the snapshot and want to quickly generate a snapshot, set this parameter to a smaller value. If you want to ensure that the data in the snapshot is complete, set this parameter to a larger value.

Risks and impacts of improper settings: If snapshot generation times out, a larger value of this parameter results in a longer timeout period. As a result, the snapshot generation time is prolonged, but the data in the snapshot is more complete.

wdr_snapshot_interval

Parameter description: Specifies the interval at which the backend thread snapshot automatically takes snapshots of the database monitoring data.

This parameter is valid only when enable_wdr_snapshot is set to on.

Parameter type: integer

Unit: minute

Value range: 10 to 60

Default value: 60

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 60 without a unit, wdr_snapshot_interval indicates 60 minutes. If the value is 1h, wdr_snapshot_interval indicates 1 hour. The unit must be min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: A smaller value of this parameter indicates the larger disk usage.

wdr_snapshot_space_threshold

Parameter description: Specifies the threshold at which the space used by snapshots is controlled. When the space used by snapshots reaches 50% of the value of this parameter, the control logic of the database is enabled to stabilize the space used by the snapshots.

  • This parameter is valid only when enable_wdr_snapshot is set to on.
  • If this parameter is set to a value smaller than the space used by the snapshots, the space usage does not shrink. Instead, the control logic is enabled to control the snapshot growth and stabilize the space used by the snapshots.

Parameter type: integer

Unit: KB

Value range: 0 to 107374182400

Default value: 0, indicating that the function of controlling the space used by snapshots based on the space threshold is disabled.

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 1024 without a unit, wdr_snapshot_space_threshold indicates 1024 KB. If the value is 1MB, wdr_snapshot_space_threshold indicates 1 MB. The unit must be KB, MB, or GB if required.

Setting suggestion: Set this parameter based on the actual scenario.

Risks and impacts of improper settings: If this parameter is incorrectly set, only the latest group of snapshots is available.

wdr_snapshot_full_backup_interval

Parameter description: Specifies the interval at which a full WDR snapshot is created. The interval specified by this parameter is about a number instead of time. For example, if the parameter is set to 12, a full snapshot and then 11 incremental snapshots are generated for each group. If the parameter is set to 1, all snapshots generated are full snapshots.

  • This parameter is valid only when enable_wdr_snapshot is set to on.
  • If you change the value of this parameter after multiple snapshots have been generated, the next snapshot will be a full snapshot. For example, after five WDR incremental snapshots have been generated, if the parameter value is changed to 10, a full snapshot will be generated before a new interval starts.
  • When a snapshot is deleted, other snapshots in the same group are deleted. The number of snapshots to be deleted depends on the value of this parameter when the earliest group of snapshots are generated and is irrelevant to the current value.

Parameter type: integer

Unit: none

Value range: 1 to 24

Default value: 12

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Set this parameter based on the actual scenario.

Risks and impacts of improper settings: A smaller value of this parameter indicates more full snapshots and fewer snapshots that can be retained with the same space usage.

enable_asp

Parameter description: Specifies whether to enable the active session profile function.

Parameter type: Boolean.

Unit: none

Value range:

  • on: The active session profile function is enabled.
  • off: The active session profile function is disabled.

Default value: on

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

asp_flush_mode

Parameter description: Specifies the mode for the ASP to update data to the disk. The value can be "file" (default value), "table" (system catalog), or "all" (system catalog and file). Only the SYSADMIN user can access this parameter.

Parameter type: string.

Unit: none

Value range: "table", "file", and "all"

Default value: "table"

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

asp_flush_rate

Parameter description: When the number of samples reaches the value of asp_sample_num, the samples in the memory are updated to the disk based on a certain proportion. asp_flush_rate indicates the update proportion. If this parameter is set to 10, it indicates that the update ratio is 10:1.

Parameter type: integer

Unit: none

Value range: 1 to 10

Default value: 10

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too small, the amount of data flushed to disks increases.

asp_flush_interval

Parameter description: Specifies the interval at which ASP flushes data.

Parameter type: integer

Unit: second

Value range: 300 to 3600

Default value: 300

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 60 without a unit, asp_flush_interval indicates 60s. If the value is 1min, asp_flush_interval indicates 1 minute. The unit must be s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

asp_log_filename

Parameter description: Generates the file name format when writing files using ASP. Only the SYSADMIN user can access this parameter.

Parameter type: string.

Unit: none

Value range: valid character string in the file name format.

Default value: "asp-%Y-%m-%d_%H%M%S.log"

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

asp_retention_days

Parameter description: Specifies the maximum number of days for reserving ASP samples when they are written to the system catalog.

Parameter type: integer

Unit: day

Value range: 1 to 7

Default value: 2

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: If the value is too large, the disk space occupied by the gs_asp system catalog increases.

asp_sample_interval

Parameter description: Specifies the sampling interval.

Parameter type: integer

Unit: second

Value range: 1 to 10

Default value: 1

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 10 without a unit, asp_sample_interval indicates 10s. If the value is 10s, asp_sample_interval indicates 10s. The unit must be s, min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

asp_sample_num

Parameter description: Specifies the maximum number of samples allowed in the LOCAL_ACTIVE_SESSION view. Only the SYSADMIN user can access this parameter.

Parameter type: integer

Unit: none

Value range: 10 to 100000

Default value: 100000 (196-core CPU/1536 GB memory, 128-core CPU/1024 GB memory, 104-core CPU/1024 GB memory, 96-core CPU/1024 GB memory, 96-core CPU/768 GB memory, 80-core CPU/640 GB memory, 64-core CPU/512 GB memory, 60-core CPU/480 GB memory, 32-core CPU/256 GB memory, 16-core CPU/128 GB memory, 8-core CPU/64 GB memory, 4-core CPU/32 GB memory); 36000 (4-core CPU/16 GB memory)

Setting method: This is a POSTMASTER parameter. Set it based on instructions provided in Table 1.

Setting suggestion: Retain the default value. If you want to adjust the value, make sure you understand the parameter meaning and adjust the value with caution to avoid risks caused by misoperations.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

gs_perf_interval

Parameter description: Specifies the interval at which the stacks are collected automatically. For details about the automatic stack collection function determined by this parameter, see "Maintainability > Built-in perf Tool" in Feature Description.

Parameter type: integer

Unit: minute

Value Range: 0 to 60. 0 indicates that the function of automatically collecting stack information is disabled.

If you attempt to set this parameter to a value ranging from 1 to 4, this parameter will be automatically adjusted to the default value 5.

Default value: 5

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. For example, if the value is 60 without a unit, gs_perf_interval indicates 60 minutes. If the value is 1h, gs_perf_interval indicates 1 hour. The unit must be min, h, or d if required.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.

gs_perf_retention_days

Parameter description: Specifies the retention period of flame graph files. For details about the automatic stack collection function determined by this parameter, see "Maintainability > Built-in perf Tool" in Feature Description.

Parameter type: integer

Unit: day

Value range: 1 to 8

Default value: 3

Setting method: This is a SIGHUP parameter. Set it based on instructions provided in Table 1. The value cannot contain a unit.

Setting suggestion: Retain the default value.

Risks and impacts of improper settings: Change the parameter value after fully understanding the parameter meaning and verifying it through testing.