Greenplum Database provides features to help you prioritize and allocate resources to queries according to business requirements and to prevent queries from starting when resources are unavailable.
You can use resource management features to limit the number of concurrent queries, the amount of memory used to run a query, and the relative amount of CPU devoted to processing a query. Greenplum Database provides two schemes to manage resources: Resource Queues and Resource Groups.
Either the resource queue or the resource group management scheme can be active in Greenplum Database; both schemes cannot be active at the same time. Set the server configuration parameter gp_resource_manager to enable the preferred scheme in the Greenplum Database cluster.
The following table summarizes some of the differences between resource queues and resource groups.
|Defines the number of query slots available at a time
|Defines the number of transaction slots available at a time
|Specify query priority
|Specify percentage of CPU resources or the specific number of CPU cores; uses Linux Control Groups
|Managed at the queue and operator level; users can over-subscribe
|Managed at the transaction level, with enhanced allocation and tracking; users can over-subscribe
|Limits are applied only to non-admin users
|Limits are applied to
SUPERUSER, non-admin users, and system processes of non-user classes
|Limit the maximum read/write disk I/O throughput, and maximum read/write I/O operations per second
|Queue when no slot available or not enough available memory
|Queue only when no slot is available
|Query may fail immediately if the allocated memory for the query surpasses the available system memory and spill limits
|Query may fail if the allocated memory for the query surpasses the available system memory and spill limits
|Limits are not enforced for
SUPERUSER roles and certain operators and functions
|Limits are not enforced on
SHOW commands. Additionally, certain queries may be configured to bypass the concurrency limit
|Manage PL/Container CPU resources
Parent topic: Managing Performance