ha_mid_thread_score specifies the current number of high-availability medium-priority worker threads.
Note
This parameter is introduced since OceanBase Database V4.0.0.
Relevant parameters
- ha_mid_thread_score
- ha_low_thread_score
Description
| Parameter | Description |
|---|---|
| Type | Integer |
| Default value | 0 |
| Value range | [0, 100] |
| Effective upon restart of OBServer node | No |
Considerations
In V4.x, each type of DAG task is assigned to a unique priority queue that uses first-in-first-out (FIFO) to allocate time slices for obtaining threads. Each priority queue is initially assigned a weight value, and resources for DagScheduler are allocated among the priority queues using the CPU shares algorithm, similar to that used in Cgroup. The greater the weight value of a queue, the higher its chances of being scheduled. You can modify the weight value of a specific priority queue to increase the concurrency of threads, depending on your specific requirements. For example, this can be useful for accelerating minor compaction or major compaction processes.
In V4.x, tasks related to high availability, such as migration, replication, and backup restore, are scheduled and executed through the tenant-level DagScheduler.
Due to limited thread resources for each tenant, parameters are no longer differentiated based on specific task types. Instead, three parameters related to high availability are set based on task priorities and importance, with each parameter corresponding to a different type of task:
ha_high_thread_score: specifies the concurrent number of threads for high-priority and high-reliability task queues, such as replication, rebuild, and restore.ha_mid_thread_score: specifies the concurrent number of threads for medium-priority and high-reliability task queues, such as migration.ha_low_thread_score: specifies the concurrent number of threads for low-priority and high-reliability task queues, such as backup, secondary backup, and backup cleanup.