Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disttask: add metrics collection for dispatcher and scheduler #47017

Closed
27 tasks done
JK1Zhang opened this issue Sep 16, 2023 · 0 comments · Fixed by #47018 or #47175
Closed
27 tasks done

disttask: add metrics collection for dispatcher and scheduler #47017

JK1Zhang opened this issue Sep 16, 2023 · 0 comments · Fixed by #47018 or #47175
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@JK1Zhang
Copy link
Contributor

JK1Zhang commented Sep 16, 2023

Enhancement

add metric for dispatcher and scheduler, eg: how many tasks are scheduled, scheduling

Grafana

Dispatcher

  • A line chart showing the change in the number of waiting/running/cancelling/reverting tasks over time
  • A line chart showing the waiting time of waiting tasks
  • A line chart showing the dispatch time of dispatching tasks

Runtime - Scheduler SubTask

  • A line chart showing the change in the number of waiting subTasks over time
  • A line chart showing the waiting time of waiting subTasks
  • A line chart showing the run time of running subTasks

TiDB perspective

  • A pie chart showing the distribution of all current subTasks on various TiDB nodes

Task perspective

  • A line chart showing the change in the number of each Task's (uncompleted/completed) subTasks over time
  • A line chart showing the average rate of each Task (subTask count/hour, which can later be improved to rows/s or bytes/s)

SubTask perspective

  • A line chart showing the average running speed of subTasks on different TiDB nodes (subTask count/hour)

Metrics

  • dispatch(DDL owner)(for each task, lable: "task_type"=xxxx)
    • Waiting tasks (lable: "status"="waiting")
      • How many
      • Duration (lable: "task_id"=xxxx)
    • Dispatching tasks (lable: "status"="dispatching")
      • Duration (lable: "task_id"=xxxx)
    • Running tasks (lable: "status"="running")
    • Completed tasks (lable: "status"="completed")
    • Reverting tasks (lable: "status"="reverting")
    • Canceling tasks (lable: "status"="canceling")
  • Scheduler
    • For each scheduler/each TiDB node (lable: "task_id"=xxxx, "task_type"=xxxx, "scheduler_id"=xxxx, "tidb_id"=xxxx)
      • Running subTask (lable: "status"="running")
        • Duration (lable: "subtask_id"=xxxx)
      • Waiting subTask (lable: "status"="waiting")
        • How many
        • Duration (lable: "subtask_id"=xxxx)
@JK1Zhang JK1Zhang added the type/enhancement The issue or PR belongs to an enhancement. label Sep 16, 2023
@okJiang okJiang added type/feature-request Categorizes issue or PR as related to a new feature. type/enhancement The issue or PR belongs to an enhancement. and removed type/enhancement The issue or PR belongs to an enhancement. type/feature-request Categorizes issue or PR as related to a new feature. labels Sep 18, 2023
ti-chi-bot bot pushed a commit that referenced this issue Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
2 participants