Note
This parameter is available starting with V1.4.
Description
workers_per_cpu_quota specifies the maximum number of worker threads that can be allocated to a tenant on each CPU.
Privilege requirements
Query the parameter
The
systenant and all user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify the parameter
Only the
systenant can modify this parameter. User tenants cannot modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | 10 |
| Value range | [2, 20] |
| 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 number of threads that can be processed by a tenant is controlled by the cpu_quota_concurrency and workers_per_cpu_quota parameters. When you set these parameters, make sure that workers_per_cpu_quota > cpu_quota_concurrency.
Where:
workers_per_cpu_quotaspecifies the maximum number of worker threads that can be allocated to a tenant on each CPU.cpu_quota_concurrencyspecifies the maximum number of active threads allowed per CPU quota for a tenant, which is the concurrency level.
Examples
Set the maximum number of worker threads that can be allocated to a tenant on each CPU to 10.
obclient> ALTER SYSTEM SET workers_per_cpu_quota = 10;