Configuring CPU Resources
You can configure CPU resources in two ways:
- Pinning Vertica processes to certain CPUs
- Setting run-time priorities for resource pools
Pinning Vertica Processes to Certain CPUs
To pin an entire Vertica server process and its child processes to execute on a specified set of CPUs in the cluster, use the following configuration parameters. These parameters do not affect external processes and applications:
PINPROCESSORS
: Number of CPUs to which Vertica processes will be pinnedPINPROCESSORSOFFSET
: Offset for the start of CPUs to be used by the Vertica server
For example, suppose you have a cluster where each node has 24 CPUs, numbered 0 through 23. In this case, you can restrict the server process to CPUs #16–23 by entering the following statements:
SELECT SET_CONFIG_PARAMETER('PINPROCESSORS', 8)
SELECT SET_CONFIG_PARAMETER('PINPROCESSORSOFFSET', 16)
Pin your application to the processors that are not allocated to the Vertica database. To make sure that other applications do not use the processors assigned to the Vertica server, use the Linux cgroups
command.
Setting Run-Time Priorities for Resource Pools
You can manage resources in a resource pool. For you to do so, those resources must be assigned to queries already running in that resource pool.
You assign each resource pool a run-time priority of HIGH, MEDIUM, or LOW. These settings determine the amount of run-time resources (such as CPU and I/O bandwidth) assigned to queries in the resource pool when they run. Queries in a resource pool with a HIGH priority are assigned greater run-time resources than those in resource pools with MEDIUM or LOW run-time priorities.