This document describes the system configuration parameters in the Resource Management category.
Caution!
Manually modifying these parameters may affect system stability and security. Proceed with caution.
Determines how memory is allocated among query operators when resource groups are used.
gp_resgroup_memory_policy server configuration parameter takes effect only when resource management is set to resource group.auto, YMatrix Database allocates memory to query operators based on resource group memory limits. Non-memory-intensive operators receive a fixed amount of memory, while the remaining memory is allocated to memory-intensive operators.eager_free, YMatrix Database improves memory allocation by reassigning memory released by completed operators to operators in subsequent query stages.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| enum | eager_free | eager_free / auto | segments; system; restart/reload; superuser |
Specifies the maximum percentage of CPU resources on each YMatrix Database segment node that can be allocated to resource groups.
gp_resource_group_cpu_limit server configuration parameter takes effect only when resource management is set to resource group.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| floating point | 0.9 | 0.1 ~ 1.0 | segments; system; restart |
Sets the CPU scheduling priority of YMatrix processes relative to non-YMatrix processes when resource groups are enabled.
10 sets the CPU resource ratio between YMatrix and non-YMatrix processes to 10:1.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 10 | 1 ~ 256 | segments; system; restart |
Cancels transactions that have been queued in a resource group beyond the specified timeout (in milliseconds).
0 means transactions queue indefinitely and never time out.gp_resource_group_queuing_timeout server configuration parameter takes effect only when resource management is set to resource group.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 0 | 0 ~ INT_MAX | master; session; reload |
Specifies the resource management scheme currently enabled in the YMatrix Database cluster.
| Data Type | Default Value | Range | Category |
|---|---|---|---|
| enum | queue | group / queue | segments; system; restart |
Sets the memory usage threshold percentage for memory-intensive operators within a transaction.
memory_spill_ratio percentage is defined by the value assigned to the current active role's resource group.memory_spill_ratio at the session level to selectively adjust this limit per query. For example, if a specific query spills to disk and requires more memory, you can set a higher memory_spill_ratio to increase initial memory allocation.memory_spill_ratio at the session level, YMatrix Database does not validate the new value semantically until the next query execution.memory_spill_ratio server configuration parameter takes effect only when resource management is set to resource group.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 20 | 0 ~ 100 | master; session; reload |
The default base v1 cgroup path used by the resource group feature.
/ymatrix/EmviwvEQDzobZxQi3pX8Co/postgres if deployed via GUI; otherwise, it is an empty string for command-line deployment.| Data Type | Default Value | Category |
|---|---|---|
| string | segments; system; restart; superuser |
Enables YMatrix memory management functionality.
gp_resqueue_memory_policy server configuration parameter takes effect only when resource management is set to resource queue.eager_free allocation algorithm leverages the fact that not all operators execute simultaneously.none, memory management behaves as in Greenplum versions prior to 4.1. When set to auto, query memory usage is primarily controlled by the statement_mem parameter and queue memory limits.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| enum | eager_free | eager_free / auto / none | segments; system; restart/reload |
Enables or disables query prioritization.
gp_resqueue_priority server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Category |
|---|---|---|
| boolean | on | segments; system; restart |
Specifies the number of CPU units allocated per segment instance.
gp_resqueue_priority_cpucores_per_segment server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| floating point | 4.0 | 0.1 ~ 512.0 | segments; system; restart |
Specifies the interval (in milliseconds) at which the sweeper process evaluates current CPU usage.
gp_resqueue_priority_sweeper_interval server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 1000 | 500 ~ 15000 | segments; system; restart |
Sets the total amount of memory (in MB) that all postgres processes on an active segment instance can consume.
Note: The gp_vmem_protect_limit server configuration parameter takes effect only when resource management is set to resource queue.
If a query exceeds this limit, memory allocation fails and the query is terminated.
Specify only the numeric value. For example, use 4096 for 4096MB. Do not include the unit "MB" in the value.
To prevent excessive memory allocation, use the following calculations to estimate a safe gp_vmem_protect_limit value. First, compute gp_vmem, which represents the YMatrix Database memory available on the host:
gp_vmem = ((SWAP + RAM) – (7.5GB + 0.05 * RAM)) / 1.7
where SWAP and RAM are in GB.
max_acting_primary_segments, the maximum number of primary segments that could run on a single host if mirrors are activated due to a cluster failure. For example, in a 4-host block with 8 primaries per host, a single host failure activates 2–3 mirrors on each surviving host.max_acting_primary_segments is 11 (8 primaries + 3 activated mirrors).gp_vmem_protect_limit (convert to MB):gp_vmem_protect_limit = gp_vmem / acting_primary_segments
gp_vmem = ((SWAP + RAM) – (7.5GB + 0.05 * RAM - (300KB * total_#_workfiles))) / 1.7
gp_vmem value, compute the kernel parameter vm.overcommit_ratio:vm.overcommit_ratio = (RAM - (0.026 * gp_vmem)) / RAM
vm.overcommit_ratio in Red Hat Enterprise Linux is 50.8192.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 11429 | 0 ~ (INT_MAX/2) | segments; system; restart |
Sets the maximum number of user-defined cursors that can be open simultaneously per transaction.
max_resource_portals_per_transaction server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 64 | 0 ~ INT_MAX | master; system; restart |
Sets the maximum number of resource queues that can be created in the YMatrix Database system.
| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 9 | 0 ~ INT_MAX | master; system; restart |
Sets the maximum memory limit (in KB) for a query.
statement_mem too high may help avoid out-of-memory errors on segment hosts during query processing.gp_resqueue_memory_policy=auto, query memory usage is controlled by statement_mem and resource queue memory limits.(seghost_physical_memory) / (average_number_concurrent_queries)
max_statement_mem and statement_mem, you must first modify max_statement_mem, or list it first in the postgresql.conf file.max_statement_mem server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 2048000 | 32768 ~ INT_MAX | master; session; reload; superuser |
When a statement is submitted via a resource queue, this parameter clears all idle query execution gangs before acquiring the resource queue lock.
resource_cleanup_gangs_on_wait server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Category |
|---|---|---|
| boolean | on | master; system; restart |
Determines the types of queries managed by resource queues.
on, only SELECT, SELECT INTO, and CREATE TABLE AS SELECT和DECLARE CURSOR commands are evaluated. If set to off, INSERT, UPDATE, and DELETE commands are also evaluated.resource_select_only server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Category |
|---|---|---|
| boolean | off | master; system; restart |
Sets the percentage of YMatrix Database vmem usage that triggers query termination.
0 disables automatic query termination based on vmem usage.runaway_detector_activation_percent server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 90 | 0 ~ 100 | segments; system; restart |
Allocates memory on segment hosts per query (in KB).
max_statement_mem or the memory limit of the resource queue submitting the query.gp_resqueue_memory_policy =auto, query memory usage is controlled by statement_mem and resource queue memory limits.( gp_vmem_protect_limitGB * .9 ) / max_expected_concurrent_queries
gp_vmem_protect_limit set to 8192MB(8GB) and up to 40 concurrent queries (including 10% buffer):(8GB * .9) / 40 = .18GB = 184MB
max_statement_mem and statement_mem, you must first modify max_statement_mem, or list it first in the postgresql.conf file.statement_mem server configuration parameter takes effect only when resource management is set to resource queue.| Data Type | Default Value | Range | Category |
|---|---|---|---|
| int | 128000 | 50 ~ INT_MAX | master; session; reload |