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] make a flamegraph on event loop lag. #47491

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rynewang
Copy link
Contributor

@rynewang rynewang commented Sep 5, 2024

Ray Dashboard is important yet struggles with the event loop blocked by various code. This PR introduces a feature to let it profile itself into flamegraph when the event loop lag is high. Default disabled.

How it works: we have 3 args: ON_LAG, DURATION, COOLDOWN. If lag is > ON_LAG, profile for DURATION secs, then sleep for COOLDOWN and monitor the lags again.

Also renamed the generated svg files to include date and time, to avoid overwriting the past flamegraphs.

@rynewang
Copy link
Contributor Author

TODO: do log rotation: only keep N graphs

@rynewang
Copy link
Contributor Author

@jjyao I added log rotation for the graphs, PTAL!

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.

2 participants