Note
For V4.6.0, this parameter is available starting with V4.6.0.
Description
px_target_workers_per_cpu specifies the ratio of the number of parallel execution threads to the number of CPU cores in a tenant.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Double |
| Default value | 8 |
| Value range | [0, +∞) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The px_target_workers_per_cpu parameter replaces the system variable parallel_servers_target, which specifies the absolute number of PX threads. The disadvantage of using the absolute number of PX threads is that you need to adjust the variable after scaling in or out. Therefore, the ratio of the number of PX threads to the number of CPU cores is used to control the number of PX threads.
The value of the px_target_workers_per_cpu parameter must satisfy the following condition:
px_target_low_watermark <= px_target_high_watermark <= px_target_workers_per_cpu
Examples
Set the ratio of the number of parallel execution threads to the number of CPU cores in a tenant to 10.
obclient> ALTER SYSTEM SET px_target_workers_per_cpu = 10;
