Skip to content

Managing Resources

WarehousePG 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. WarehousePG 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 WarehousePG; both schemes cannot be active at the same time.

Resource queues are enabled by default when you install your WarehousePG 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 external component CPU and memory resources

Parent topic: Managing Performance