Overview
px_target_workers_per_cpu specifies the desired ratio of parallel execution threads to the number of CPU cores for a tenant.
Privilege requirements
Query parameters
The
SHOW PARAMETERSstatement or theGV$OB_PARAMETERSview can be used by thesystenant and all user tenants to query this parameter.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Double |
| Default Value | 8 |
| Value range | [0, +∞) |
| Modifiable | Yes, you can use theALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
The px_target_workers_per_cpu parameter serves the same purpose as the system variable parallel_servers_target, which previously represented the absolute number of PX threads. The downside was that this variable needed to be adjusted after scaling. Therefore, the approach has been changed to control the number based on the ratio of threads to CPU cores.
The value of the px_target_workers_per_cpu parameter must satisfy the following relationship:
px_target_low_watermark <= px_target_high_watermark <= px_target_workers_per_cpu
Configuration example
Set the ratio of parallel execution threads to tenant CPUs to 10.
obclient> ALTER SYSTEM SET px_target_workers_per_cpu = 10;