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

[Serve] [Dashboard] Add serve controller metrics to serve system dashboard page #43797

Conversation

architkulkarni
Copy link
Contributor

@architkulkarni architkulkarni commented Mar 7, 2024

Why are these changes needed?

Adds the following Serve controller metrics to the Serve details page on the dashboard:

ray_serve_num_ongoing_http_requests
ray_serve_num_ongoing_grpc_requests
ray_serve_controller_num_starts
ray_serve_num_scheduling_tasks
ray_serve_num_scheduling_tasks_in_backoff
ray_serve_controller_num_control_loops

#43797 (comment) contains a screenshot.

Related issue number

Closes #35667

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
@shrekris-anyscale
Copy link
Contributor

Awesome, thanks for getting this out so quickly! The dashboard page looks good.

It's a little odd that ray_serve_controller_num_starts, ray_serve_num_scheduling_tasks, and ray_serve_num_scheduling_tasks_in_backoff aren't showing up. ray_serve_controller_num_starts should show up soon after the controller initializes for the first time. ray_serve_num_scheduling_tasks and ray_serve_num_scheduling_tasks_in_backoff should show up after a few requests on a hello world app.

Is there any chance that the query is filtering for an incorrect/unexpected tag?

Copy link
Contributor

@GeneDer GeneDer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ray_serve_num_scheduling_tasks, and ray_serve_num_scheduling_tasks_in_backoff are both gauge just happened to set to 0. There actually data in your screenshot :)

ray_serve_controller_num_starts is indeed the odd one that doesn't come with data. Would need to dig into how come it didn't log a metrics on start. Could be a bug in the code somewhere 😕

@architkulkarni
Copy link
Contributor Author

Thanks for the reviews, I'll update the PR soon.

@edoakes any thoughts on other metrics that should be included here?

@edoakes
Copy link
Contributor

edoakes commented Mar 8, 2024

Thanks for the reviews, I'll update the PR soon.

@edoakes any thoughts on other metrics that should be included here?

Oh nice, this is looking good! Could we please also add serve_controller_num_control_loops? This detects if the controller is "stuck" (counter is not increasing)

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
@architkulkarni
Copy link
Contributor Author

Will remove serve_controller_num_starts for now since it doesn't seem like it's being exported by Serve. Created an issue here: #43829

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
@edoakes
Copy link
Contributor

edoakes commented Mar 8, 2024

Will remove serve_controller_num_starts for now since it doesn't seem like it's being exported by Serve. Created an issue here: #43829

NP. This is somewhat redundant with the control loop counter anyways

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Copy link
Contributor

@GeneDer GeneDer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@architkulkarni
Copy link
Contributor Author

Screenshot 2024-03-11 at 1 21 05 PM Latest commit looks good, merging

@architkulkarni architkulkarni merged commit 67cf06a into ray-project:master Mar 11, 2024
9 checks passed
hongchaodeng pushed a commit to hongchaodeng/ray that referenced this pull request Mar 13, 2024
…board page (ray-project#43797)

Adds the following Serve controller metrics to the Serve details page on the dashboard:

ray_serve_num_ongoing_http_requests
ray_serve_num_ongoing_grpc_requests
ray_serve_controller_num_starts
ray_serve_num_scheduling_tasks
ray_serve_num_scheduling_tasks_in_backoff
ray_serve_controller_num_control_loops

---------

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
…board page (ray-project#43797)

Adds the following Serve controller metrics to the Serve details page on the dashboard:

ray_serve_num_ongoing_http_requests
ray_serve_num_ongoing_grpc_requests
ray_serve_controller_num_starts
ray_serve_num_scheduling_tasks
ray_serve_num_scheduling_tasks_in_backoff
ray_serve_controller_num_control_loops

---------

Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[serve] Add metrics for Serve controller reconcile loop health
5 participants