How to interpret discrepancy between Profiler and ResourceProfiler? #9022
Unanswered
gerritholl
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a script that I am trying to optimise. To this end, I am using
Profiler
andResourceProfiler
from dask and the unix utilitytime
. I'm confused in how to interpret the results.The profilers tell me that for the first half of the run, 8 workers are working in parallel, but CPU usage is 100%. Afterward, there are no workers at all, and CPU usage is 800%. First it's working but not using resources, then it's using resources but not working?
I do not yet have a MCVE, but it seems much of the work is within two
@dask.delayed
-decorated functions that can be seen athttps://github.com/zxdawn/pyresample/blob/5640a159c8ae17afece6fc634fa06dad4d786689/pyresample/bucket/__init__.py#L32-L62:
`@dask.delayed`-decorated functions
The functions are called with
from_delayed
at https://github.com/zxdawn/pyresample/blob/5640a159c8ae17afece6fc634fa06dad4d786689/pyresample/bucket/__init__.py#L226-L252:Method using the delayed functions
Inspecting the bokeh plot interactively suggests the dask workers are mostly working on slicing (for example,
slice_with_int_dask_array
appears a lot).I will try to create a MCVE that is independent of external libraries. My non-minimal example illustrating how I generated the bokeh plot:
Non-minimal comprehensive poorly-verifiable example (NMCPVE)
The bokeh plot: parallax-performance-dask-natural_color.html.gz
Is there anything I'm doing clearly wrong in producing the diagnostics?
Edit: It seems my code has significant work going on before anything gets computed within dask. Is it possible that this confuses the time-axis on the
Profiler
, and that this one is offset by 70-ish seconds compared to theResourceProfiler
? That would explain why the first 70 seconds see 100% CPU, and then the period in which 8 dask graphs are working would actually correspond to the period with 800% CPU.Beta Was this translation helpful? Give feedback.
All reactions