Managing Resources

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 execute 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.

Important: Significant Greenplum Database performance degradation has been observed when enabling resource group-based workload management on RedHat 6.x and CentOS 6.x. This issue is caused by a Linux cgroup kernel bug. This kernel bug has been fixed in CentOS 7.x and Red Hat 7.x systems.

If you use RedHat 6 and the performance with resource groups is acceptable for your use case, upgrade your kernel to version 2.6.32-696 or higher to benefit from other fixes to the cgroups implementation.

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.

Resource queues are enabled by default when you install your Greenplum Database cluster. While you can create and assign resource groups when resource queues are active, you must explicitly enable resource groups to start using that management scheme.

The following table summarizes some of the differences between Resource Queues and Resource Groups.

MetricResource QueuesResource Groups
ConcurrencyManaged at the query levelManaged at the transaction level
CPUSpecify query prioritySpecify percentage of CPU resources; uses Linux Control Groups
MemoryManaged at the queue and operator level; users can over-subscribeManaged at the transaction level, with enhanced allocation and tracking; users cannot over-subscribe
Memory IsolationNoneMemory is isolated between resource groups and between transactions within the same resource group
UsersLimits are applied only to non-admin usersLimits are applied to SUPERUSER and non-admin users alike
QueueingQueue only when no slot availableQueue when no slot is available or not enough available memory
Query FailureQuery may fail immediately if not enough memoryQuery may fail after reaching transaction fixed memory limit when no shared resource group memory exists and the transaction requests more memory
Limit BypassLimits are not enforced for SUPERUSER roles and certain operators and functionsLimits are not enforced on SET, RESET, and SHOW commands
External ComponentsNoneManage PL/Container CPU and memory resources

Parent topic: Managing Performance

Need help? Visit the Greenplum Database Community