Note
This parameter is available starting with V4.6.2.1.
Overview
The vector_task_thread_limit_percent parameter is used to independently set the scheduling threshold (as a percentage) for different types of vector asynchronous tasks. This allows you to dynamically adjust the execution intensity of various vector background tasks based on actual business peaks. If this parameter is not configured or is set to an empty string, the system will use the default scheduling threshold.
Usage instructions
Vector background tasks use a unified thread pool. By default, the system dynamically determines the scheduling ratio for each task type based on the task type, priority, and a preset water level table, while also considering the current busy status of the thread pool. This mechanism meets resource allocation requirements in most scenarios. However, in actual operation, some tasks may require a more aggressive or conservative scheduling strategy for specific tenants or during specific periods. To address this, this parameter is provided, allowing users to flexibly adjust the scheduling water level for specific task types to override the default behavior.
- During business peak hours: Appropriately reduce the scheduling percentage of tasks such as minor compactions and major compactions to prioritize ensuring resources for online queries.
- During off-peak hours or maintenance windows: You can set this parameter to an empty string or increase the task percentage to speed up processing and maintenance.
- You only need to specify the task types that require adjustment. For types not configured, the system default watermarks will be used.
- This parameter is still protected by the minimum slot guarantee: even if you set the task type's water level to
0, tasks of that type may still be scheduled.
Privilege requirements
Query parameters
Both the
systenant and user tenants can use theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter.Modify parameters
Both the
systenant and user tenants can modify this parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | String |
| Default Value | Empty string |
| Value range | See the "Value description" section below. |
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Value description
- Empty string: Do not override the kernel's default water level.
- Non-empty string: Separate multiple items with commas
,. Each item is in the formattask type abbreviation:percentage, where the colon is a colon:. - Percentage: an integer in the closed interval
[0, 100].
The following table describes the task types supported.
Task type abbreviation |
Note |
|---|---|
| IVF_CACHE_LOAD | IVF Cluster Center Loading Task |
| MEM_SYNC | Memory Synchronization Task |
| IVF_CACHE_CLEAN | IVF Cluster Center Cleanup Task |
| INCREMENTAL_INDEX_FREEZE | Segment Minor Compaction Task |
| INCREMENTAL_INDEX_MERGE | Segment Major compaction Task |
| SEMANTIC_INDEX_REFRESH | Semantic index refresh task |
| PARTITION_REBUILD | Partition rebuilding task |
Configuration example
During business peak hours, reduce the scheduling intensity for minor compaction and major compaction tasks. For other task types, maintain the default threshold:
ALTER SYSTEM SET vector_task_thread_limit_percent = 'INCREMENTAL_INDEX_FREEZE:30,INCREMENTAL_INDEX_MERGE:30';
Restore to kernel default water level:
ALTER SYSTEM SET vector_task_thread_limit_percent = '';
View current configuration:
SHOW PARAMETERS LIKE 'vector_task_thread_limit_percent';