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

[core][dashboard] summarize_tasks is slow and blocks event loop #45899

Open
rynewang opened this issue Jun 12, 2024 · 0 comments
Open

[core][dashboard] summarize_tasks is slow and blocks event loop #45899

rynewang opened this issue Jun 12, 2024 · 0 comments
Labels
core Issues that should be addressed in Ray Core enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks

Comments

@rynewang
Copy link
Contributor

rynewang commented Jun 12, 2024

What happened + What you expected to happen

When you have many tasks in cluster, and you query localhost:8265/api/v0/tasks/summarize?timeout=30 you can get the result in ~2s, but meanwhile the event loop is blocked.

Versions / Dependencies

master

Reproduction script

Create many tasks:

import ray
import time
ray.init()


objs = []

# Evil exec
for i in range(100000):
    code = f"""
@ray.remote
def func_{i}():
    return 1

objs.append(func_{i}.remote())
"""
    exec(code)


print(len(objs))
print(sum(ray.get(objs)))

time.sleep(10000)

then make traffic:

watch "curl localhost:8265/api/v0/tasks/summarize?timeout=30 | wc"

then you can see the lag in dashboard. Now doing flame graph on dashboard:

image

Here is a svg file: dash_flamegraph

Issue Severity

Medium: It is a significant difficulty but I can work around it.

@rynewang rynewang added bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jun 12, 2024
@anyscalesam anyscalesam added enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks core Issues that should be addressed in Ray Core and removed bug Something that is supposed to be working; but isn't triage Needs triage (eg: priority, bug/not-bug, and owning component) labels Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues that should be addressed in Ray Core enhancement Request for new feature and/or capability P1 Issue that should be fixed within a few weeks
Projects
None yet
Development

No branches or pull requests

2 participants