-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Wall-time/all tasks profiler #55889
Wall-time/all tasks profiler #55889
Conversation
An additional note: this kind of wall-time/all tasks profiler is also implemented in Go (and denoted as goroutine profiler there), so there is some precedent for this in other languages as well: https://github.com/felixge/fgprof. |
@nickrobinson251 I can't assign you as reviewer... Feel free to assign yourself or post review comments otherwise. |
6b80fe3
to
f5c8f5f
Compare
I think this is related to #55103. Could the metrics here be useful in that too? |
1e9f41f
to
6cd27d7
Compare
f6ea007
to
1029a84
Compare
0d4ca9c
to
e493403
Compare
For diagnosing excessive scheduling time? I can't immediately see how this PR would be useful for that. |
#55103 seems like a much more direct approach for doing so, at least. |
90bca24
to
14766d3
Compare
14766d3
to
b9f0f1d
Compare
5ddd5ba
to
c9d1995
Compare
6c033d6
to
7e9966e
Compare
Wrote this short demo on how to use the profiler: https://github.com/d-netto/Wall-time-Profiler-Demo. Feedback is welcome. Perhaps we should add this to some documentation page in Julia itself. |
Can you add this to the Profile docs and the NEWS file? |
Sounds good, will do. Thanks for the reviews. |
7ece17a
to
50a3ce5
Compare
50a3ce5
to
e0213eb
Compare
This looks really interesting, I'm excited to use it! To confirm, there's no way to use this with Are there plans to make this modifiable using e.g. env variables like for heap snapshots or function references like [1] Line 818 in fcf7ec0
|
Your understanding is correct.
i think that could be a good addition! Perhaps open a feature request issue for it? We might even want both e.g. I suppose an Also, you might also be interested in #56043 (which depending on your use-case might be even better than a wall-time profile, since it'll print the backtrace for all tasks not just a sample) |
One limitation of sampling CPU/thread profiles, as is currently done in Julia, is that they primarily capture samples from CPU-intensive tasks. If many tasks are performing IO or contending for concurrency primitives like semaphores, these tasks won’t appear in the profile, as they aren't scheduled on OS threads sampled by the profiler. A wall-time profiler, like the one implemented in this PR, samples tasks regardless of OS thread scheduling. This enables profiling of IO-heavy tasks and detecting areas of heavy contention in the system. Co-developed with @nickrobinson251.
One limitation of sampling CPU/thread profiles, as is currently done in Julia, is that they primarily capture samples from CPU-intensive tasks. If many tasks are performing IO or contending for concurrency primitives like semaphores, these tasks won’t appear in the profile, as they aren't scheduled on OS threads sampled by the profiler. A wall-time profiler, like the one implemented in this PR, samples tasks regardless of OS thread scheduling. This enables profiling of IO-heavy tasks and detecting areas of heavy contention in the system. Co-developed with @nickrobinson251.
One limitation of sampling CPU/thread profiles, as is currently done in Julia, is that they primarily capture samples from CPU-intensive tasks. If many tasks are performing IO or contending for concurrency primitives like semaphores, these tasks won’t appear in the profile, as they aren't scheduled on OS threads sampled by the profiler. A wall-time profiler, like the one implemented in this PR, samples tasks regardless of OS thread scheduling. This enables profiling of IO-heavy tasks and detecting areas of heavy contention in the system. Co-developed with @nickrobinson251.
One limitation of sampling CPU/thread profiles, as is currently done in Julia, is that they primarily capture samples from CPU-intensive tasks.
If many tasks are performing IO or contending for concurrency primitives like semaphores, these tasks won’t appear in the profile, as they aren't scheduled on OS threads sampled by the profiler.
A wall-time profiler, like the one implemented in this PR, samples tasks regardless of OS thread scheduling. This enables profiling of IO-heavy tasks and detecting areas of heavy contention in the system.
Co-developed with @nickrobinson251.