Where to View Coprocessor Queue Monitoring?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Coprocessor 排队(队列)监控在哪里查看?

| username: TiDBer_KkruFifg

[TiDB Usage Environment] Production Environment / Testing / Poc
Production Environment

[TiDB Version]
5.0.4

[Encountered Issues]

  1. Where can I view the monitoring for Coprocessor queuing (queue)?
    The corresponding alert metric is tikv_coprocessor_pending_request.

  2. What is the configuration parameter for Coprocessor in version 5.0?

Thank you.

[Reproduction Path] What operations were performed to encounter the issue
[Issue Phenomenon and Impact]

[Attachments]

Please provide the version information of each component, such as cdc/tikv, which can be obtained by executing cdc version/tikv-server --version.

| username: Billmay表妹 | Original post link

  1. Coprocessor queue monitoring can be viewed on the TiKV Grafana monitoring panel. Specifically, you can check the FuturePool pending tasks metric in the Coprocessor Overview panel, which shows the number of pending tasks in the FuturePool. Additionally, you can view the Handle duration and Wait duration metrics in the Coprocessor Detail panel, which display the processing time and waiting time of Coprocessor requests.

The corresponding alert metric is tikv_coprocessor_pending_request, which indicates the number of Coprocessor requests waiting to be processed. If the value of this metric exceeds a certain threshold, an alert will be triggered.

  1. In TiKV version 5.0, the configuration parameter for Coprocessor is coprocessor.batch-limit. This parameter controls the batch size of the Coprocessor, i.e., the number of requests processed at a time. The default value is 1024. You can modify the value of this parameter by changing the TiKV configuration file. For example, adding the following configuration item to the TiKV configuration file will change the value of coprocessor.batch-limit to 2048:

    [coprocessor]
    batch-limit = 2048
    

    After modifying the configuration file, you need to restart TiKV for the configuration to take effect. You can use the following command to restart TiKV:

    kubectl rollout restart statefulset <tikv-statefulset> -n <namespace>
    

    Where <tikv-statefulset> is the name of the TiKV StatefulSet, and <namespace> is the namespace where TiKV is located.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.